blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
247
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
57
| license_type
stringclasses 2
values | repo_name
stringlengths 4
111
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
58
| visit_date
timestamp[ns]date 2015-07-25 18:16:41
2023-09-06 10:45:08
| revision_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| committer_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| github_id
int64 3.89k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 25
values | gha_event_created_at
timestamp[ns]date 2012-06-07 00:51:45
2023-09-14 21:58:52
⌀ | gha_created_at
timestamp[ns]date 2008-03-27 23:40:48
2023-08-24 19:49:39
⌀ | gha_language
stringclasses 159
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 7
10.5M
| extension
stringclasses 111
values | filename
stringlengths 1
195
| text
stringlengths 7
10.5M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aa9bbee3cb67846ab99dafffed69ec61b3984da5
|
a64522736c6b38edc39eb203a7842c109f17bfef
|
/CPP/CPP Primer Book/Chapter 1/Exercise_1_1/Exercise_1_1.cpp
|
9b01be788cce0360fe697d55bef22e7b488df778
|
[] |
no_license
|
stuartthompson/Research
|
6d56a8e34d01aeb5e23d86e03c536d0a009a2600
|
aa6efafd90b0a151e613c82d7683e6568d1a2dc6
|
refs/heads/master
| 2021-01-01T05:40:55.744590
| 2013-01-04T22:52:13
| 2013-01-04T22:52:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 186
|
cpp
|
Exercise_1_1.cpp
|
/*
* Exercise_1_1
*
* The simplest possible C++ program.
*
* Created on: May 2, 2012
* Author: Stuart Thompson
*/
/**
* Program entry point.
*/
int main() {
return 0;
}
|
8b08e0d56ff4182b5f39b2609321236beb35fcc7
|
3dcaab804d0aa5f003263100fb55d4b2dbb5423d
|
/09-multi-file-project/main.cpp
|
8d54d503e740fa7d5efee6e0dd608dbb6c75c9fa
|
[] |
no_license
|
SergeantHoma/cpp-basics
|
73e2dbb93d6da170e066bda61325f613c99ff82c
|
7abcd0b4c850544de060a25249c58c2f592cf3be
|
refs/heads/master
| 2020-03-29T21:54:24.676847
| 2018-11-28T17:32:44
| 2018-11-28T17:32:44
| 150,393,537
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 829
|
cpp
|
main.cpp
|
#include "functions.h"
int main() {
int const kArraySize = 10;
int array[kArraySize] = { 0, -1, -2, 1, -4, 0, -6, 1, 3, -2 };
cout << "Starting Array:" << endl;
PrintArray(array, kArraySize);
cout << endl;
cout << "\nIndex of max element in the array: ";
cout << IndexMaxElment(array, kArraySize) << endl;
cout << "\nProduct of elements between zeroes: ";
Zeroes z = FindZeroes(array, kArraySize);
if (z.first_zero_index != -1 && z.second_zero_index != -1)
{
if ((z.second_zero_index - z.first_zero_index) > 1)
cout << ProductBetweenZeroes(array, kArraySize, z);
else
cout << "Error: no elements between zeroes!";
}
else
{
cout << "Error: less than 2 zeroes in the array!";
}
cout << endl;
cout << "\nSorted Array:\n";
SortArray(array, kArraySize);
PrintArray(array, kArraySize);
return 0;
}
|
a951448164c609c56e101ea260b38b0b84ff5162
|
c28a949525384d6834389463ce8b1436e6f1bbca
|
/Code/Layer1/Source/RenderSystem_GLES3/GLES3TransformerImp.cpp
|
adea43a14d1a313561f06cba8fb1f81a42b8d9a0
|
[] |
no_license
|
devilwalk/DevilX
|
c8bb3daf2b9b1f88027230caa36b090721845923
|
854265ca2e004d9f93ec6de83c71f5eb685e4297
|
refs/heads/master
| 2021-01-11T20:21:38.967611
| 2020-09-30T07:53:23
| 2020-09-30T07:53:35
| 79,100,279
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,704
|
cpp
|
GLES3TransformerImp.cpp
|
#include "Precompiler.h"
using namespace NSDevilX;
using namespace NSRenderSystem;
using namespace NSGLES3;
NSDevilX::NSRenderSystem::NSGLES3::CTransformerImp::CTransformerImp(ITransformerImp * interfaceImp)
:TInterfaceObject<ITransformerImp>(interfaceImp)
,CConstantBufferContainer("cbObjectTransform")
{
getInterfaceImp()->addListener(this,ITransformerImp::EMessage_BeginDestruction);
getInterfaceImp()->addListener(this,ITransformerImp::EMessage_EndPositionChange);
getInterfaceImp()->addListener(this,ITransformerImp::EMessage_EndOrientationChange);
getInterfaceImp()->addListener(this,ITransformerImp::EMessage_EndScaleChange);
}
NSDevilX::NSRenderSystem::NSGLES3::CTransformerImp::~CTransformerImp()
{}
Void NSDevilX::NSRenderSystem::NSGLES3::CTransformerImp::onMessage(ITransformerImp * notifier,UInt32 message,VoidPtr data,Bool & needNextProcess)
{
switch(message)
{
case ITransformerImp::EMessage_EndPositionChange:
case ITransformerImp::EMessage_EndOrientationChange:
case ITransformerImp::EMessage_EndScaleChange:
needUpdate();
break;
case ITransformerImp::EMessage_BeginDestruction:
CSystemImp::getSingleton().destroyTransformer(getInterfaceImp());
break;
}
}
Void NSDevilX::NSRenderSystem::NSGLES3::CTransformerImp::_updateConstantBuffer(Byte * buffer)
{
auto offset=mConstantBuffer->getDescription()->getConstantDesc("gWorldMatrix").mOffsetInBytes;
*reinterpret_cast<CFloat4*>(&buffer[offset])=getInterfaceImp()->getTransformMT().colume(0);
*reinterpret_cast<CFloat4*>(&buffer[offset+sizeof(CFloat4)])=getInterfaceImp()->getTransformMT().colume(1);
*reinterpret_cast<CFloat4*>(&buffer[offset+sizeof(CFloat4)*2])=getInterfaceImp()->getTransformMT().colume(2);
}
|
d8066385659ed22df2353475fd9140e25477733b
|
e830110df185ec2bca9be964168a5ab643fc6c17
|
/PigFight/main.cpp
|
998a1d0d649f289113070638944625da88ead52b
|
[] |
no_license
|
BearVic/PigFight
|
ba24823696c64cd404091f55ebd7c7bae693e753
|
a5a589ecb7db62e323b77474a647bc5b82fd3e5b
|
refs/heads/master
| 2020-03-16T13:37:18.925259
| 2018-05-09T03:22:14
| 2018-05-09T03:22:14
| 132,695,438
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 614
|
cpp
|
main.cpp
|
// Professor. Brian Malloy Student: Victor Liu Data-Driven Object oriented Game Construction
#include "engine.h"
// ImageFactory* ImageFactory::instance = NULL;
// RenderContext* RenderContext::instance = NULL;
int main(int, char*[]) {
bool restart = true;
try {
while(restart){
Engine* engine = new Engine;
restart = engine->play();
delete engine;
}
// delete RenderContext::getInstance();
}
catch (const string& msg) { std::cout << msg << std::endl; }
catch (...) {
std::cout << "Oops, someone threw an exception!" << std::endl;
}
return 0;
}
|
30ebb5eff0ed9216dbe25124e0fb42eae62186b8
|
bc12312cb0ca4f2905d4cdc3d1a10a72b5ed63f3
|
/src/kick/math/bounds3.h
|
f78f217fffd7fb189c2cac5af3541093a07274bd
|
[] |
no_license
|
mortennobel/kick
|
45b040051b4ab0ccd8e13ca5fbd6f42cb9eb59db
|
d32aa66ee81131464f0c09f6badb082dbe5ef92d
|
refs/heads/master
| 2021-01-22T18:23:59.912970
| 2018-04-04T15:23:20
| 2018-04-04T15:23:20
| 19,434,888
| 56
| 11
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,004
|
h
|
bounds3.h
|
//
// Created by Morten Nobel-Jørgensen on 08/09/14.
//
#pragma once
#include "glm/glm.hpp"
#include <iostream>
#include "glm/gtx/string_cast.hpp"
#include <limits>
#include <vector>
namespace kick {
struct Bounds3 {
public:
glm::vec3 min = glm::vec3{ std::numeric_limits<float>::max() };
glm::vec3 max = glm::vec3{ std::numeric_limits<float>::lowest() };
glm::vec3 dimension();
glm::vec3 center();
glm::vec3 diagonal();
Bounds3 transform(glm::mat4 trans);
Bounds3();
Bounds3(glm::vec3 const &min, glm::vec3 const &max);
void expand(glm::vec3 p);
void expand(Bounds3 b);
void reset();
Bounds3 lerp(float f, Bounds3 b);
bool contains(glm::vec3 point);
std::vector<glm::vec3> toLines();
};
inline std::ostream& operator<<(std::ostream& out, const Bounds3 & f){
return out << "bounds{"<<glm::to_string(f.min) << ',' << glm::to_string(f.max) <<"}";
}
}
|
232110d8a81f192b26defa89f463606e59da70c2
|
5cdc481e6f74abc93dbfa421998779c5c3984e2a
|
/Codeforces/295B.cc
|
3c2b1ff3caa4d582143dc5a929035cc2341e461b
|
[] |
no_license
|
joaquingx/Competitive-Programming-Problems
|
4f0676bc3fb43d88f6427e106c6d9c81698993ce
|
c6baddbb6f1bdb1719c19cf08d3594bb37ba3147
|
refs/heads/master
| 2021-01-15T08:36:45.392896
| 2016-11-21T17:29:15
| 2016-11-21T17:29:15
| 54,804,029
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 954
|
cc
|
295B.cc
|
#include <bits/stdc++.h>
#define MAXN 501
using namespace std;
typedef long long ll;
ll d[MAXN][MAXN],n,bucket[MAXN];
vector<ll> vec,res;
void floyd()
{
for(int l = 0 ; l < vec.size() ; ++l)
{
int k = vec[l]-1;
bucket[k] = 1;
for(int i = 0 ; i < n ; ++i)
for(int j = 0 ; j < n ; ++j)
d[i][j] = min( d[i][j] , d[i][k] + d[k][j]);
ll ans = 0;
for(int i = 0 ; i < n ; ++i)
for(int j = 0 ; j < n ; ++j)
{
if(bucket[i] and bucket[j])
ans+= d[i][j];
}
res.push_back(ans);
}
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(NULL);
memset(bucket,0,sizeof bucket);
cin >> n;
for(int i = 0 ; i < n ; ++i)
for(int j = 0 ; j < n ; ++j)
cin >> d[i][j];
vec.resize(n);
for(int i = 0; i < n ; ++i)
{
cin >> vec[i];
}
reverse(vec.begin() , vec.end());
floyd();
for(int i = n-1 ; i>= 0 ; --i)
cout << res[i] << " ";
cout << "\n";
return 0;
}
|
06745c32f472d3093cc484fc61a78d6f4c8dafa7
|
9b29f1367a4bc7003c48b39660e15f7b1e81789e
|
/NewtonCorrigido.cpp
|
73b669a76befe60286f25c15ca55e16274f0678d
|
[] |
no_license
|
luizrosalba/MetodosNumericosCpp
|
d638c0fbcad1f8f9f4bc0524a626087f0addef12
|
2fafe39f722e2103821a54918918f7a7e5364b4b
|
refs/heads/master
| 2022-12-07T11:26:50.477379
| 2020-09-03T13:52:06
| 2020-09-03T13:52:06
| 279,688,981
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,044
|
cpp
|
NewtonCorrigido.cpp
|
#include "metodosnum.h"
void MetNum::Host_NewtonCorrigido (double _x0 , int _numiter, double _limiar)
{
int k=1;
double x, teste1, teste2, e=_limiar, x1, teste3,h=0.0000001;
x=_x0;
while (k<_numiter)
{
teste1 = fabs(funcao(x));
teste2 = derivadaavancada(x,h);
//teste2 = derivadanamao(x);
if ( teste1 < e)
{
cout << " A solucao eh T1: " << x << endl;
cout <<" Limiar dado " << e << " Valor alcancado " << teste1 << endl ;
break;
}
if (teste2 == 0)
{
cout << " A derivada eh nula T2" << endl;
break;
}
x1 = x - (funcao(x)/derivadaavancada(x,h));
//x1 = x - (funcao(x)/derivadanamao(x));
teste3 = fabs(x - x1);
if(teste3 < e)
{
cout << " A solucao eh T3: " << x1 << endl;
break;
}
cout << " Iteracao " << k << " valor " << x1 << " " << endl;
x = x1;
k++;
}
cout << "Fim das iteracoes" <<endl ;
}
|
1f5e0607dc8324ba9f6ffbe8175b9cc43e9f7dec
|
cf2756bdc6c366715f8e8bc953ba4b8e19765a4a
|
/cpp/oneapi/dal/algo/decision_forest/backend/cpu/infer_kernel_cls.cpp
|
c2dfb4edbd3f68127810e66d09e15909d6318672
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"Intel",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause",
"MIT",
"Zlib"
] |
permissive
|
oneapi-src/oneDAL
|
c88b1f59218aa3b3b624a7b9f457bfc5823d583b
|
f4abbf2a18e27fa4165eb6b91b3456b5039e03a6
|
refs/heads/master
| 2023-09-06T00:47:52.411627
| 2023-09-05T22:29:42
| 2023-09-05T22:29:42
| 54,928,587
| 260
| 115
|
Apache-2.0
| 2023-09-14T17:51:26
| 2016-03-28T22:39:32
|
C++
|
UTF-8
|
C++
| false
| false
| 5,504
|
cpp
|
infer_kernel_cls.cpp
|
/*******************************************************************************
* Copyright 2020 Intel Corporation
*
* 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 <daal/src/services/service_algo_utils.h>
#include <daal/src/algorithms/dtrees/forest/classification/df_classification_predict_dense_default_batch.h>
#include "oneapi/dal/algo/decision_forest/backend/cpu/infer_kernel.hpp"
#include "oneapi/dal/table/row_accessor.hpp"
#include "oneapi/dal/backend/interop/common.hpp"
#include "oneapi/dal/backend/interop/error_converter.hpp"
#include "oneapi/dal/backend/interop/table_conversion.hpp"
#include "oneapi/dal/algo/decision_forest/backend/model_impl.hpp"
namespace oneapi::dal::decision_forest::backend {
using dal::backend::context_cpu;
using model_t = model<task::classification>;
using input_t = infer_input<task::classification>;
using result_t = infer_result<task::classification>;
using descriptor_t = detail::descriptor_base<task::classification>;
namespace daal_df = daal::algorithms::decision_forest;
namespace daal_df_cls_pred = daal_df::classification::prediction;
namespace interop = dal::backend::interop;
template <typename Float, daal::CpuType Cpu>
using cls_dense_predict_kernel_t =
daal_df_cls_pred::internal::PredictKernel<Float, daal_df_cls_pred::defaultDense, Cpu>;
static daal_df::classification::ModelPtr get_daal_model(const model_t& trained_model) {
const model_interop* interop_model = dal::detail::get_impl(trained_model).get_interop();
if (!interop_model) {
throw dal::internal_error(
dal::detail::error_messages::input_model_does_not_match_kernel_function());
}
return static_cast<const model_interop_cls*>(interop_model)->get_model();
}
template <typename Float>
static result_t call_daal_kernel(const context_cpu& ctx,
const descriptor_t& desc,
const model_t& trained_model,
const table& data) {
const std::int64_t row_count = data.get_row_count();
const auto daal_data = interop::convert_to_daal_table<Float>(data);
auto daal_model = get_daal_model(trained_model);
auto daal_input = daal::algorithms::classifier::prediction::Input();
daal_input.set(daal::algorithms::classifier::prediction::data, daal_data);
daal_input.set(daal::algorithms::classifier::prediction::model, daal_model);
const auto daal_voting_mode = convert_to_daal_voting_mode(desc.get_voting_mode());
const auto daal_parameter =
daal_df_cls_pred::Parameter(dal::detail::integral_cast<std::size_t>(desc.get_class_count()),
daal_voting_mode);
daal::data_management::NumericTablePtr daal_responses_res;
daal::data_management::NumericTablePtr daal_responses_prob_res;
if (check_mask_flag(desc.get_infer_mode(), infer_mode::class_responses)) {
daal_responses_res = interop::allocate_daal_homogen_table<Float>(row_count, 1);
}
if (check_mask_flag(desc.get_infer_mode(), infer_mode::class_probabilities)) {
daal_responses_prob_res =
interop::allocate_daal_homogen_table<Float>(row_count, desc.get_class_count());
}
const daal_df::classification::Model* const daal_model_ptr = daal_model.get();
interop::status_to_exception(interop::call_daal_kernel<Float, cls_dense_predict_kernel_t>(
ctx,
daal::services::internal::hostApp(daal_input),
daal_data.get(),
daal_model_ptr,
daal_responses_res.get(),
daal_responses_prob_res.get(),
desc.get_class_count(),
daal_voting_mode));
result_t res;
if (check_mask_flag(desc.get_infer_mode(), infer_mode::class_responses)) {
auto table_class_responses =
interop::convert_from_daal_homogen_table<Float>(daal_responses_res);
res.set_responses(table_class_responses);
}
if (check_mask_flag(desc.get_infer_mode(), infer_mode::class_probabilities)) {
auto table_class_probs =
interop::convert_from_daal_homogen_table<Float>(daal_responses_prob_res);
res.set_probabilities(table_class_probs);
}
return res;
}
template <typename Float>
static result_t infer(const context_cpu& ctx, const descriptor_t& desc, const input_t& input) {
return call_daal_kernel<Float>(ctx, desc, input.get_model(), input.get_data());
}
template <typename Float>
struct infer_kernel_cpu<Float, method::by_default, task::classification> {
result_t operator()(const context_cpu& ctx,
const descriptor_t& desc,
const input_t& input) const {
return infer<Float>(ctx, desc, input);
}
};
template struct infer_kernel_cpu<float, method::by_default, task::classification>;
template struct infer_kernel_cpu<double, method::by_default, task::classification>;
} // namespace oneapi::dal::decision_forest::backend
|
8382a760d99d71c33c33eb094f9b602c34a221ea
|
4ee4b2d880fbd89bdf646570b6d2b3356488f143
|
/witisoPC/32cpp/贺利坚/类相关/点类与圆类.cpp
|
1396dfbece03c032f39a42f9f2ac6497edab9025
|
[] |
no_license
|
wwuhn/wwuhn.github.io
|
8e5b3422c91f50c4ca989ed53b0d0e27131b574f
|
c63929f95557398b9f58319fe51a2ab00055afa4
|
refs/heads/master
| 2023-06-24T16:32:47.855733
| 2023-06-11T02:32:07
| 2023-06-11T02:32:07
| 211,744,777
| 3
| 3
| null | null | null | null |
GB18030
|
C++
| false
| false
| 10,665
|
cpp
|
点类与圆类.cpp
|
#if 0
#include <iostream.h>
#include<Cmath>
class Point
{
public:
Point(double x=0,double y=0); //构造函数
double distance(const Point &p) const; //求距离
double getx() const {return x;}
double gety() const {return y;}
void setx(double x1){x=x1;}
void sety(double y1){y=y1;}
friend ostream & operator<<(ostream &,const Point &);//重载运算符“<<”
protected: //受保护成员
double x,y;
};
//Point的构造函数
Point::Point(double a,double b):x(a),y(b){}
double Point::distance(const Point &p) const //求距离
{
double dx = x-p.x;
double dy = y-p.y;
return sqrt(dx*dx+dy*dy);
}
ostream & operator<<(ostream &output,const Point &p)
{
output<<"["<<p.x<<","<<p.y<<"]"<<endl;
return output;
}
class Circle:public Point //circle是Point类的公用派生类
{
public:
Circle(double x=0,double y=0,double r=0); //构造函数
double area ( ) const; //计算圆面积
friend ostream &operator<<(ostream &,const Circle &);//重载运算符“<<”
friend int locate(const Point &p, const Circle &c); //判断点p在圆上、圆内或圆外,返回值:<0圆内,==0圆上,>0 圆外
//重载关系运算符(种)运算符,使之能够按圆的面积比较两个圆的大小;
bool operator>(const Circle &);
bool operator<(const Circle &);
bool operator>=(const Circle &);
bool operator<=(const Circle &);
bool operator==(const Circle &);
bool operator!=(const Circle &);
//给定一点p,求出该点与圆c的圆心相连成的直线与圆的两个交点p1和p2
// (为了带回计算结果,p1和p2需要声明为引用)
friend void crossover_point(Point &p,Circle &c, Point &p1,Point &p2 ) ;
protected:
double radius;
};
//定义构造函数,对圆心坐标和半径初始化
Circle::Circle(double a,double b,double r):Point(a,b),radius(r){ }
//计算圆面积
double Circle::area( ) const
{
return 3.14159*radius*radius;
}
//重载运算符“<<”,使之按规定的形式输出圆的信息
ostream &operator<<(ostream &output,const Circle &c)
{
output<<"Center=["<<c.x<<", "<<c.y<<"], r="<<c.radius<<endl;
return output;
}
//判断点p在圆内、圆c内或圆c外
int locate(const Point &p, const Circle &c)
{
const Point cp(c.x,c.y); //圆心
double d = cp.distance(p);
if (abs(d - c.radius) < 1e-7)
return 0; //相等
else if (d < c.radius)
return -1; //圆内
else
return 1; //圆外
}
//重载关系运算符(种)运算符,使之能够按圆的面积比较两个圆的大小;
bool Circle::operator>(const Circle &c)
{
return (this->radius - c.radius) > 1e-7;
}
bool Circle::operator<(const Circle &c)
{
return (c.radius - this->radius) > 1e-7;
}
bool Circle::operator>=(const Circle &c)
{
return !(*this < c);
}
bool Circle::operator<=(const Circle &c)
{
return !(*this > c);
}
bool Circle::operator==(const Circle &c)
{
return abs(this->radius - c.radius) < 1e-7;
}
bool Circle::operator!=(const Circle &c)
{
return abs(this->radius - c.radius) > 1e-7;
}
//给定一点p,求出该点与圆c的圆心相连成的直线与圆的两个交点p1和p2(为了带回计算结果,p1和p2需要声明为引用)
void crossover_point(Point &p, Circle &c, Point &p1,Point &p2 )
{
p1.setx (c.getx() + sqrt(c.radius*c.radius/(1+((c.gety()-p.gety())/(c.getx()-p.getx()))*((c.gety()-p.gety())/(c.getx()-p.getx())))));
p2.setx (c.getx() - sqrt(c.radius*c.radius/(1+((c.gety()-p.gety())/(c.getx()-p.getx()))*((c.gety()-p.gety())/(c.getx()-p.getx())))));
p1.sety (p.gety() + (p1.getx() -p.getx())*(c.gety()-p.gety())/(c.getx()-p.getx()));
p2.sety (p.gety() + (p2.getx() -p.getx())*(c.gety()-p.gety())/(c.getx()-p.getx()));
}
int main( )
{
Circle c1(3,2,4),c2(4,5,5); //c2应该大于c1
Point p1(1,1),p2(3,-2),p3(7,3); //分别位于c1内、上、外
cout<<"圆c1: "<<c1;
cout<<"点p1: "<<p1;
cout<<"点p1在圆c1之"<<((locate(p1, c1)>0)?"外":((locate(p1, c1)<0)?"内":"上"))<<endl;
cout<<"点p2: "<<p2;
cout<<"点p2在圆c1之"<<((locate(p2, c1)>0)?"外":((locate(p2, c1)<0)?"内":"上"))<<endl;
cout<<"点p3: "<<p3;
cout<<"点p3在圆c1之"<<((locate(p3, c1)>0)?"外":((locate(p3, c1)<0)?"内":"上"))<<endl;
cout<<endl;
cout<<"圆c1: "<<c1;
if(c1>c2) cout<<"大于"<<endl;
if(c1<c2) cout<<"小于"<<endl;
if(c1>=c2) cout<<"大于等于"<<endl;
if(c1<=c2) cout<<"小于等于"<<endl;
if(c1==c2) cout<<"等于"<<endl;
if(c1!=c2) cout<<"不等于"<<endl;
cout<<"圆c2: "<<c2;
cout<<endl;
Point p4,p5;
crossover_point(p1,c1, p4, p5);
cout<<"点p1: "<<p1;
cout<<"与圆c1: "<<c1;
cout<<"的圆心相连,与圆交于两点,分别是:"<<endl;
cout<<"交点: "<<p4;
cout<<"交点: "<<p5;
cout<<endl;
while(1);
return 0;
}
#endif
/*
对于Circle类,需要重载<<运算符(友元函数);根据上面main()函数中08、10、12行的调用形式,
显然locate()函数应该为返回int型的友元函数;判断两圆大小关系的6个比较运算符处理为成员函数;
crossover_point()函数的设计是个难点,从main()函数中可以看出,
crossover_point()应该是一友元函数或一般函数,其返回值为void型,
要求位置关系的点和圆分别是第1个参数p1和第2个参数c1,而后两个参数p4和p5则用于返回值
(回想函数部分的相关知识,p4和p5应该为引用,这很重要。)
*/
#if 1
#include <iostream.h>
#include<Cmath>
class Point
{
public:
Point(double x=0,double y=0); //构造函数
double distance(const Point &p) const; //求距离
double getx() const{return x;}
double gety() const{return y;}
void setx(double x1){x=x1;}
void sety(double y1){y=y1;}
friend ostream & operator<<(ostream &,const Point &);//重载运算符“<<”
protected: //受保护成员
double x,y;
};
//Point的构造函数
Point::Point(double a,double b):x(a),y(b){}
double Point::distance(const Point &p) const //求距离
{
double dx = x-p.x;
double dy = y-p.y;
return sqrt(dx*dx+dy*dy);
}
ostream & operator<<(ostream &output,const Point &p)
{
output<<"["<<p.x<<","<<p.y<<"]"<<endl;
return output;
}
struct Two_points //专为crossover_point()函数返回值定义的结构体
{
Point p1;
Point p2;
};
class Circle:public Point //circle是Point类的公用派生类
{
public:
Circle(double x=0,double y=0,double r=0); //构造函数
double area ( ) const; //计算圆面积
friend ostream &operator<<(ostream &,const Circle &);//重载运算符“<<”
friend int locate(const Point &p, const Circle &c); //判断点p在圆上、圆内或圆外,返回值:<0圆内,==0圆上,>0 圆外
//重载关系运算符(种)运算符,使之能够按圆的面积比较两个圆的大小;
bool operator>(const Circle &);
bool operator<(const Circle &);
bool operator>=(const Circle &);
bool operator<=(const Circle &);
bool operator==(const Circle &);
bool operator!=(const Circle &);
//再给一种解法:给定一点p,求出该点与圆c的圆心相连成的直线与圆的两个交点(返回Two_points型值)
Two_points crossover_point(Point &p);
protected:
double radius;
};
//定义构造函数,对圆心坐标和半径初始化
Circle::Circle(double a,double b,double r):Point(a,b),radius(r){ }
//计算圆面积
double Circle::area( ) const
{
return 3.14159*radius*radius;
}
//重载运算符“<<”,使之按规定的形式输出圆的信息
ostream &operator<<(ostream &output,const Circle &c)
{
output<<"Center=["<<c.x<<", "<<c.y<<"], r="<<c.radius<<endl;
return output;
}
//判断点p在圆内、圆c内或圆c外
int locate(const Point &p, const Circle &c)
{
const Point cp(c.x,c.y); //圆心
double d = cp.distance(p);
if (abs(d - c.radius) < 1e-7)
return 0; //相等
else if (d < c.radius)
return -1; //圆内
else
return 1; //圆外
}
//重载关系运算符(种)运算符,使之能够按圆的面积比较两个圆的大小;
bool Circle::operator>(const Circle &c)
{
return (this->radius - c.radius) > 1e-7;
}
bool Circle::operator<(const Circle &c)
{
return (c.radius - this->radius) > 1e-7;
}
bool Circle::operator>=(const Circle &c)
{
return !(*this < c);
}
bool Circle::operator<=(const Circle &c)
{
return !(*this > c);
}
bool Circle::operator==(const Circle &c)
{
return abs(this->radius - c.radius) < 1e-7;
}
bool Circle::operator!=(const Circle &c)
{
return abs(this->radius - c.radius) > 1e-7;
}
//再给一种解法:给定一点p,求出该点与圆的圆心相连成的直线与圆的两个交点(返回Two_points型值)
Two_points Circle::crossover_point(Point &p)
{
Two_points pp;
pp.p1.setx ( x + sqrt(radius*radius/(1+((y-p.gety())/(x-p.getx()))*((y-p.gety())/(x-p.getx())))));
pp.p2.setx ( x - sqrt(radius*radius/(1+((y-p.gety())/(x-p.getx()))*((y-p.gety())/(x-p.getx())))));
pp.p1.sety ( p.gety() + (pp.p1.getx() -p.getx())*(y-p.gety())/(x-p.getx()));
pp.p2.sety ( p.gety() + (pp.p2.getx() -p.getx())*(y-p.gety())/(x-p.getx()));
return pp;
}
int main( )
{
Circle c1(3,2,4),c2(4,5,5); //c2应该大于c1
Point p1(1,1),p2(3,-2),p3(7,3); //分别位于c1内、上、外
cout<<"圆c1: "<<c1;
cout<<"点p1: "<<p1;
cout<<"点p1在圆c1之"<<((locate(p1, c1)>0)?"外":((locate(p1, c1)<0)?"内":"上"))<<endl;
cout<<"点p2: "<<p2;
cout<<"点p2在圆c1之"<<((locate(p2, c1)>0)?"外":((locate(p2, c1)<0)?"内":"上"))<<endl;
cout<<"点p3: "<<p3;
cout<<"点p3在圆c1之"<<((locate(p3, c1)>0)?"外":((locate(p3, c1)<0)?"内":"上"))<<endl;
cout<<endl;
cout<<"圆c1: "<<c1;
if(c1>c2) cout<<"大于"<<endl;
if(c1<c2) cout<<"小于"<<endl;
if(c1>=c2) cout<<"大于等于"<<endl;
if(c1<=c2) cout<<"小于等于"<<endl;
if(c1==c2) cout<<"等于"<<endl;
if(c1!=c2) cout<<"不等于"<<endl;
cout<<"圆c2: "<<c2;
cout<<endl;
cout<<"用另外一种方法求交点:"<<endl;
Two_points twoPoint = c1.crossover_point(p1);
cout<<"点p1: "<<p1;
cout<<"与圆c1: "<<c1;
cout<<"的圆心相连,与圆交于两点,分别是:"<<endl;
cout<<"交点: "<<twoPoint.p1;
cout<<"交点: "<<twoPoint.p2;
while(1);
return 0;
}
#endif
|
2036bc40cb6e074eef9cc487f1634438860268d6
|
3b789d2988625767072f827a48588fc05362e291
|
/svolti/esercizio8.cpp
|
974817d814c76d7627750447ee7a11ee76226e4f
|
[] |
no_license
|
stefano-rainieri/esercizi-sistemi-embedded
|
07995f4c1cddf15608c0f6f49dbb1a27de902e0e
|
46ff15d8edb4a9354917411a4bdc1341d3a999d9
|
refs/heads/master
| 2020-12-07T23:31:32.837231
| 2020-01-27T13:34:29
| 2020-01-27T13:34:29
| 232,826,558
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,696
|
cpp
|
esercizio8.cpp
|
#include <stdio.h>
#include <semaphore.h>
#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
#define PROCNUMBER 4
#define CONDIVISENUMBER 2
#define INDEXARGS 99
#define MAXWAITINGTIME 4 // 4 means from 1 to 5 seconds before been activate by clock
#define MAXBUSYTIME 2 // 2 means from 1 to 3 second to operate on a resource
#define NOTIMER 99 //while using a resource timer is unused and set to 99
void pausetta(void){
unsigned int seconds = (rand()%2+1);
sleep(seconds);
}
//Struttura condivisa
struct Array_t {
sem_t mutex;
sem_t privProc[PROCNUMBER];
sem_t risorseCondivise;
int risorseUtilizzate[CONDIVISENUMBER];
int contatori[PROCNUMBER]; //timers
/* stato del sistema */
}Array;
/* inizializzazione della struttura condivisa */
void init_Array(struct Array_t *a){
/* semafori e contatori privati */
sem_init(&a->mutex, 0, 1);
for (int i=0; i< PROCNUMBER; i++) {
a->contatori[i] = NOTIMER;
sem_init(&a->privProc[i], 0, 0);
}
for (int i=0; i< CONDIVISENUMBER; i++) {
a->risorseUtilizzate[i] = 0;
}
sem_init(&a->risorseCondivise, 0, CONDIVISENUMBER);
}
int tryAcces(int procNumber){
sem_wait(&Array.mutex);
Array.contatori[procNumber] = rand() % MAXWAITINGTIME + 1;
sem_post(&Array.mutex);
//Infitite while loop checking for 2 different condition
while (true) {
if(sem_trywait(&Array.risorseCondivise) == 0){ //Success
break;
}
if(sem_trywait(&Array.privProc[procNumber]) == 0){ //Success
break;
}
}
int ritorno;
sem_wait(&Array.mutex);
Array.contatori[procNumber] = NOTIMER; //Refresh timer
if(Array.risorseUtilizzate[0] == 0){
//Risorsa 0 libera
Array.risorseUtilizzate[0] = 1;
ritorno = 0;
}
else if(Array.risorseUtilizzate[1] == 0){
//Risorsa 1 libera
Array.risorseUtilizzate[1] = 1;
ritorno = 1;
}else {
//Svegliato ma senza risorse
ritorno = 2;
}
sem_post(&Array.mutex);
return ritorno;
}
void release(int numProc, int tempResource){
if(tempResource < 2){
//Se avevo occupato una risorsa la rilascio
sem_wait(&Array.mutex);
fprintf(stderr,"Processo: %d RILASCIA la risorsa %d\n", numProc, tempResource);
Array.risorseUtilizzate[tempResource] = 0;
sem_post(&Array.risorseCondivise);
sem_post(&Array.mutex);
}
}
void checkTick(time_t *lastTime){
if(time(NULL) - (*lastTime) > 0){
sem_wait(&Array.mutex);
fprintf(stderr,"Passato un secondo Orologio attivo, timers: [ ");
for (int i=0; i< PROCNUMBER; i++) {
if(Array.contatori[i] != NOTIMER){
Array.contatori[i]--;
if(Array.contatori[i] <= 0){
sem_post(&Array.privProc[i]);
}
}
fprintf(stderr,"%d ",Array.contatori[i]);
}
fprintf(stderr,"]\n");
sem_post(&Array.mutex);
(*lastTime)++;
}
}
void *bodyProc(void *arg){
int numProc = *((int *) arg);
for (;;) {
int tempResource = tryAcces(numProc);
if(tempResource < 2){
fprintf(stderr,"Processo: %d accede alla risorsa %d\n", numProc, tempResource);
pausetta(); // simulazione operazione su risorsa
}
else fprintf(stderr,"Processo: %d attivato ma senza risorse \n", numProc);
release(numProc, tempResource);
}
pthread_exit(0);
}
void *bodyOrologio(void *arg){
time_t lastTime = time(NULL);
for (;;) {
checkTick(&lastTime);
}
pthread_exit(0);
}
int main(){
//------------------ VARIABLES AND THREAD ------------------
pthread_attr_t myattr;
pthread_t threadOrologio;
pthread_t threadProc[PROCNUMBER];
int err;
void *res;
int num[INDEXARGS];
//------------------ INITIALIZATION RANDOM GENERATOR ------------------
srand(time(NULL));
//------------------ INITIALIZATION STRUTTURA CONDIVISA ------------------
init_Array(&Array);
//------------------ THREAD ATTRIBUTE INITIALIZATION ------------------
/* initializes the thread attribute */
pthread_attr_init(&myattr);
pthread_attr_setdetachstate(&myattr, PTHREAD_CREATE_DETACHED);
//------------------ THREAD CREATION ------------------
/* creation and activation of the new thread */
for (int i=0; i < INDEXARGS; i++) {
num[i] = i;
}
for (int i=0; i< PROCNUMBER; i++) {
err = pthread_create(&threadProc[i], &myattr, bodyProc, (void*) (&num[i]));
if(err) fprintf(stderr,"errore creazione thread processo: %u \n", i);
}
err = pthread_create(&threadOrologio, &myattr, bodyOrologio, NULL);
if(err) fprintf(stderr,"errore creazione thread Ricevente\n");
//------------------ THREAD ATTRIBUTE DESTRUCTION ------------------
pthread_attr_destroy(&myattr);
sleep(10); //Sleep 5 seconds before cancellation
return 0;
}
|
502cabc942c8da93354bda9ec1078669157ec6a7
|
b7aadab0189c7facd973e95e8b22adb4aee9e640
|
/network/Client/Client/RoomObserver.h
|
1fa160b5d8519b126e5c683695f55f85209771a9
|
[] |
no_license
|
LethalSun/CppAdvChatClient
|
cd460ac6d9343c52d1969a6c1120ce3140e60755
|
9dc19a2b71f6aaf5faf72df2d776999885b2d7e6
|
refs/heads/master
| 2021-01-19T04:45:59.894092
| 2017-07-20T02:28:27
| 2017-07-20T02:28:27
| 87,392,778
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 125
|
h
|
RoomObserver.h
|
#pragma once
namespace MDNetwork
{
class RoomObserver
{
public:
RoomObserver();
~RoomObserver();
private:
};
}
|
8a3e48dc0bd34b6b25602cbe11d7b46a0a3eeb7d
|
74b7d2e04a23f61a68485c43acfcb0678ca0b93b
|
/Source/Atrc/Mgr/Common.cpp
|
a5b1c82993e43992fea49e8356d6441bfbd5283a
|
[
"MIT"
] |
permissive
|
Ilinite/Atrc
|
bded8e19d60dbe32b7265e797bb0afab25551ca6
|
94db1512755eb4df1b01679bafbc60e471f03b42
|
refs/heads/master
| 2020-06-28T13:16:45.337518
| 2019-06-04T07:12:06
| 2019-06-04T07:12:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 436
|
cpp
|
Common.cpp
|
#include <filesystem>
#include <Atrc/Mgr/Common.h>
namespace Atrc::Mgr
{
std::string GetCacheFilename(std::string_view filename)
{
std::filesystem::path parent("./.agz.cache/");
for(auto &sec : relative(std::filesystem::path(filename)))
{
if(sec == "..")
parent.append("__lastlast");
else if(sec != ".")
parent /= sec;
}
return parent.string();
}
} // namespace Atrc::Mgr
|
b40db8ada36c2ad1b05258aeb6246b016d98307e
|
bad2e3ac4790e190b8f51e1278866311c9117a79
|
/decode_ways.cc
|
6461e783e8fd9d433818a4d9ef4951e411949611
|
[] |
no_license
|
JFantasy/leetcode
|
c0f475770204919057b1e5724b80300b9c7b26f8
|
ee083c00965fe26cf689d1c0555747868758f6a7
|
refs/heads/master
| 2021-11-13T15:18:57.366738
| 2015-01-14T07:51:32
| 2015-01-14T07:51:32
| 23,274,069
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 433
|
cc
|
decode_ways.cc
|
class Solution {
public:
int numDecodings(string s) const {
if (s.empty()) return 0;
vector<int> f(s.length() + 1);
f[0] = 1;
f[1] = (s[0] > '0');
for (int i = 2; i < f.length(); ++ i) { // i < f.length()
int val = (s[i - 2] - '0') * 10 + (s[i - 1] - '0');
f[i] = f[i - 1] * (s[i - 1] > '0') + f[i - 2] * (val >= 10 && val <= 26);
}
return f[f.length() - 1];
}
};
|
a8db3397f29392075884a8b4f8b18a686e04968d
|
149ac3661e61ce4b1bfb1b20f5100443ed0ea21e
|
/TiledLighting/source/BlendState.cpp
|
a137d029af13fcacbaa57824455cd4757410c098
|
[] |
no_license
|
djarksnd/MultiThreadedTiledLighting
|
d33626f09a0fd74212d454061f5a08b24b06f108
|
3ed51b6de14fdcdad109494c8a0b4f6371f59c5a
|
refs/heads/master
| 2023-06-07T20:02:27.629774
| 2023-05-31T19:46:28
| 2023-05-31T19:46:28
| 228,071,881
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 401
|
cpp
|
BlendState.cpp
|
#include <assert.h>
#include "BlendState.h"
bool BlendState::Create(ID3D11Device* device, const D3D11_BLEND_DESC& desc)
{
HRESULT result = device->CreateBlendState(&desc, &blendState);
if (FAILED(result))
{
assert(false && "failed to create BlendState");
return false;
}
return true;
}
void BlendState::Destroy()
{
if (blendState)
{
blendState->Release();
blendState = nullptr;
}
}
|
224f0f1daa25e5b603f809f7e50de060ba632767
|
5a35ec21bbf3d72aae64b7594cba32c6efd094e6
|
/008-string-to-integer-atoi/string-to-integer-atoi.cpp
|
7643d116dc40090b04dbc45e849a484d28585790
|
[] |
no_license
|
forever-gk/leetcode
|
743d490b2eff078e9b68b1f196cd0e26463e7cef
|
c8caa7bd12d764f73294fb8f1d1a2ce2c929ee62
|
refs/heads/master
| 2021-09-11T08:23:54.118857
| 2018-04-06T09:08:26
| 2018-04-06T09:08:26
| 119,938,835
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,291
|
cpp
|
string-to-integer-atoi.cpp
|
// Implement atoi to convert a string to an integer.
//
// Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.
//
// Notes: It is intended for this problem to be specified vaguely (ie, no given input specs). You are responsible to gather all the input requirements up front.
//
//
//
// Requirements for atoi:
//
// The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value.
//
// The string can contain additional characters after those that form the integral number, which are ignored and have no effect on the behavior of this function.
//
// If the first sequence of non-whitespace characters in str is not a valid integral number, or if no such sequence exists because either str is empty or it contains only whitespace characters, no conversion is performed.
//
// If no valid conversion could be performed, a zero value is returned. If the correct value is out of the range of representable values, INT_MAX (2147483647) or INT_MIN (-2147483648) is returned.
//
class Solution {
public:
int myAtoi(string str) {
long result = 0;
int pos = 0;
bool negetive = false;
bool oor = false;
for (pos = 0; pos < str.size(); ++pos) {
//stripe whitespace
if (str[pos] == ' ') {
continue;
} else if (str[pos] == '-') {
negetive = true;
pos++;
} else if (str[pos] == '+') {
pos++;
}
break;
}
for (int i = pos; i < str.size(); ++i) {
if ((str[i] - '0') < 10 && (str[i] - '0') >= 0) {
result = result * 10 + (str[i] - '0');
oor = negetive ? 0-result <= INT_MIN : result >=INT_MAX;
if (oor)
return negetive ? INT_MIN : INT_MAX;
} else {
break;
}
}
return negetive ? 0 - result : result;
}
};
|
507a5d84c0572c7b9d7fc8c0ea78293733b4be7c
|
7d9bfa418c5862f398d4c2865409fa42a924ed46
|
/Pi-Duino/old/calc/src/sketch.ino
|
b7aceb78741bd771cf65dae87509275b77855cea
|
[] |
no_license
|
Shishir-rmv/DuckieTeam1
|
c3238113c39989129569b4fcf5b6c7fd8f648c83
|
5e8e4aaf3446b26f4caf8d765ec4c0ad6ae162c7
|
refs/heads/master
| 2020-03-31T18:56:14.721722
| 2018-12-15T01:20:00
| 2018-12-15T01:20:00
| 152,478,977
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 560
|
ino
|
sketch.ino
|
int r = 1;
void setup(){
Serial.begin(9600);
}
void loop(){
if(Serial.available()){ //From RPi to Arduino
String input = Serial.readString();
String opStr = input.substring(0,3);
int op1 = input.substring(3,4).toInt();
int op2 = input.substring(4,5).toInt();
int res = 0;
if(opStr.equals("add"))
{
res = op1 + op2;
Serial.println(res);
}
else if(opStr.equals("mul"))
{
res = op1 * op2;
Serial.println(res);
}
else{
Serial.println("err");
}
}
}
|
e0652194ecb87ff13b3f6f8b61ede9aab87dc7d3
|
f61b11e6850e080e12ca4cddf00f3491e296b562
|
/Vector/src/tests/VectorTest.cpp
|
2ca7d9653df08f1ba11c5ec049703ec5407176de
|
[
"Apache-2.0"
] |
permissive
|
aidan-clyens/Arduino_Data_Structures
|
7df18dd8bbc48c74d983f1c0e2ce97c710e92b42
|
5c5659c028de69c1b866c0baa9629a57f1764a34
|
refs/heads/master
| 2020-03-18T07:22:36.371634
| 2019-04-22T14:55:34
| 2019-04-22T14:55:34
| 134,448,407
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,114
|
cpp
|
VectorTest.cpp
|
#include <gtest/gtest.h>
#include "../Vector.h"
class VectorTest : public testing::Test {
public:
VectorTest() {}
virtual ~VectorTest() {}
};
TEST(VectorTest, Initialize) {
vector<int> vec;
vector<int> vec2(32);
ASSERT_EQ(0, vec.size());
ASSERT_EQ(1, vec.empty());
ASSERT_EQ(16, vec.capacity());
ASSERT_EQ(0, vec2.size());
ASSERT_EQ(1, vec2.empty());
ASSERT_EQ(32, vec2.capacity());
}
TEST(VectorTest, PushBack) {
vector<int> vec;
vec.push_back(1);
vec.push_back(2);
vec.push_back(3);
vec.push_back(4);
vec.push_back(5);
vec.push_back(6);
vec.push_back(7);
ASSERT_EQ(7, vec.size());
ASSERT_EQ(0, vec.empty());
ASSERT_EQ(16, vec.capacity());
ASSERT_EQ(1, vec.front());
ASSERT_EQ(7, vec.back());
ASSERT_EQ(3, vec.at(2));
ASSERT_EQ(3, vec[2]);
ASSERT_EQ(5, vec.at(4));
ASSERT_EQ(5, vec[4]);
}
TEST(VectorTest, PopBack) {
vector<int> vec;
vec.push_back(1);
vec.push_back(2);
vec.push_back(3);
vec.push_back(4);
vec.push_back(5);
vec.push_back(6);
vec.push_back(7);
vec.pop_back();
vec.pop_back();
vec.pop_back();
ASSERT_EQ(4, vec.size());
ASSERT_EQ(0, vec.empty());
ASSERT_EQ(16, vec.capacity());
ASSERT_EQ(1, vec.front());
ASSERT_EQ(4, vec.back());
}
TEST(VectorTest, IncreaseCapacity) {
vector<int> vec;
for (int i = 0; i < 20; i++) {
vec.push_back(i);
}
ASSERT_EQ(20, vec.size());
ASSERT_EQ(0, vec.empty());
ASSERT_EQ(32, vec.capacity());
ASSERT_EQ(0, vec.front());
ASSERT_EQ(19, vec.back());
}
TEST(VectorTest, DecreaseCapacity) {
vector<int> vec(32);
for (int i = 0; i < 25; i++) {
vec.push_back(i);
}
for (int i = 0; i < 18; i++) {
vec.pop_back();
}
ASSERT_EQ(7, vec.size());
ASSERT_EQ(0, vec.empty());
ASSERT_EQ(16, vec.capacity());
ASSERT_EQ(0, vec.front());
ASSERT_EQ(6, vec.back());
}
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
|
32b18d0fc3456de5a5672cf2f03de90f6e55cfb8
|
1186e892a29f85d653379c5b87b04736dbb8b1fb
|
/C Programs/C Programs - 6/Cleaning Up.cpp
|
9632a9dd1df94307857649b9dea1662fd779483f
|
[] |
no_license
|
MathProgrammer/CodeChef
|
1f4a2963cf60b3386861f1935b1642580f595c32
|
b9750e56ee6e307e5f60a43d7682105fd99fcf1b
|
refs/heads/master
| 2023-05-10T16:05:59.958225
| 2023-05-06T13:17:13
| 2023-05-06T13:17:13
| 88,233,956
| 22
| 23
| null | 2020-10-03T07:38:36
| 2017-04-14T04:50:44
|
C++
|
UTF-8
|
C++
| false
| false
| 1,182
|
cpp
|
Cleaning Up.cpp
|
#include <stdio.h>
#include <vector>
using namespace std;
void solve()
{
int number_of_jobs, number_of_complete_jobs, number_of_incomplete_jobs, i, job_i, remaining_job_counter = 1;
scanf("%d %d", &number_of_jobs, &number_of_complete_jobs);
number_of_incomplete_jobs = number_of_jobs - number_of_complete_jobs;
vector <int> completed_jobs(number_of_jobs + 1, false);
vector <int> remaining_jobs(number_of_incomplete_jobs + 1);
for(i = 1; i <= number_of_complete_jobs ; i++)
{
scanf("%d", &job_i);
completed_jobs[job_i] = true;
}
for(i = 1; i <= number_of_jobs; i++)
if(completed_jobs[i] == false)
remaining_jobs[remaining_job_counter++] = i;
//Chef's Jobs
for(i = 1; i <= number_of_incomplete_jobs ; i += 2)
printf("%d ", remaining_jobs[i]);
printf("\n");
//Assistant
for(i = 2; i <= number_of_incomplete_jobs; i += 2)
printf("%d ", remaining_jobs[i]);
printf("\n");
}
int main()
{
int no_of_test_cases;
scanf("%d", &no_of_test_cases);
while(no_of_test_cases--)
solve();
return 0;
}
|
7a8a522d528890cbe28ab41d40299bedadf13dae
|
23bc77c2da5f8072e2e0cd2f49aab80ba6206598
|
/Source/sprawdz_wyniki.cpp
|
ee2bf10637c9be482c4905ed775d2599b89f0ce9
|
[] |
no_license
|
winiarz/magisterka
|
3cd11dff4c59e8b5cc50d39c4d064aa3181ca577
|
ceef354b496103363f58554e68c58de9a9c706ad
|
refs/heads/master
| 2021-01-23T08:56:32.348689
| 2015-06-06T18:05:17
| 2015-06-06T18:05:17
| 21,146,701
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,354
|
cpp
|
sprawdz_wyniki.cpp
|
#include "main.hpp"
int sprawdzWyniki(float* wynikiX, float* wynikiY, float* wynikiZ, float** daneTesoweCpu)
{
int iloscBledow=0;
for (uint i=0; i<c_N; i++)
{
if ( fabs(wynikiX[i] - daneTesoweCpu[6][i]) > dopuszczalnyBlad )
{
cout << "Nieprawidlowy wynik!: X[" << i << "] = " << wynikiX[i] << " a powien byc " << daneTesoweCpu[6][i] << endl;
cout << "blad = " << fabs(wynikiX[i] - daneTesoweCpu[6][i]) << " > " << dopuszczalnyBlad << endl;
iloscBledow++;
}
if ( fabs(wynikiY[i] - daneTesoweCpu[7][i]) > dopuszczalnyBlad )
{
cout << "Nieprawidlowy wynik!: Y[" << i << "] = " << wynikiY[i] << " a powien byc " << daneTesoweCpu[7][i] << endl;
cout << "blad = " << fabs(wynikiY[i] - daneTesoweCpu[7][i]) << " > " << dopuszczalnyBlad << endl;
iloscBledow++;
}
if ( fabs(wynikiZ[i] - daneTesoweCpu[8][i]) > dopuszczalnyBlad )
{
cout << "Nieprawidlowy wynik!: Z[" << i << "] = " << wynikiZ[i] << " a powien byc " << daneTesoweCpu[8][i] << endl;
cout << "blad = " << fabs(wynikiZ[i] - daneTesoweCpu[8][i]) << " > " << dopuszczalnyBlad << endl;
iloscBledow++;
}
if ( iloscBledow >= maxBledow )
return 0;
}
return 1;
}
|
c4c9ebccdf6899c7e220ba1d3792640d5ed74e53
|
5c3db0a68b8689420293e78216870582cf53c0e1
|
/prim/prim.cpp
|
da7aca03d900b40443dc8b209f4b8afd08e0f032
|
[] |
no_license
|
thisloving/algorithm
|
c9307942f7c9ea94038e77ea65662bc8de9e4cef
|
80edbdc6d9f82fc8fb5d25b8cb7a2461ed159d7c
|
refs/heads/master
| 2023-04-12T23:08:18.760530
| 2021-04-19T03:37:01
| 2021-04-19T03:37:01
| 274,785,433
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,775
|
cpp
|
prim.cpp
|
#include <iostream>
#include <map>
#include <vector>
#include <queue>
#include <stack>
#include <climits>
using namespace std;
const static int kVertexNum = 7;
struct Edge {
Edge(): src(0), dst(0), weight(0)
{}
int src, dst, weight;
};
struct cmp {
bool operator() (const Edge& a, const Edge& b) const {
return a.weight > b.weight;
}
};
class Graph {
public:
Graph()
{}
public:
void AddEdge(int src, int dst, int weight);
void Initialize();
void Prim(int start);
private:
std::map<int, std::vector<struct Edge> > vertexs;
std::priority_queue<struct Edge, std::vector<struct Edge>, cmp> p;
int distance[kVertexNum];
std::map<int, struct Edge> path;
};
void Graph::AddEdge(int src, int dst, int weight) {
{
Edge e;
e.src = src;
e.dst = dst;
e.weight = weight;
vertexs[e.src].push_back(e);
}
{
Edge e;
e.src = dst;
e.dst = src;
e.weight = weight;
vertexs[e.src].push_back(e);
}
}
void Graph::Initialize() {
AddEdge(0, 1, 1);
AddEdge(1, 2, 2);
AddEdge(2, 3, 3);
AddEdge(3, 4, 4);
AddEdge(4, 5, 5);
AddEdge(5, 6, 6);
AddEdge(6, 4, 7);
AddEdge(6, 3, 8);
AddEdge(5, 3, 9);
AddEdge(3, 1, 10);
AddEdge(2, 0, 11);
AddEdge(3, 0, 12);
for (int i = 0; i < kVertexNum; i++) {
distance[i] = INT_MAX;
}
}
void Graph::Prim(int start) {
struct Edge e;
e.src = start;
e.dst = start;
e.weight = 0;
this->p.push(e);
this->distance[start] = 0;
while(!p.empty()) {
struct Edge v = this->p.top();
this->p.pop();
std::map<int, struct Edge>::iterator iter = this->path.find(v.dst);
if (iter != this->path.end()) {
continue;
}
this->path[v.dst] = v;
while (!p.empty()) {
this->p.pop();
}
int weight = 0;
iter = this->path.begin();
for (; iter != this->path.end(); ++iter) {
std::map<int, std::vector<struct Edge> >::iterator iter1st =
vertexs.find(iter->first);
if (iter1st == vertexs.end()) {
continue;
}
std::vector<struct Edge>::iterator iter2nd = iter1st->second.begin();
for (; iter2nd != iter1st->second.end(); ++iter2nd) {
if (this->path.find(iter2nd->dst) != this->path.end()) {
continue;
}
struct Edge n;
n.src = iter2nd->src;
n.dst = iter2nd->dst;
n.weight = iter2nd->weight;
this->p.push(n);
}
}
}
std::map<int, struct Edge>::iterator iter = this->path.begin();
for (; iter != this->path.end(); ++iter) {
if (iter->second.dst == iter->second.src) {
continue;
}
cout << "dst:" << iter->first << " src:" << iter->second.src << " weight:" << iter->second.weight << endl;
}
}
int main()
{
Graph graph;
graph.Initialize();
graph.Prim(6);
}
|
9bf7fbbd8c46a3f8c231e979d4e2bb9a72fe25cc
|
9b83b05ee31f55a80706730394dc6e54456d6634
|
/src/plugins/clangtools/clangtoolsdiagnosticmodel.h
|
695cd088e51de58d7aa7000402d2138f749bbf44
|
[] |
no_license
|
nahongyan/QtCreator
|
c49f6782f7407233abdb96f5cec823e855550f0a
|
a8a361f6057d3f79bd0ba05575e2958d498a7e14
|
refs/heads/master
| 2023-01-24T21:46:18.797698
| 2020-12-01T12:03:24
| 2020-12-01T12:03:24
| 317,527,105
| 2
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,361
|
h
|
clangtoolsdiagnosticmodel.h
|
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include "clangfixitsrefactoringchanges.h"
#include "clangtoolsdiagnostic.h"
#include "clangtoolsprojectsettings.h"
#include "clangtoolsutils.h"
#include <debugger/analyzer/detailederrorview.h>
#include <utils/fileutils.h>
#include <utils/optional.h>
#include <utils/treemodel.h>
#include <QFileSystemWatcher>
#include <QPointer>
#include <QSortFilterProxyModel>
#include <QVector>
#include <functional>
#include <map>
#include <memory>
namespace ProjectExplorer { class Project; }
namespace ClangTools {
namespace Internal {
class ClangToolsDiagnosticModel;
class FilePathItem : public Utils::TreeItem
{
public:
FilePathItem(const QString &filePath);
QVariant data(int column, int role) const override;
private:
const QString m_filePath;
};
class DiagnosticMark;
class DiagnosticItem : public Utils::TreeItem
{
public:
using OnFixitStatusChanged
= std::function<void(const QModelIndex &index, FixitStatus oldStatus, FixitStatus newStatus)>;
DiagnosticItem(const Diagnostic &diag,
const OnFixitStatusChanged &onFixitStatusChanged,
ClangToolsDiagnosticModel *parent);
~DiagnosticItem() override;
const Diagnostic &diagnostic() const { return m_diagnostic; }
FixitStatus fixItStatus() const { return m_fixitStatus; }
void setFixItStatus(const FixitStatus &status);
bool hasNewFixIts() const;
ReplacementOperations &fixitOperations() { return m_fixitOperations; }
void setFixitOperations(const ReplacementOperations &replacements);
bool setData(int column, const QVariant &data, int role) override;
private:
Qt::ItemFlags flags(int column) const override;
QVariant data(int column, int role) const override;
private:
const Diagnostic m_diagnostic;
OnFixitStatusChanged m_onFixitStatusChanged;
ReplacementOperations m_fixitOperations;
FixitStatus m_fixitStatus = FixitStatus::NotAvailable;
ClangToolsDiagnosticModel *m_parentModel = nullptr;
TextEditor::TextMark *m_mark = nullptr;
};
class ExplainingStepItem;
using ClangToolsDiagnosticModelBase
= Utils::TreeModel<Utils::TreeItem, FilePathItem, DiagnosticItem, ExplainingStepItem>;
class ClangToolsDiagnosticModel : public ClangToolsDiagnosticModelBase
{
Q_OBJECT
friend class DiagnosticItem;
public:
ClangToolsDiagnosticModel(QObject *parent = nullptr);
void addDiagnostics(const Diagnostics &diagnostics);
QSet<Diagnostic> diagnostics() const;
enum ItemRole {
DiagnosticRole = Debugger::DetailedErrorView::FullTextRole + 1,
TextRole,
CheckBoxEnabledRole,
DocumentationUrlRole,
};
QSet<QString> allChecks() const;
void clear();
void removeWatchedPath(const QString &path);
void addWatchedPath(const QString &path);
signals:
void fixitStatusChanged(const QModelIndex &index, FixitStatus oldStatus, FixitStatus newStatus);
private:
void connectFileWatcher();
void updateItems(const DiagnosticItem *changedItem);
void onFileChanged(const QString &path);
void clearAndSetupCache();
private:
QHash<QString, FilePathItem *> m_filePathToItem;
QSet<Diagnostic> m_diagnostics;
std::map<QVector<ExplainingStep>, QVector<DiagnosticItem *>> stepsToItemsCache;
std::unique_ptr<QFileSystemWatcher> m_filesWatcher;
};
class FilterOptions {
public:
QSet<QString> checks;
};
using OptionalFilterOptions = Utils::optional<FilterOptions>;
class DiagnosticFilterModel : public QSortFilterProxyModel
{
Q_OBJECT
public:
DiagnosticFilterModel(QObject *parent = nullptr);
void setProject(ProjectExplorer::Project *project);
void addSuppressedDiagnostics(const SuppressedDiagnosticsList &diags);
void addSuppressedDiagnostic(const SuppressedDiagnostic &diag);
ProjectExplorer::Project *project() const { return m_project; }
OptionalFilterOptions filterOptions() const;
void setFilterOptions(const OptionalFilterOptions &filterOptions);
void onFixitStatusChanged(const QModelIndex &sourceIndex,
FixitStatus oldStatus,
FixitStatus newStatus);
void reset();
int diagnostics() const { return m_diagnostics; }
int fixitsScheduable() const { return m_fixitsScheduable; }
int fixitsScheduled() const { return m_fixitsScheduled; }
signals:
void fixitCountersChanged(int scheduled, int scheduableTotal);
private:
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
bool lessThan(const QModelIndex &l, const QModelIndex &r) const override;
struct Counters {
int diagnostics = 0;
int fixits = 0;
};
Counters countDiagnostics(const QModelIndex &parent, int first, int last) const;
void handleSuppressedDiagnosticsChanged();
QPointer<ProjectExplorer::Project> m_project;
Utils::FilePath m_lastProjectDirectory;
SuppressedDiagnosticsList m_suppressedDiagnostics;
OptionalFilterOptions m_filterOptions;
int m_diagnostics = 0;
int m_fixitsScheduable = 0;
int m_fixitsScheduled = 0;
};
} // namespace Internal
} // namespace ClangTools
|
9880222017baefafb0ce747c6c659933db4adb2b
|
fb6251837c15a0ee0b28b15d214599165e11de83
|
/URI/1113-Ascending and Descending.cpp
|
e8068513cb6155c58326b1a7fb581b8bd79a531f
|
[] |
no_license
|
CDPS/Competitive-Programming
|
de72288b8dc02ca2a45ed40491ce1839e983b765
|
24c046cbde7fea04a6c0f22518a688faf7521e2e
|
refs/heads/master
| 2023-08-09T09:57:15.368959
| 2023-08-05T00:44:41
| 2023-08-05T00:44:41
| 104,966,014
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 277
|
cpp
|
1113-Ascending and Descending.cpp
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
while(scanf("%d %d",&n,&m)){
if(n==m)
break;
if(n<m)
printf("Crescente\n");
else if(n>m)
printf("Decrescente\n");
}
return 0;
}
|
225153fdf3cb219b3d83656fa70a0e2577f7cd4b
|
ececbde36cb769a89843c8bed2a2dc549ace9337
|
/new/Macros/newLogLikFitter_book2DHistograms.h
|
83fdf2aa2f9ca1e1cf1b824afb43a6b087c5a040
|
[] |
no_license
|
edbird/150Nd
|
0121dc45fd1ff1df79b723393b49ea85114e0684
|
4c21f5651ac5d6a41281d6a1e089a7efa2a4fda1
|
refs/heads/master
| 2023-01-10T14:53:42.124439
| 2020-07-17T18:38:27
| 2020-07-17T18:38:27
| 263,668,541
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 9,444
|
h
|
newLogLikFitter_book2DHistograms.h
|
#ifndef NEWLOGLIKFITTER_BOOK2DHISTOGRAMS_H
#define NEWLOGLIKFITTER_BOOK2DHISTOGRAMS_H
///////////////////////////////////////////////////////////////////////////////
// book2DHistograms
///////////////////////////////////////////////////////////////////////////////
void book2DHistograms_helper(
TFile *myFile,
Int_t channel_counter,
TString theChannel,
TString thePhase_arg,
TString theHistogram,
const int nBkgs,
TString *BkgFiles)
//, TH1D *tmpHist)
{
TH2D *tmpHist = nullptr;
for(int i = 0; i < nBkgs; i++)
{
// check if parameter is enabled
// convert parameter string name to index
// convert TString to std::string
std::string mc_name = std::string(BkgFiles[i]);
// example: "bi214_int_rot" -> "bi214_int_rot,pb214_int_rot"
std::string search_object = MCNameToParamNameMap.at(mc_name);
// example: "bi214_int_rot,pb214_int_rot" -> 4
// check if parameter number exists
// (was defined by parameter_names.lst)
if(paramNameToNumberMap.count(search_object) > 0)
{
// convert from mc sample name to param number
int param_number = paramNameToNumberMap.at(search_object);
// check if this parameter number is enabled
if(std::find(enabled_params.begin(), enabled_params.end(), param_number) != enabled_params.end())
{
// TODO:
//std::string directory("scaled/hHighLowEnergy_/");
std::string directory("scaled/" + theHistogram + "/");
std::string name(theHistogram + BkgFiles[i] + "_fit_scaled");
std::string fullname = directory + name;
std::string new_name(theHistogram + BkgFiles[i] + "_fit");
std::cout << "fullname=" << fullname << std::endl;
// TODO: try catch block
// load sample
tmpHist = (TH2D*)myFile->Get(fullname.c_str())->Clone(new_name.c_str());
if(tmpHist != nullptr)
{
// scale by activity
// convert parameter number to minuit parameter number
//minuit_param_number = paramNumberToMinuitParamNumberMap.at(param_number);
// TODO: change such that samples are pre-scaled by activity input value
// get initial parameter values and error
Double_t param_init_value = 0.;
Double_t param_init_error = 0.;
get_paramInitValueError(thePhase, param_number, param_init_value, param_init_error);
/*
if(thePhase == 0)
{
param_init_value = paramInitValueP1Map[param_number];
param_init_error = paramInitErrorP1Map[param_number];
}
else if(thePhase == 1)
{
param_init_value = paramInitValueP2Map[param_number];
param_init_error = paramInitErrorP2Map[param_number];
}
else
{
std::cout << "ERROR: Invalid value for thePhase: thePhase=" << thePhase << std::endl;
}
*/
Double_t scale_factor = param_init_value;
// account for 208 Tl branching ratio of 36 %
// TODO: should I move this into fit_2e code
// and apply using ->Fill() function call with
// weight = 0.36
if(mc_name == std::string("tl208_int_rot") ||
mc_name == std::string("tl208_feShield") ||
mc_name == std::string("tl208_pmt"))
// TODO: do not apply to tl208_air ?
{
//std::cout << "mc_name=" << mc_name << " applying additional scaling factor of 0.36" << std::endl;
//std::cin.get();
scale_factor *= 0.36;
}
// NOTE: TODO
// possible flaw with this method: error is no longer
// pre-set using values from input file
// TODO: note this in input file documentation
// however, this may be an improvement because it
// guarantees minuit is responsible for error estimation
tmpHist->Scale(scale_factor);
// samples are now scaled by activity
// changed input, and pre-scaling, now need to change output
// NOTE: do NOT apply xi reweighting here
// this section just LOADS histograms from file and we want to LOAD
// the default (not reweighted) nd150 spectra
allMCSamples2D[channel_counter]->Add(tmpHist);
// TODO: does this work as expected for secular equlibrium samples?
//std::cout << tmpHist->GetName() << std::endl;
}
else
{
std::cout << "could not find histogram in file: " << fullname << " - disabling parameter number " << param_number << std::endl;
// cannot find histogram input data, so disable parameter
std::remove(enabled_params.begin(), enabled_params.end(), param_number);
}
}
else
{
// paramter not enabled, do not load histogram/sample
std::cout << "parameter number " << param_number << " is not enabled (not found in vector)" << std::endl;
}
}
else
{
std::cout << "!!!!! ERROR: search_object=" << search_object << " not found in paramNameToNumberMap" << std::endl;
std::cout << "mc_name=" << mc_name << std::endl;
print_map(paramNameToNumberMap, "paramNameToNumberMap");
print_map(MCNameToParamNameMap, "MCNameToParamNameMap");
}
}
}
// channel_counter = 0
// theChannel = "2e_"
// thePhase = "P1"
// theHistogram = "hHighLowEnergy_"
void book2DHistograms(Int_t channel_counter, TString theChannel, TString thePhase_arg, TString theHistogram) {
std::cout << "booking 2D hists for " << theChannel << " " << thePhase_arg << std::endl;
allMCSamples2D[channel_counter] = new TObjArray();
TFile *aFile = TFile::Open("Nd150_" + theChannel + thePhase_arg + ".root");
std::cout << "External" << std::endl;
book2DHistograms_helper(aFile, channel_counter, theChannel,
thePhase_arg, theHistogram,
nExternalBkgs,
ExternalBkgFiles);
std::cout << "Internal" << std::endl;
book2DHistograms_helper(aFile, channel_counter, theChannel,
thePhase_arg, theHistogram,
nInternalBkgs,
InternalBkgFiles);
std::cout << "Rn 222" << std::endl;
book2DHistograms_helper(aFile, channel_counter, theChannel,
thePhase_arg, theHistogram,
nRn222Bkgs,
//Rn222BkgFiles);//,
Rn222BkgFilesNew);
std::cout << "Rn 220" << std::endl;
book2DHistograms_helper(aFile, channel_counter, theChannel,
thePhase_arg, theHistogram,
nRn220Bkgs,
Rn220BkgFiles);
std::cout << "Neighbour" << std::endl;
book2DHistograms_helper(aFile, channel_counter, theChannel,
thePhase_arg, theHistogram,
nNeighbours,
NeighbourFiles);
std::cout << "Nd150" << std::endl;
book2DHistograms_helper(aFile, channel_counter, theChannel,
thePhase_arg, theHistogram,
nNd150Samples,
Nd150Files);
// TODO here
// what is name in other section of code
//std::string name(theHistogram + "data_2e");
std::string directory("processeddata/" + theHistogram + "/");
std::string name(theHistogram + "data_2e");
//std::string fake_data_name(theHistogram + "data_2e_fake");
std::string fullname = directory + name;
std::cout << "fullname=" << fullname << std::endl;
// load histogram from file
// TODO: try catch block
TH1D *tmpHist = (TH1D*)aFile->Get(fullname.c_str())->Clone();
if(tmpHist != nullptr)
{
//TH1D *tmpHist = nullptr;
// 2020-04-03: removed changing of histogram name
//std::string hist_name("data_" + theChannel + thePhase_arg);
//std::cout << "Get() : " << name << " from file, Clone() : " << hist_name << std::endl;
//tmpHist = (TH1D*)gDirectory->Get(name.c_str())->Clone(hist_name.c_str());
//tmpHist = (TH1D*)gDirectory->Get(fullname.c_str())->Clone();
allDataSamples2D->Add((TH1D*)tmpHist);
}
else
{
std::cout << "gDirectory->GetListOfKeys() does not contain " << fullname << std::endl;
}
// aFile->Close();
// aFile->Delete();
}
#endif // NEWLOGLIKFITTER_BOOK2DHISTOGRAMS_H
|
795e153a66e8af045e9a10b809d4f1479588554f
|
13d93c2922005af35056d015f1ae3ebebe05ee31
|
/uc_projets/openchrono/qprogressbar_gradient/qprogressbar_gradient.cpp
|
ca99093c38425faf3b3b5b5ccd99238c3786ec98
|
[] |
no_license
|
scls19fr/openphysic
|
647cc2cdadbdafd050d178e02bc3873bd2b07445
|
67bdb548574f4feecb99b60995238f12f4ef26da
|
refs/heads/master
| 2021-04-30T23:16:26.197961
| 2020-11-16T20:21:17
| 2020-11-16T20:21:17
| 32,207,155
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,042
|
cpp
|
qprogressbar_gradient.cpp
|
/*
QProgressBar with gradient
Copyright (C) 2007 Sebastien CELLES
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "qprogressbar_gradient.h"
QProgressBar_Gradient::QProgressBar_Gradient()
{
}
QProgressBar_Gradient::QProgressBar_Gradient(QGradient * gradient)
{
set_gradient(gradient);
}
void QProgressBar_Gradient::set_gradient(QGradient * gradient)
{
m_gradient = gradient;
}
|
79cd22dd8f212f239525ff5abb62534fd768e5e7
|
6edb11d5782492565cd251266927859b62d1d49b
|
/第17章 标准库特殊设施/tuple/17.4 findBook函数.cpp
|
998170a379a5943f71cd1c083c6a3b1b63e2951f
|
[] |
no_license
|
a1anpro/myCpp-Primer
|
9253ab86fbdd55996dc2e7709a3ac87e9f98015a
|
f7cef1a950b79fc01256dc4bb80a9b80573ecc95
|
refs/heads/master
| 2021-01-15T21:30:32.131806
| 2017-09-03T01:18:51
| 2017-09-03T01:18:51
| 99,871,225
| 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 242
|
cpp
|
17.4 findBook函数.cpp
|
#include <iostream>
#include <numeric>
#include <tuple>
#include <vector>
using namespace std;
//统计多个书店中,某一本书的销售情况;返回的是tuple<size_t, vector<Sales_data>::iterator,...>
int main(){
return 0;
}
|
b2c332501e9c00bf5efe8a905d46387e1d175b4b
|
877fff5bb313ccd23d1d01bf23b1e1f2b13bb85a
|
/app/src/main/cpp/dir7941/dir7942/dir8062/dir8063/dir8254/dir8381/file8395.cpp
|
8101aacce53dbe2393ee738144816d575fcdc457
|
[] |
no_license
|
tgeng/HugeProject
|
829c3bdfb7cbaf57727c41263212d4a67e3eb93d
|
4488d3b765e8827636ce5e878baacdf388710ef2
|
refs/heads/master
| 2022-08-21T16:58:54.161627
| 2020-05-28T01:54:03
| 2020-05-28T01:54:03
| 267,468,475
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 111
|
cpp
|
file8395.cpp
|
#ifndef file8395
#error "macro file8395 must be defined"
#endif
static const char* file8395String = "file8395";
|
81fdbc16f7db0e3d8b1cf841b29c250ad3b06505
|
1fe10ee5e34cd76067c720ef4b4a054f6107b286
|
/mobile/mobile/src/chill/browser/banners/app_banner_data_fetcher.h
|
58a400464d9a12b66b3597e03869731e1680ac4d
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
bopopescu/ofa
|
9f001c4f36b07fa27347ade37337422fd6719dcc
|
84e319101d4a1200657337dcdf9ed3857fc59e03
|
refs/heads/master
| 2021-06-14T08:53:05.865737
| 2017-04-03T12:50:44
| 2017-04-03T12:50:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,984
|
h
|
app_banner_data_fetcher.h
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Modified by Opera Software ASA
// @copied-from chromium/src/chrome/browser/banners/app_baner_data_fetcher.h
// @final-synchronized
#ifndef CHILL_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_
#define CHILL_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_
#include <string>
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/time/time.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/manifest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerPromptReply.h"
namespace opera {
// Fetches data required to show a web app banner for the URL currently shown by
// the WebContents.
class AppBannerDataFetcher
: public base::RefCounted<AppBannerDataFetcher>,
public content::WebContentsObserver {
public:
class Delegate {
public:
virtual void ShowBanner(const SkBitmap* icon,
bool is_showing_first_time) = 0;
};
// Returns the current time.
static base::Time GetCurrentTime();
AppBannerDataFetcher(content::WebContents* web_contents,
const base::WeakPtr<Delegate>& weak_delegate,
int ideal_icon_size_in_dp,
int minimum_icon_size_in_dp);
// Begins creating a banner for the URL being displayed by the Delegate's
// WebContents.
void Start(const GURL& validated_url, ui::PageTransition transition_type);
// Stops the pipeline when any asynchronous calls return.
void Cancel();
// Returns whether or not the pipeline has been stopped.
bool is_active() { return is_active_; }
// Returns whether the beforeinstallprompt Javascript event was canceled.
bool was_canceled_by_page() { return was_canceled_by_page_; }
// Returns whether the page has validly requested that the banner be shown
// by calling prompt() on the beforeinstallprompt Javascript event.
bool page_requested_prompt() { return page_requested_prompt_; }
// Returns the type of transition which triggered this fetch.
ui::PageTransition transition_type() { return transition_type_; }
// Returns the URL that kicked off the banner data retrieval.
const GURL& validated_url() { return validated_url_; }
// Returns the Manifest structure containing webapp information.
const content::Manifest& web_app_data() { return web_app_data_; }
// WebContentsObserver overrides.
void WebContentsDestroyed() override;
void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) override;
bool OnMessageReceived(const IPC::Message& message,
content::RenderFrameHost* render_frame_host) override;
private:
~AppBannerDataFetcher() override;
// Return a string describing what type of banner is being created. Used when
// alerting websites that a banner is about to be created.
std::string GetBannerType();
// Called after the manager sends a message to the renderer regarding its
// intention to show a prompt. The renderer will send a message back with the
// opportunity to cancel.
void OnBannerPromptReply(content::RenderFrameHost* render_frame_host,
int request_id,
blink::WebAppBannerPromptReply reply,
std::string referrer);
// Called when the client has prevented a banner from being shown, and is
// now requesting that it be shown later.
void OnRequestShowAppBanner(content::RenderFrameHost* render_frame_host,
int request_id);
// Called when it is determined that the webapp has fulfilled the initial
// criteria of having a manifest and a service worker.
void OnHasServiceWorker(content::WebContents* web_contents);
content::WebContents* GetWebContents();
std::string GetAppIdentifier();
int event_request_id() { return event_request_id_; }
// Fetches the icon at the given URL asynchronously, returning |false| if a
// load could not be started.
bool FetchAppIcon(content::WebContents* web_contents, const GURL& url);
// Records that a banner was shown. The |event_name| corresponds to the RAPPOR
// metric being recorded.
void RecordDidShowBanner();
// Callbacks for data retrieval.
void OnDidGetManifest(const GURL& manifest_url,
const content::Manifest& manifest);
void OnDidCheckHasServiceWorker(bool has_service_worker);
void OnAppIconFetched(const SkBitmap& bitmap);
// Returns whether the webapp was already installed or blocked.
bool IsWebAppInstalledOrBlocked();
// Record that the banner could be shown at this point, if the triggering
// heuristic allowed.
void RecordCouldShowBanner();
// Returns whether the banner should be shown.
bool CheckIfShouldShowBanner();
// Returns whether the fetcher is active and web contents have not been
// closed.
bool CheckFetcherIsStillAlive(content::WebContents* web_contents);
// Returns whether the given Manifest is following the requirements to show
// a web app banner.
static bool IsManifestValidForWebApp(const content::Manifest& manifest);
base::WeakPtr<Delegate> weak_delegate_;
const int ideal_icon_size_in_dp_;
const int minimum_icon_size_in_dp_;
bool is_active_;
bool was_canceled_by_page_;
bool page_requested_prompt_;
ui::PageTransition transition_type_;
int event_request_id_;
std::unique_ptr<SkBitmap> app_icon_;
std::string referrer_;
GURL validated_url_;
content::Manifest web_app_data_;
friend class base::RefCounted<AppBannerDataFetcher>;
DISALLOW_COPY_AND_ASSIGN(AppBannerDataFetcher);
};
} // namespace opera
#endif // CHILL_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_
|
610024cfa1b6973e4ea1d2e9e56efd391b4d365c
|
3e7f198802e3942a518dbb0446ae7f0519343150
|
/source/common/packet_dump.h
|
76ebc5927400c8d9997478756a8f68e7d7505904
|
[] |
no_license
|
stitchpvp/world
|
8e10942ffce22b1d23ddafed947639985fdd03bc
|
2954941579e78e0d0be9607df1d5dc2de719c938
|
refs/heads/master
| 2021-06-12T02:46:32.254064
| 2019-10-19T05:02:31
| 2019-10-19T05:02:31
| 66,402,568
| 3
| 6
| null | 2018-10-25T09:06:29
| 2016-08-23T20:55:11
|
C++
|
UTF-8
|
C++
| false
| false
| 1,507
|
h
|
packet_dump.h
|
/*
EQ2Emulator: Everquest II Server Emulator
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
This file is part of EQ2Emulator.
EQ2Emulator is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
EQ2Emulator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PACKET_DUMP_H
#define PACKET_DUMP_H
#include <iostream>
using namespace std;
#include "../common/types.h"
#include "EQPacket.h"
class ServerPacket;
void DumpPacketAscii(const uchar* buf, int32 size, int32 cols = 16, int32 skip = 0);
void DumpPacketHex(const uchar* buf, int32 size, int32 cols = 16, int32 skip = 0);
void DumpPacketBin(const void* data, int32 len);
void DumpPacket(const uchar* buf, int32 size);
void DumpPacket(const ServerPacket* pack, bool iShowInfo = false);
void DumpPacketBin(const ServerPacket* pack);
void DumpPacketBin(int32 data);
void DumpPacketBin(int16 data);
void DumpPacketBin(int8 data);
#endif
|
d6205957d82be2a0a6f501af3789e4a4e8349d23
|
742e3fd6492f52757f00602f87e3707a3f941a18
|
/BuildomASCII/BuildomASCII/src/pch/pch.cpp
|
c5dcccd9937a2fcc0dabe834b7d2a68583084014
|
[] |
no_license
|
worldofjoni/BuildomASCII
|
4e67bb6b2d538f7092601f28105ee222741ae4cd
|
1dfeca0d26c9ba0d99a112cd0c9a06260e3a6e91
|
refs/heads/master
| 2020-05-05T10:52:05.250449
| 2019-06-05T17:13:26
| 2019-06-05T17:13:26
| 179,964,379
| 0
| 0
| null | null | null | null |
WINDOWS-1252
|
C++
| false
| false
| 271
|
cpp
|
pch.cpp
|
// ***********************************************************
// * Buildom ASCII *
// * Copyright ©2019: Samuel Pasieka & Jonatan Ziegler *
// ***********************************************************
#include "pch.h"
|
e3ba2093951c1b62079d3b3a4f94b26eb72fb39c
|
b7e97047616d9343be5b9bbe03fc0d79ba5a6143
|
/test/core/io/PDB_IO.cxxtest.hh
|
99dea3d168042d1fc19499e69d076429c584e32a
|
[] |
no_license
|
achitturi/ROSETTA-main-source
|
2772623a78e33e7883a453f051d53ea6cc53ffa5
|
fe11c7e7cb68644f404f4c0629b64da4bb73b8f9
|
refs/heads/master
| 2021-05-09T15:04:34.006421
| 2018-01-26T17:10:33
| 2018-01-26T17:10:33
| 119,081,547
| 1
| 3
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,917
|
hh
|
PDB_IO.cxxtest.hh
|
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
// (c) addressed to University of Washington CoMotion, email: license@uw.edu.
/// @file core/io/PDB_IO.cxxtest.hh
/// @brief test suite for PDB reader/writer
/// @author Sergey Lyskov
// Test Headers
#include <cxxtest/TestSuite.h>
#include <test/core/init_util.hh>
// Package Headers
#include <core/io/pdb/pdb_writer.hh>
#include <core/import_pose/import_pose.hh>
// Project Headers
#include <core/types.hh>
#include <core/chemical/ChemicalManager.hh>
#include <core/chemical/ResidueTypeSet.fwd.hh>
#include <core/conformation/Atom.hh>
#include <core/conformation/Residue.hh>
#include <core/pose/Pose.hh>
#include <basic/Tracer.hh>
static THREAD_LOCAL basic::Tracer TR("core.io.PDB_IO.cxxtest");
using namespace core;
class PDB_IO : public CxxTest::TestSuite
{
chemical::ResidueTypeSetCAP residue_set;
public:
PDB_IO() {}
// Shared initialization goes here.
void setUp() {
core_init_with_additional_options( "-no_optH" );
residue_set = chemical::ChemicalManager::get_instance()->residue_type_set( chemical::FA_STANDARD );
}
// Shared finalization goes here.
void tearDown() {
}
// ------------------------------------------ //
// test that PDB input and output function properly
void test_pdb_io() {
pose::Pose pose;
const std::string original_file_name("core/io/test_in.pdb");
import_pose::pose_from_file(pose, original_file_name, core::import_pose::PDB_file);
// see if number of residues is correct
TS_ASSERT_EQUALS( pose.size(), 116u );
// write pose to a new file...
const std::string tmp_file_name("PDB_IO_cxxtest.pdb._tmp_");
io::pdb::dump_pdb(pose, tmp_file_name);
TS_ASSERT_FILE_EQ(original_file_name.c_str(), tmp_file_name.c_str());
// read written file as new pose object
pose::Pose P2;
import_pose::pose_from_file(P2, tmp_file_name, core::import_pose::PDB_file);
// see if number of residues is correct
TS_ASSERT_EQUALS( P2.size(), 116u );
// now test if residue information is the same
bool should_exit = false;
for ( Size i=1; i<=pose.size(); ++i ) {
conformation::Residue const & R1( pose.residue(i) );
conformation::Residue const & R2( P2.residue(i) );
// check if number of atoms is the same
TS_ASSERT_EQUALS( R1.natoms(), R2.natoms());
TS_ASSERT_EQUALS( R1.name3(), R2.name3());
for ( Size a=1; a<=R1.natoms(); a++ ) {
conformation::Atom const & A1( R1.atom(a) );
conformation::Atom const & A2( R2.atom(a) );
TS_ASSERT_EQUALS( R1.atom_name(a), R2.atom_name(a));
if ( R1.atom_name(a) != R2.atom_name(a) ) should_exit=true;
TS_ASSERT_EQUALS( A1.xyz().x(), A2.xyz().x());
TS_ASSERT_EQUALS( A1.xyz().y(), A2.xyz().y());
TS_ASSERT_EQUALS( A1.xyz().z(), A2.xyz().z());
if ( A1.xyz().x() != A2.xyz().x() ) should_exit=true;
if ( A1.xyz().y() != A2.xyz().y() ) should_exit=true;
if ( A1.xyz().z() != A2.xyz().z() ) should_exit=true;
if ( should_exit ) break;
}
if ( should_exit ) break;
}
}
void test_pdb_read_partial_residues() {
pose::Pose pose;
// This file has a leading fragment of an Arg residue that needs to be ignored.
import_pose::pose_from_file(pose, "core/io/1ten.pdb", core::import_pose::PDB_file);
TS_ASSERT_EQUALS( pose.size(), 89 );
TR << pose.annotated_sequence() << std::endl;
TS_ASSERT_EQUALS( pose.annotated_sequence(),
"L[LEU:NtermProteinFull]DAPSQIEVKDVTDTTALITWFKPLAEIDGIELTYGIKDVPGDRTTIDLTEDENQYSIGNLKPDTEYEVSLISRRGDMSSNPAKETFTT[THR:CtermProteinFull]" );
}
};
|
b4081ae3b0576365763d8fb08ca5619bf3698bfe
|
f92f7508a3314ffe4b23db5ada78c77c339b2942
|
/Day04/Day01/ex05/Human.hpp
|
45a19baf496b5fd4cf0638831bb14ce4a549634a
|
[] |
no_license
|
ssnow95/CPP
|
b472f1592c2f599e8b3c51b3316c49a288494de1
|
1a7021a933544511785f31e01a0bcc1bae498c8c
|
refs/heads/master
| 2023-03-01T21:37:59.536418
| 2021-02-09T12:32:58
| 2021-02-09T12:32:58
| 329,837,943
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,129
|
hpp
|
Human.hpp
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Human.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ssnowbir <ssnowbir@student.21.ru> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/01/18 12:27:20 by ssnowbir #+# #+# */
/* Updated: 2021/01/18 14:17:40 by ssnowbir ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef HUMAN_HPP
#define HUMAN_HPP
#include "Brain.hpp"
#include <iostream>
#include <string>
#include <sstream>
class Human
{
private:
Brain _brain;
public:
Human();
~Human();
std::string identify();
Brain &GetBrain();
};
#endif
|
3e58776dfcc09426f2fc5503b4452cf9fa84fc7f
|
0b9b89730fc38fc2b97107524bc93cea4d904695
|
/drivers/archetype/Keywords.cc
|
8232fb656cea7bef3b4d008356b52085a48d9117
|
[
"MIT"
] |
permissive
|
gitosaurus/archetype
|
80490c4d8e429974134d985d0924a860e6530d84
|
b13510db5117558ebccdcdbe1ae50e319974b5b1
|
refs/heads/master
| 2023-07-10T12:47:52.265236
| 2023-07-09T06:01:42
| 2023-07-09T06:01:42
| 17,214,052
| 8
| 0
|
MIT
| 2023-05-01T23:38:05
| 2014-02-26T14:56:17
|
C++
|
UTF-8
|
C++
| false
| false
| 3,320
|
cc
|
Keywords.cc
|
//
// Keywords.cpp
// archetype
//
// Created by Derek Jones on 2/18/14.
// Copyright (c) 2014 Derek Jones. All rights reserved.
//
#include <stdexcept>
#include "Keywords.hh"
using namespace std;
namespace archetype {
Keywords* Keywords::instance_ = nullptr;
Keywords& Keywords::instance() {
if (not instance_) {
instance_ = new Keywords();
}
return *instance_;
}
void Keywords::destroy() {
delete instance_;
instance_ = nullptr;
}
#define RESERVE(key, str) if (Reserved.index(str) != key) \
throw logic_error("Reserved word " #str " did not map to " #key)
#define OPERATOR(key, str) if (Operators.index(str) != key) \
throw logic_error("Operator " #str " did not map to " #key)
Keywords::Keywords() {
RESERVE(RW_ABSENT, "ABSENT");
RESERVE(RW_FALSE, "FALSE");
RESERVE(RW_TRUE, "TRUE");
RESERVE(RW_UNDEFINED, "UNDEFINED");
RESERVE(RW_BASED, "based");
RESERVE(RW_BREAK, "break");
RESERVE(RW_CASE, "case");
RESERVE(RW_CLASS, "class");
RESERVE(RW_CREATE, "create");
RESERVE(RW_DEFAULT, "default");
RESERVE(RW_DESTROY, "destroy");
RESERVE(RW_DISPLAY, "display");
RESERVE(RW_DO, "do");
RESERVE(RW_EACH, "each");
RESERVE(RW_ELSE, "else");
RESERVE(RW_END, "end");
RESERVE(RW_FOR, "for");
RESERVE(RW_IF, "if");
RESERVE(RW_INCLUDE, "include");
RESERVE(RW_KEY, "key");
RESERVE(RW_KEYWORD, "keyword");
RESERVE(RW_MESSAGE, "message");
RESERVE(RW_METHODS, "methods");
RESERVE(RW_NAMED, "named");
RESERVE(RW_OF, "of");
RESERVE(RW_ON, "on");
RESERVE(RW_READ, "read");
RESERVE(RW_SELF, "self");
RESERVE(RW_SENDER, "sender");
RESERVE(RW_STOP, "stop");
RESERVE(RW_THEN, "then");
RESERVE(RW_TYPE, "type");
RESERVE(RW_WHILE, "while");
RESERVE(RW_WRITE, "write");
RESERVE(RW_WRITES, "writes");
OPERATOR(OP_PAIR, "@");
OPERATOR(OP_CONCAT, "&");
OPERATOR(OP_C_CONCAT, "&:=");
OPERATOR(OP_MULTIPLY, "*");
OPERATOR(OP_C_MULTIPLY, "*:=");
OPERATOR(OP_PLUS, "+");
OPERATOR(OP_C_PLUS, "+:=");
OPERATOR(OP_MINUS, "-");
OPERATOR(OP_PASS, "-->");
OPERATOR(OP_C_MINUS, "-:=");
OPERATOR(OP_SEND, "->");
OPERATOR(OP_DOT, ".");
OPERATOR(OP_DIVIDE, "/");
OPERATOR(OP_C_DIVIDE, "/:=");
OPERATOR(OP_ASSIGN, ":=");
OPERATOR(OP_LT, "<");
OPERATOR(OP_LE, "<=");
OPERATOR(OP_EQ, "=");
OPERATOR(OP_NE, "~=");
OPERATOR(OP_GT, ">");
OPERATOR(OP_GE, ">=");
OPERATOR(OP_RANDOM, "?");
OPERATOR(OP_POWER, "^");
OPERATOR(OP_AND, "and");
OPERATOR(OP_CHS, "chs");
OPERATOR(OP_LEFTFROM, "leftfrom");
OPERATOR(OP_LENGTH, "length");
OPERATOR(OP_NOT, "not");
OPERATOR(OP_NUMERIC, "numeric");
OPERATOR(OP_OR, "or");
OPERATOR(OP_RIGHTFROM, "rightfrom");
OPERATOR(OP_STRING, "string");
OPERATOR(OP_WITHIN, "within");
OPERATOR(OP_HEAD, "head");
OPERATOR(OP_TAIL, "tail");
}
Keywords::~Keywords() {
}
}
|
0dd3a6cdef50b80291979aac184defb968fa5f53
|
133a001c23426d4470352816589cd6b2450af584
|
/ledTest/ledTest.ino
|
81cbde72ce2013c5c32962eb626b1a68f9de9d88
|
[] |
no_license
|
jones139/arduino-projects
|
494bbfd6c635cc8760035a4f7a06eef54352a438
|
8eaee8a13a64aac47a1e65f24bb7d8b859ea02c4
|
refs/heads/master
| 2021-01-17T09:25:59.294433
| 2017-03-24T21:29:02
| 2017-03-24T21:29:02
| 6,639,715
| 4
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,150
|
ino
|
ledTest.ino
|
/* FTL-655S LED Display */
/*
* Defines which segments to illuminate for each number
*/
//0b0gfedcba
volatile unsigned char num2segs[]= {
0b00111111, // 0
0b00000110, // 1
0b01011011, // 2
0b01001111, // 3
0b01100110, // 4
0b01101101, // 5
0b01111101, // 6
0b00000111, // 7
0b01111111, // 8
0b01101111 // 9
};
// 1st dimension is digit number (0-2), 2nd is segment a-g
// number is the cathode number (0 or 1 for pin 1 or 2) for that
// segment.
volatile boolean seg2cath[3][7] = {
{1,1,1,0,0,0,0}, // 1st digit
{0,0,0,1,1,1,1}, // 2nd digit
{1,1,1,0,0,0,0} // 3rd digit
};
// 1st dimension is digit number (0-2), 2nd is segment a-g
// Value is pin number of that segment's LED
volatile unsigned char seg2displayIp[3][7] = {
{21,19,20,20,18,21,19},
{15,16,17,17,18,15,16},
{13,10,12,12, 9,13,10}
};
volatile unsigned char displayIp2pin[30] = {
0, // 0 not used
0,0, // 1-2
0,0,0,0, // 3-6
0,0,0,0, // 7-10
0,0,0, // 11-13
9,8,7,6, // 14-17
5,4,3,2 // 18-21
};
volatile unsigned char cathNo2pin[2] = {
10,9
};
int val1 = 0; // Value of digit 1.
int val2 = 0; // Value of digit 2.
int val3 = 0; // Value of digit 3.
int val4 = 0; // Value of digit 4.
unsigned long int timer;
/* Show Digit */
void showDigit(int digit, int val) {
int segNo;
int segs;
int displayIp, segPinNo, cathNo,cathOnPinNo,cathOffPinNo;
segs = num2segs[val];
for(segNo=0;segNo<8;segNo++) {
if (bitRead(segs,segNo)) { //do we need to show this segment?
displayIp = seg2displayIp[digit][segNo];
cathNo = seg2cath[digit][segNo];
segPinNo = displayIp2pin[displayIp];
if (cathNo == 0) {
cathOnPinNo = cathNo2pin[1];
cathOffPinNo = cathNo2pin[0];
} else {
cathOnPinNo = cathNo2pin[0];
cathOffPinNo = cathNo2pin[1];
}
// Switch on segment
digitalWrite(segPinNo,HIGH);
digitalWrite(cathOffPinNo,LOW);
digitalWrite(cathOnPinNo,HIGH);
// wait a bit
delay(1);
// Switch off segment
digitalWrite(segPinNo,LOW);
digitalWrite(cathOnPinNo,HIGH);
digitalWrite(cathOffPinNo,HIGH);
}
}
}
void serviceLED() {
showDigit(0,val1);
showDigit(1,val2);
// showDigit(1,val2);
}
void setup() {
int i;
Serial.begin(9600);
Serial.println("LED Test");
for (i=0;i<sizeof(displayIp2pin);i++) {
Serial.print("Setting Pin ");
Serial.print(displayIp2pin[i]);
Serial.println(" to output");
pinMode(displayIp2pin[i],OUTPUT);
}
for (i=0;i<sizeof(cathNo2pin);i++) {
Serial.print("Setting Pin ");
Serial.print(cathNo2pin[i]);
Serial.println(" to output");
pinMode(cathNo2pin[i],OUTPUT);
}
timer = millis();
val1=0;
}
void loop() {
serviceLED();
//showDigit(0,val1);
if (millis()-timer>=1000) {
timer = millis();
val1++;
if (val1>9) {
val1=0;
val2++;
}
if (val2>9) {
val2=0;
}
}
// for (val=0;val<=9;val++) {
// Serial.print("val= ");
// Serial.println(val);
// displayVal(1,val);
// delay(1000);
// }
}
|
e638ce36bdcc8cb171b391742dfccab56078386a
|
f1e8e085726ae6be6bcfc1faf6ad316f8726bdde
|
/source/controls.h
|
edc1757f5dfdb5f5713d18068ffeccb85ddf40d6
|
[
"MIT"
] |
permissive
|
TheGreatRambler/ballpusher-io
|
debf9ca7d02045059cb07e1d9ac2878cdc2282ca
|
77991d7ce5e0c8cffe5ddd774f4424430a276b91
|
refs/heads/master
| 2022-06-16T12:39:56.672537
| 2020-05-04T18:02:37
| 2020-05-04T18:02:37
| 151,259,887
| 2
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,762
|
h
|
controls.h
|
#include <Urho3D/Input/Input.h>
#include <cmath>
class inputHandler {
private:
bool jumpHeld = false;
// Not yet used
bool powerHeld = false;
bool squatHeld = false;
bool lastJumpInput = false;
bool lastPowerInput = false;
bool lastSquatInput = false;
bool jumpFirstFrame = false;
bool powerFirstFrame = false;
bool squatFirstFrame = false;
// -1 means no directional input
int angleFacing = -1;
// angle facing when interpolitated
int interAngleFacing = -1;
// speed when interpolitating
int turnSpeed = 3;
/*
Inter or not
true: inter
false: non-inter
*/
bool angleType = true;
/*
Control types:
0: Keyboard
1: Gamepad
*/
int controlType = 0;
int playerNum;
int upKeyboard = Urho3D::KEY_W;
int downKeyboard = Urho3D::KEY_S;
int leftKeyboard = Urho3D::KEY_A;
int rightKeyboard = Urho3D::KEY_D;
int jumpKeyboard = Urho3D::KEY_SPACE;
int powerKeyboard = Urho3D::KEY_I;
int squatKeyboard = Urho3D::KEY_U;
int gamepadJoystick = Urho3D::CONTROLLER_BUTTON_LEFTSTICK;
/*
Joystick mapping
When one changes, all change
Different because all of these are for the same control
0
3 1
2
*/
int upGamepad = 0;
int downGamepad = 2;
int leftGamepad = 3;
int rightGamepad = 1;
int jumpGamepad = Urho3D::CONTROLLER_BUTTON_A;
int powerGamepad = Urho3D::CONTROLLER_BUTTON_RIGHTSHOULDER;
int squatGamepad = Urho3D::CONTROLLER_BUTTON_LEFTSHOULDER;
Urho3D::Input* inputSubsystem;
void getInterpolitatedMovement() {
// angles are only handled in integers
// gets shortest angle
int angle = 180 - abs(abs(angleFacing - interAngleFacing) - 180);
// true clockwize, false not clockwize
int delta = 360 - interAngleFacing;
int beta = angleFacing + delta;
beta = beta % 360;
bool direction = beta < 180;
// For overshooting calculations
int overshoot = angleFacing - interAngleFacing;
// Determines if overshoot was clockwise, use negation for CC
bool didOvershootClockwise = overshoot < 180 || overshoot > -180;
if (direction) {
// turn clockwise
interAngleFacing = (interAngleFacing + turnSpeed) % 360;
if (didOvershootClockwise) {
// Overshot, correct movement
interAngleFacing = angleFacing;
}
} else {
// turn counter clockwise
int temp = interAngleFacing - turnSpeed;
interAngleFacing = (temp < 0) ? 360 + temp : temp;
if (!didOvershootClockwise) {
interAngleFacing = angleFacing;
}
}
}
public:
inputHandler(int pN, Urho3D::Input* iS) {
// pass GetSubsystem<Input>()
playerNum = pN;
inputSubsystem = iS;
};
void setTurnSpeed(int speed) {
turnSpeed = speed;
}
int getTurnSpeed() {
return turnSpeed;
}
int getRawAngle() {
// For gamepads, this is the wanted angle most of the time
return angleFacing;
}
int getInterAngle() {
return interAngleFacing;
}
// Get angle based on angleType
int getAngle() {
if (angleType) {
return interAngleFacing;
} else {
return angleFacing;
}
}
void setAngleType(bool aT) {
angleType = aT;
}
bool getAngleType() {
return angleType;
}
bool isJumpHeld() {
return jumpHeld;
}
bool isPowerHeld() {
return powerHeld;
}
bool isSquatHeld() {
return squatHeld;
}
bool isJumpPressed() {
return jumpFirstFrame;
}
bool isPowerPressed() {
return powerFirstFrame;
}
bool isSquatPressed() {
return squatFirstFrame;
}
void handleInput() {
// runs every frame
lastJumpInput = jumpHeld;
lastPowerInput = powerHeld;
lastSquatInput = squatHeld;
if (controlType == 0) {
// keyboard
jumpHeld = inputSubsystem->GetKeyDown(jumpKeyboard);
// refers to things like fire flower
powerHeld = inputSubsystem->GetKeyDown(powerKeyboard);
squatHeld = inputSubsystem->GetKeyDown(squatKeyboard);
// for direction
bool upHeld = inputSubsystem->GetKeyDown(upKeyboard);
bool downHeld = inputSubsystem->GetKeyDown(downKeyboard);
bool leftHeld = inputSubsystem->GetKeyDown(leftKeyboard);
bool rightHeld = inputSubsystem->GetKeyDown(rightKeyboard);
/*
0
315 45
270 DIR 90
225 135
180
*/
// handle directions
if (upHeld && !downHeld) {
if (leftHeld && !rightHeld) {
// up and left
angleFacing = 315;
} else if (rightHeld && !leftHeld) {
// up and right
angleFacing = 45;
} else if (!leftHeld && !rightHeld) {
// up
angleFacing = 0;
}
} else if (downHeld && !upHeld) {
if (leftHeld && !rightHeld) {
// down and left
angleFacing = 225;
} else if (rightHeld && !leftHeld) {
// down and right
angleFacing = 135;
} else if (!leftHeld && !rightHeld) {
// down
angleFacing = 180;
}
} else if (!upHeld && !downHeld) {
if (leftHeld && !rightHeld) {
// left
angleFacing = 270;
} else if (rightHeld && !leftHeld) {
// right
angleFacing = 90;
} else if (!leftHeld && !rightHeld) {
// NOTHING
angleFacing = -1;
}
}
}
// Handle first frame inputs
// As in, stand as an onPressed handler
if (lastJumpInput == false && jumpHeld == true) {
jumpFirstFrame = true;
} else {
jumpFirstFrame = false;
}
if (lastPowerInput == false && powerHeld == true) {
powerFirstFrame = true;
} else {
powerFirstFrame = false;
}
if (lastSquatInput == false && squatHeld == true) {
squatFirstFrame = true;
} else {
squatFirstFrame = false;
}
if (angleType) {
// interpolitate it all
if (interAngleFacing == -1) {
// There is no angle
interAngleFacing = angleFacing;
} else if (angleFacing == -1) {
// No movement is needed
interAngleFacing == -1;
} else if (angleFacing != interAngleFacing) {
// interpolitate the directions
getInterpolitatedMovement();
}
}
}
};
|
0ad3c957a81d654002b34d98dacaf322b888f727
|
7b9e626cfc3aa45ff44f79b0fb31b782a17d6c98
|
/src/dynamics/advectionDiffusionForces.hh
|
a9adb351c0bfa4c7bffad560c58cb62a939d42e5
|
[] |
no_license
|
lex16000/LBv1.2
|
e95b1b42925aaa892e6099be83496a0a56271dff
|
cee82cc6fe75d2f9b25a9f62ce8d50d3480c47ac
|
refs/heads/master
| 2021-04-06T01:41:48.099885
| 2018-04-04T12:01:09
| 2018-04-04T12:01:09
| 125,254,173
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,369
|
hh
|
advectionDiffusionForces.hh
|
/* This file is part of the OpenLB library
*
* Copyright (C) 2016 Robin Trunk
* E-mail contact: info@openlb.net
* The most recent release of OpenLB can be downloaded at
* <http://www.openlb.net/>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef ADVECTION_DIFFUSION_FORCES_HH
#define ADVECTION_DIFFUSION_FORCES_HH
#include "advectionDiffusionForces.h"
namespace olb {
template<typename T, template<typename U> class Lattice,
template<typename U> class ADLattice>
advDiffDragForce3D<T,Lattice,ADLattice>::advDiffDragForce3D(UnitConverter<T,Lattice> const& converter_, T St_)
{
initArg = 8;
dragCoeff = (converter_.getCharPhysVelocity()*converter_.getConversionFactorTime()) / (St_ * converter_.getCharPhysLength());
}
template<typename T, template<typename U> class Lattice,
template<typename U> class ADLattice>
advDiffDragForce3D<T,Lattice,ADLattice>::advDiffDragForce3D(UnitConverter<T,Lattice> const& converter_, T pRadius_, T pRho_)
{
initArg = 8;
dragCoeff = (9.*converter_.getPhysViscosity()*converter_.getPhysDensity()*converter_.getConversionFactorTime()) / (2.*pRho_*pRadius_*pRadius_);
}
template<typename T, template<typename U> class Lattice,
template<typename U> class ADLattice>
void advDiffDragForce3D<T,Lattice,ADLattice>::applyForce(T force[], Cell<T,Lattice> *nsCell, Cell<T,ADLattice> *adCell, T vel[], int latticeR[])
{
T velF[3] = {0.,0.,0.};
nsCell->computeU(velF);
for (int i=0; i < Lattice<T>::d; i++) {
force[i] += dragCoeff*(velF[i]-vel[i]);
}
}
template<typename T, template<typename U> class Lattice,
template<typename U> class ADLattice>
advDiffRotatingForce3D<T,Lattice,ADLattice>::advDiffRotatingForce3D(SuperGeometry3D<T>& superGeometry_,
const UnitConverter<T,Lattice>& converter_, std::vector<T> axisPoint_, std::vector<T> axisDirection_,
T w_, T* frac_, bool centrifugeForceOn_, bool coriolisForceOn_) :
sg(superGeometry_), axisPoint(axisPoint_), axisDirection(axisDirection_),
w(w_), frac(frac_), centrifugeForceOn(centrifugeForceOn_), coriolisForceOn(coriolisForceOn_)
{
invMassLessForce = converter_.getConversionFactorTime() * converter_.getConversionFactorTime() / converter_.getConversionFactorLength();
}
template<typename T, template<typename U> class Lattice,
template<typename U> class ADLattice>
void advDiffRotatingForce3D<T,Lattice,ADLattice>::applyForce(T force[], Cell<T,Lattice> *nsCell, Cell<T,ADLattice> *adCell, T vel[], int latticeR[])
{
std::vector<T> F_centri(3,0);
std::vector<T> F_coriolis(3,0);
T wf = w*(*frac);
// if ( this->_sLattice.getLoadBalancer().rank(latticeR[0]) == singleton::mpi().getRank() ) {
// local coords are given, fetch local cell and compute value(s)
std::vector<T> physR(3,T());
this->sg.getCuboidGeometry().getPhysR(&(physR[0]),&(latticeR[0]));
T scalar = (physR[0]-axisPoint[0])*axisDirection[0]
+(physR[1]-axisPoint[1])*axisDirection[1]
+(physR[2]-axisPoint[2])*axisDirection[2];
if (centrifugeForceOn) {
F_centri[0] = wf*wf*(physR[0]-axisPoint[0]-scalar*axisDirection[0]);
F_centri[1] = wf*wf*(physR[1]-axisPoint[1]-scalar*axisDirection[1]);
F_centri[2] = wf*wf*(physR[2]-axisPoint[2]-scalar*axisDirection[2]);
}
if (coriolisForceOn) {
F_coriolis[0] = -2*wf*(axisDirection[1]*vel[2]-axisDirection[2]*vel[1]);
F_coriolis[1] = -2*wf*(axisDirection[2]*vel[0]-axisDirection[0]*vel[2]);
F_coriolis[2] = -2*wf*(axisDirection[0]*vel[1]-axisDirection[1]*vel[0]);
}
force[0] += (F_coriolis[0]+F_centri[0])*invMassLessForce;
force[1] += (F_coriolis[1]+F_centri[1])*invMassLessForce;
force[2] += (F_coriolis[2]+F_centri[2])*invMassLessForce;
// }
}
}
#endif
|
388041ac7a67f500307596e57855e2dd9105002d
|
de7afdfbf77908253ef4b497617d0a69822bbd4b
|
/2k17/hipercampo.cpp
|
c450e4f6a6a193e3cd7025d8f3389bd67570843e
|
[] |
no_license
|
joaoandreotti/competitive_programming
|
1ee6abdd589971a1194b059dff6b3b987dc698f3
|
75c8bce751f09ca76845033893f3a3fa0078753e
|
refs/heads/master
| 2020-09-15T11:52:45.554130
| 2020-02-18T13:38:52
| 2020-02-18T13:38:52
| 223,436,524
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,417
|
cpp
|
hipercampo.cpp
|
#include <bits/stdc++.h>
std::vector <std::pair <int, int> > points;
std::set <std::pair <int, int> > set[110];
std::set <std::pair <int, int> > s_aux;
std::map <std::pair <int, int>, int > map;
int arr[110];
std::pair <int, int> operator- (std::pair <int, int> a, std::pair <int, int> b) {
return std::make_pair ((a.first - b.first), (a.second - b.second));
}
int operator* (std::pair <int, int> a, std::pair <int, int> b) {
return ((a.first * b.second) - (a.second * b.first));
}
int main () {
int n, A, B;
scanf ("%d%d%d", &n, &A, &B);
for (int i = 0; i < n; i++) {
int a, b;
scanf ("%d%d", &a, &b);
points.push_back ({a, b});
map [{a, b}] = i;
}
for (int i = 0; i < points.size (); i++) {
//printf ("testing %d: (%d, %d)\n", i, points[i].first, points[i].second);
for (int j = 0; j < points.size (); j++) {
//printf ("\tchecking %d: (%d, %d)\n", j, points [j].first, points[j].second);
//printf ("\t\t(%d, %d) to (%d, %d): %d\n", points[i].first, points[i].second, A, 0, (points[j] - points[i]) * (points[j] - std::make_pair (A, 0)));
//printf ("\t\t(%d, %d) to (%d, %d): %d\n", points[i].first, points[i].second, B, 0, (points[j] - points[i]) * (points[j] - std::make_pair (B, 0)));
if (i != j) {
if ((points[j] - points[i]) * (points[j] - std::make_pair (A, 0)) > 0) {
if ((points[j] - points[i]) * (points[j] - std::make_pair (B, 0)) < 0)
set [i].insert (points[j]);
}
// if ((points[j] - points[i]) * (points[j] - std::make_pair (A, 0)) < 0) {
// if ((points[j] - points[i]) * (points[j] - std::make_pair (B, 0)) > 0)
// set [i].insert (points[j]);
// }
}
}
}
for (int i = 0; i < n; i++) {
//printf ("i: %d (%d, %d)\n", i, points[i].first, points[i].second);
s_aux.insert ({set[i].size (), i});
for (auto j = set[i].begin (); j != set[i].end (); j++) {
//printf ("\tst: %d, nd: %d\n", j->first, j->second);
}
}
long long ans = 0;
auto it = s_aux.rbegin ();
while (it != s_aux.rend ()) {
int best = 0;
for (auto j = set[i->second].begin (); j != set[i->second].end (); j++) {
//printf ("best: %d, j: (%d, %d),set[map[*j]].size (): %d\n", best, j->first, j->second, set[map[*j]].size ());
best = std::max (best, (int)set[map[*j]].size () + 1);
}
it++;
}
printf ("%lld\n", ans);
return 0;
}
|
f1249b5f5686ab4b4df88f82f9071fc02a97475e
|
0b20aae68aee55adaecae04ddf2364e7cdbf04b2
|
/resources/soci_static_backend_provider.cpp
|
d7658243f77f423b9c05a9276fe60be7c677dbc5
|
[
"Apache-2.0"
] |
permissive
|
staticlibs/external_soci
|
6b98e3e3301054660991839cf590e8001765b6d0
|
27558de9be4dcacec3b34aa2500eb0ad9bfce2ec
|
refs/heads/master
| 2021-01-15T15:43:14.273251
| 2018-09-06T12:25:45
| 2018-09-06T12:25:57
| 47,081,785
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,087
|
cpp
|
soci_static_backend_provider.cpp
|
/*
* Copyright 2015, alex at staticlibs.net
*
* 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.
*/
/*
* File: soci_static_backend_provider.cpp
* Author: alex
*
* Created on November 30, 2015, 1:18 PM
*/
#include <exception>
#include "backend-loader.h"
#include "soci.h"
#ifdef SOCI_ENABLE_SQLITE3
#include "soci-sqlite3.h"
#endif // SOCI_ENABLE_SQLITE3
#ifdef SOCI_ENABLE_ODBC
#include "soci-odbc.h"
#endif // SOCI_ENABLE_ODBC
#ifdef SOCI_ENABLE_POSTGRES
#include "soci-postgresql.h"
#endif // SOCI_ENABLE_POSTGRES
namespace soci {
namespace dynamic_backends {
namespace { // anonymous
std::vector<std::string>& get_empty_vector() {
static std::vector<std::string> empty;
return empty;
}
} // namespace
soci::backend_factory const& get(std::string const& name) {
#ifdef SOCI_ENABLE_SQLITE3
if ("sqlite3" == name || "sqlite" == name) return soci::sqlite3;
#endif // SOCI_ENABLE_SQLITE3
#ifdef SOCI_ENABLE_ODBC
if ("odbc" == name) return soci::odbc;
#endif // SOCI_ENABLE_ODBC
#ifdef SOCI_ENABLE_POSTGRES
if ("postgresql" == name || "postgres" == name) return soci::postgresql;
#endif // SOCI_ENABLE_POSTGRES
throw std::runtime_error("Unsupported SOCI backend: [" + name + "]");
}
// no-op symbols
std::vector<std::string> list_all() { return get_empty_vector(); }
std::vector<std::string>& search_paths() { return get_empty_vector(); }
void register_backend(const std::string&, const std::string&) { }
void register_backend(const std::string&, const soci::backend_factory&) { }
void unload(const std::string&) { }
void unload_all() { }
}
}
|
e76d02f14276f656d25e5cf99f4a3c3de2637138
|
6b40e9dccf2edc767c44df3acd9b626fcd586b4d
|
/NT/ds/adsi/nw312/cenumns.hxx
|
e3c4d61acf1989c29a0249661c2dd70b4f264c65
|
[] |
no_license
|
jjzhang166/WinNT5_src_20201004
|
712894fcf94fb82c49e5cd09d719da00740e0436
|
b2db264153b80fbb91ef5fc9f57b387e223dbfc2
|
refs/heads/Win2K3
| 2023-08-12T01:31:59.670176
| 2021-10-14T15:14:37
| 2021-10-14T15:14:37
| 586,134,273
| 1
| 0
| null | 2023-01-07T03:47:45
| 2023-01-07T03:47:44
| null |
UTF-8
|
C++
| false
| false
| 782
|
hxx
|
cenumns.hxx
|
class FAR CNWCOMPATNamespaceEnum : public CNWCOMPATEnumVariant
{
public:
//
// IEnumVARIANT methods
//
STDMETHOD(Next)(
ULONG cElements,
VARIANT FAR* pvar,
ULONG FAR* pcElementFetched
);
static HRESULT Create(
CNWCOMPATNamespaceEnum FAR* FAR*
);
CNWCOMPATNamespaceEnum();
~CNWCOMPATNamespaceEnum();
HRESULT
CNWCOMPATNamespaceEnum::GetComputerObject(
IDispatch ** ppDispatch
);
HRESULT
CNWCOMPATNamespaceEnum::EnumComputers(
ULONG cElements,
VARIANT FAR* pvar,
ULONG FAR* pcElementFetched
);
private:
NWOBJ_ID _dwResumeObjectID;
NWCONN_HANDLE _hConn;
};
|
8df79aca7cb95e9495ee3d2473e5709fe61ef8d6
|
40bac5da80f610c33c038baf9e10f40495a1586b
|
/ZLearn_Manacher.cpp
|
9f255c8efae0cfe29e3c1770a4ef587b4771699a
|
[] |
no_license
|
earnestzhao/LeetCode
|
209d205c178e8ac3b40c214a6f711275a545fda4
|
5cefe55d8c4a6d9fe86c5e2fc8965f71e4073a35
|
refs/heads/master
| 2020-04-15T14:03:35.628692
| 2019-08-24T13:10:04
| 2019-08-24T13:10:04
| 57,934,937
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,799
|
cpp
|
ZLearn_Manacher.cpp
|
const char C_UNIT_SEPARATOR = '\x1F';
int Min(int iOper1, int iOper2)
{
return iOper1 < iOper2 ? iOper1 : iOper2;
}
vector<string> Manacher(const string & strSrc)
{
string strExtend;
strExtend.push_back(C_UNIT_SEPARATOR);
for (int iIndex = 0; iIndex < strSrc.size(); iIndex ++)
{
strExtend.push_back(strSrc[iIndex]);
strExtend.push_back(C_UNIT_SEPARATOR);
}
vector<int> vecPalindromicRadius;
for (int iIndex = 0, iMaxPalindromeCenterIndex = 0, iMaxPalindromeEndIndex = 0; iIndex < strExtend.size(); iIndex ++)
{
if (iIndex < iMaxPalindromeEndIndex)
{
vecPalindromicRadius.push_back(Min(vecPalindromicRadius[2 * iMaxPalindromeCenterIndex - iIndex], iMaxPalindromeEndIndex - iIndex + 1));
}
else
{
vecPalindromicRadius.push_back(1);
}
for (int iLeftIndex = iIndex - vecPalindromicRadius[iIndex], iRightIndex = iIndex + vecPalindromicRadius[iIndex]; iLeftIndex >= 0 && iRightIndex < strExtend.size() && strExtend[iLeftIndex] == strExtend[iRightIndex]; iLeftIndex --, iRightIndex ++)
{
vecPalindromicRadius[iIndex] ++;
}
int iCurrentPalindromeEndIndex = iIndex + vecPalindromicRadius[iIndex] - 1;
if (iCurrentPalindromeEndIndex > iMaxPalindromeEndIndex)
{
iMaxPalindromeEndIndex = iCurrentPalindromeEndIndex;
iMaxPalindromeCenterIndex = iIndex;
}
}
vector<string> vecResult;
for (int iIndex = 1; iIndex < vecPalindromicRadius.size() - 1; iIndex ++)
{
vecResult.push_back(strSrc.substr((iIndex - vecPalindromicRadius[iIndex] + 2) / 2, vecPalindromicRadius[iIndex] - 1));
}
return vecResult;
}
|
505ed690640591812a510c0d97d1213da80f7ae7
|
6ff6bca45b94ce23170d6d839e296f13d56deac6
|
/src/moveActor.cpp
|
8a5fbc9236a6e07e1fb46d31ea2c0ed59f4ef35b
|
[
"MIT"
] |
permissive
|
nifx28/scrollStory
|
57b76e70648e773c48ab6fc604eb448e9b1b93e7
|
8b17ee43a343ce91f389b721b08352d9acd9a5de
|
refs/heads/main
| 2023-06-24T20:44:43.924574
| 2021-07-19T10:39:44
| 2021-07-19T10:39:44
| 387,262,820
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,337
|
cpp
|
moveActor.cpp
|
#include "stdafx.h"
#include "moveActor.h"
using namespace std;
MoveActor::MoveActor(int maxFrameNum, const wchar_t* mkIMGURL[], const wchar_t* bkIMGURL[]) :
groundZero(0), jumpHeight(20),
moveDir(0), maxFrameNum(maxFrameNum),
isJumping(false), isFalling(false)
{
for (int i = 0; i < 2; i++)
{
loadimage(mkIMG + i, mkIMGURL[i]);
loadimage(bkIMG + i, bkIMGURL[i]);
}
loadimage(&avatar, AVATAR_TILE_PATH, 833, 1345);
DWORD* mkBUF = nullptr, * bkBUF = nullptr;
mkBUF = GetImageBuffer(&avatar);
mask = IMAGE(833, 1345);
bkBUF = GetImageBuffer(&mask);
map<DWORD, int> m;
wofstream ofs(L"Mask.log");
for (int i = 0; i < mask.getwidth() * mask.getheight(); i++)
{
if (m.find(mkBUF[i]) == m.end())
{
m[mkBUF[i]] = 1;
}
else
{
m[mkBUF[i]] += 1;
}
if ((mkBUF[i] & 0xFF000000) != 0xFF000000)
{
mkBUF[i] = BLACK;
bkBUF[i] = WHITE;
}
else
{
bkBUF[i] = BLACK;
}
}
vector<pair<DWORD, int>> list;
for (const auto& it : m) {
list.push_back(it);
}
sort(list.begin(), list.end(), [](const pair<DWORD, int>& a, const pair<DWORD, int>& b) {
return a.second > b.second;
});
for (const auto& it : list)
{
ofs << hex << it.first << L": " << dec << it.second << L'\n';
}
ofs.close();
saveimage(L"Avatar.png", &avatar);
saveimage(L"Mask.png", &mask);
}
void MoveActor::setGroundZero(int y)
{
this->groundZero = y;
}
void MoveActor::setDirection(int dir)
{
this->moveDir = dir;
}
void MoveActor::drawScene(int width, int height, int miniWidth, int miniHeight, int& x, int& y, int dir, bool speedUp, const IMAGE& miniMap, const IMAGE& background)
{
int moveDir = dir, speed = 8 + (speedUp ? 5 : 0);
int frame = 0;
while (frame < maxFrameNum)
{
switch (dir)
{
case Actor::DIRECTION::None:
{
moveDir = this->moveDir;
break;
}
case Actor::DIRECTION::Left:
{
x -= speed;
break;
}
case Actor::DIRECTION::Right:
{
x += speed;
break;
}
case Actor::DIRECTION::Up:
{
if (!this->isJumping)
{
this->isJumping = true;
}
break;
}
case Actor::DIRECTION::Down:
{
y += speed;
break;
}
}
if (this->isJumping)
{
if (!this->isFalling)
{
y -= speed;
}
else
{
y += speed;
}
if (y < this->jumpHeight)
{
this->isFalling = true;
}
}
if (y > this->groundZero)
{
this->isJumping = false;
this->isFalling = false;
y = this->groundZero;
}
BeginBatchDraw();
//cleardevice();
putimage(0, 0, width, height, &background, 0, 0);
for (int j = 0, y = 0; j < 5; j++)
{
y += *(imgGridW + j * 5);
for (int i = 0, x = 40; i < 5; i++)
{
rectangle(x, y, x + 130, y + *(imgGridZ + j * 5));
putimage(x, y, 130, *(imgGridZ + j * 5), &mask, *(imgGridX + j * 5 + i), *(imgGridY + j * 5 + i), SRCAND);
putimage(x, y, 130, *(imgGridZ + j * 5), &avatar, *(imgGridX + j * 5 + i), *(imgGridY + j * 5 + i), SRCINVERT);
x += 140;
}
}
putimage(width - miniWidth - 10, 10, &miniMap);
//putimage(140, 160, 130, 150, &mask, 408, 127, SRCAND);
//putimage(140, 160, 130, 150, &avatar, 408, 127, SRCINVERT);
putimage(x, y, 50, 80, bkIMG + moveDir, frame * 50, 0, SRCAND);
putimage(x, y, 50, 80, mkIMG + moveDir, frame * 50, 0, SRCPAINT);
frame++;
FlushBatchDraw();
Sleep(100);
EndBatchDraw();
}
}
|
61685cef197f211a447dbda054da1ae83c495a0f
|
88eb039566dc02af88c7a1786331791b0bb14959
|
/src/Encoder/Utility/MapNameValidator.cpp
|
563f386df5e6950fb76b109f62d931831a9c0a61
|
[
"MIT"
] |
permissive
|
Wenox/platformer-2d
|
a72bc31d6b8dae2c9c6c38f34d960e5deead63d0
|
5109212a9109371138f9e1cd8b37f759d885a30d
|
refs/heads/master
| 2023-01-14T13:32:22.767850
| 2020-11-15T11:43:48
| 2020-11-15T11:43:48
| 264,665,715
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 726
|
cpp
|
MapNameValidator.cpp
|
#include "MapNameValidator.h"
MapNameValidator::MapNameValidator(std::string_view fileName)
: fileName{fileName}
{
try {
re.assign(mapNamePattern.data());
}
catch (const std::regex_error& e) {
std::cerr << "Bad pattern: " << mapNamePattern << std::endl;
std::cerr << e.what() << std::endl;
}
}
bool MapNameValidator::isValidFormat() {
return std::regex_match(fileName.data(), match, re);
}
bool MapNameValidator::exists() const {
std::ifstream file{fileName.data()};
return file.good();
}
bool MapNameValidator::isBmp() const {
return match.str(1) == std::string("bmp");
}
bool MapNameValidator::isTxt() const {
return match.str(1) == std::string("txt");
}
|
f6f22ea247821df92bdcb3e8ca0bd58cfefdd15e
|
f295f1e190bccd3e07a630a79890fac3019c537b
|
/Engine/Engine/src/graphics/Shaders/DisplacementMappingDomainShader.h
|
eef51b29c9fb4b725ff7fd5ae775b287bbd4bedc
|
[] |
no_license
|
Kavarna/Oblivion
|
f3aaa2fb577548b459115420fad738e82f0337e0
|
cca2986ae9e4969b027b4751619ca11b3a241974
|
refs/heads/master
| 2021-06-14T15:11:28.457996
| 2021-03-15T21:01:31
| 2021-03-15T21:01:31
| 154,550,644
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 935
|
h
|
DisplacementMappingDomainShader.h
|
#pragma once
#include "../interfaces/Shader.h"
class DisplacementMappingDomainShader : public IDomainShader, public Singletone<DisplacementMappingDomainShader>
{
public:
struct DSCameraBuffer
{
DirectX::XMMATRIX View;
DirectX::XMMATRIX Projection;
};
public:
DisplacementMappingDomainShader() :
IDomainShader((LPWSTR)L"Shaders/DisplacementMappingDomainShader.cso")
{
m_cameraBuffer = BufferManager::Get()->CreateBuffer(
D3D11_USAGE::D3D11_USAGE_DYNAMIC, sizeof(DSCameraBuffer),
D3D11_CPU_ACCESS_FLAG::D3D11_CPU_ACCESS_WRITE
);
};
void setCamera(const DSCameraBuffer& ds)
{
static auto bm = BufferManager::Get();
bm->MapBuffer(m_cameraBuffer, (void*)&ds);
bm->bindDSBuffer(0, m_cameraBuffer);
}
// Inherited via IDomainShader
virtual DomainShaderEnum getDomainShaderType() const override
{
return DomainShaderEnum::DomainShaderDisplacement;
}
private:
ConstantBufferHandle m_cameraBuffer;
};
|
61e5dbe2ad5839ab408452e6aad738a8a12e1f13
|
71250f8f39a89ba4b09a3c38e27238a395986622
|
/src/requests/requestorders.cpp
|
e52b2e7fb9c5783f5a9aa0e2bd18b5958931f157
|
[] |
no_license
|
ABSRDML/atom-engine
|
62e68181fa4bd6581edcb28588317697c7775fa0
|
43c3d3dd5ad70e42492a514d1b2a1b9d2b2903b9
|
refs/heads/master
| 2021-09-19T07:22:26.654854
| 2018-07-24T23:00:17
| 2018-07-24T23:00:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,801
|
cpp
|
requestorders.cpp
|
#include "requestorders.h"
#include <hiredis/async.h>
CRequestOrders::CRequestOrders(redisAsyncContext* redisContext, evhttp_request* req, TDocumentUniquePtr document, OnRequestProcessingCompleteFunc onComplete) :
CRequest(redisContext, req, std::move(document), onComplete),
isFirstKey_(true)
{
}
CRequestOrders::~CRequestOrders()
{
}
void CRequestOrders::process()
{
if (!document_->HasMember("first_cur") || !document_->HasMember("second_cur")) {
sendBadJSONError();
if (onComplete_) {
onComplete_(this);
}
} else {
std::string firstCur = (*document_)["first_cur"].GetString();
std::string secondCur = (*document_)["second_cur"].GetString();
std::stringstream key;
std::stringstream command;
key << "orders:" << firstCur << "_" << secondCur << ":*";
command << "keys " << key.str();
redisAsyncCommand(redisContext_, &CRequestOrders::getCallback, this, command.str().c_str());
}
}
std::string CRequestOrders::getType()
{
return "orders";
}
void CRequestOrders::getCallback(redisAsyncContext* context, void* res, void* data)
{
redisReply* value = reinterpret_cast<redisReply*>(res);
CRequestOrders* request = reinterpret_cast<CRequestOrders*>(data);
if (value) {
for (size_t i = 0; i < value->elements; ++i) {
std::string str = value->element[i]->str;
request->keys_.push_back(str);
}
if (request->keys_.empty()) {
request->sendReply("{[]}");
if (request->onComplete_) {
request->onComplete_(request);
}
} else {
request->res_ << "{[";
request->getNextValue();
}
} else {
request->sendReply("{[]}");
if (request->onComplete_) {
request->onComplete_(request);
}
}
}
void CRequestOrders::getValueCallback(redisAsyncContext* context, void* res, void* data)
{
redisReply* value = reinterpret_cast<redisReply*>(res);
CRequestOrders* request = reinterpret_cast<CRequestOrders*>(data);
if (request->keys_.empty()) {
request->res_ << "]}";
request->sendReply(request->res_.str());
if (request->onComplete_) {
request->onComplete_(request);
}
} else {
rapidjson::Document doc;
if (!doc.Parse(value->str).HasParseError() && doc.HasMember("first_count") && doc.HasMember("second_count")) {
std::stringstream ss;
ss << "{\"order\": " << request->curKey_ << ", \"first_count\": " << doc["first_count"].GetInt() << ", \"second_count\": " << doc["second_count"].GetInt() << "}";
if (!request->isFirstKey_) {
request->res_ << ", ";
}
request->isFirstKey_ = false;
request->res_ << ss.str();
}
request->getNextValue();
}
}
void CRequestOrders::getNextValue()
{
auto it = keys_.begin();
curKey_ = *it;
keys_.erase(it);
std::stringstream command;
command << "GET " << curKey_;
redisAsyncCommand(redisContext_, &CRequestOrders::getValueCallback, this, command.str().c_str());
}
|
69e7f0d4fa05591a6889a7910a232ef931acf427
|
84914306c0e9b6ef22c51cce0d0d0d54d6a9b69e
|
/20/main.cpp
|
92beeb5b3af557529bba0a5469c0b169ee9cd10b
|
[] |
no_license
|
ebuchholz17/advent-of-code-2018
|
e9691ee885c75a417300170fb819e7c7c010b896
|
7afdf6ee31aa47dc4d03f8783e8375165a2780c2
|
refs/heads/master
| 2020-04-10T14:02:40.508714
| 2018-12-24T22:21:50
| 2018-12-24T22:21:50
| 161,065,908
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,855
|
cpp
|
main.cpp
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ASSERT(x) if (!(x)) { *((char *)0) = 0; }
struct room {
int id;
int northID;
int southID;
int eastID;
int westID;
};
room *rooms;
int numRooms;
int maxDepth;
int atLeast1000DoorsDeepCounter = 0;
int addRoom () {
room *newRoom = &rooms[numRooms];
*newRoom = {};
newRoom->id = numRooms;
newRoom->northID = -1;
newRoom->southID = -1;
newRoom->eastID = -1;
newRoom->westID = -1;
numRooms++;
return newRoom->id;
}
void parseDirectionsString (int currentRoomID, char *directionsStart, char *directionsEnd, int depth) {
char *currentCharacter = directionsStart;
room *currentRoom = &rooms[currentRoomID];
do {
switch (*currentCharacter) {
case 'N':
{
if (currentRoom->northID == -1) {
int newRoomID = addRoom();
room *newRoom = &rooms[newRoomID];
currentRoom->northID = newRoomID;
newRoom->southID = currentRoomID;
++depth;
if (depth > maxDepth) {
maxDepth = depth;
}
if (depth >= 1000) {
atLeast1000DoorsDeepCounter++;
}
}
else {
--depth; // assumes this can only happen for backtracking from dead-ends
}
currentRoomID = currentRoom->northID;
currentRoom = &rooms[currentRoomID];
} break;
case 'S':
{
if (currentRoom->southID == -1) {
int newRoomID = addRoom();
room *newRoom = &rooms[newRoomID];
currentRoom->southID = newRoomID;
newRoom->northID = currentRoomID;
++depth;
if (depth > maxDepth) {
maxDepth = depth;
}
if (depth >= 1000) {
atLeast1000DoorsDeepCounter++;
}
}
else {
--depth; // assumes this can only happen for backtracking from dead-ends
}
currentRoomID = currentRoom->southID;
currentRoom = &rooms[currentRoomID];
} break;
case 'E':
{
if (currentRoom->eastID == -1) {
int newRoomID = addRoom();
room *newRoom = &rooms[newRoomID];
currentRoom->eastID = newRoomID;
newRoom->westID = currentRoomID;
++depth;
if (depth > maxDepth) {
maxDepth = depth;
}
if (depth >= 1000) {
atLeast1000DoorsDeepCounter++;
}
}
else {
--depth; // assumes this can only happen for backtracking from dead-ends
}
currentRoomID = currentRoom->eastID;
currentRoom = &rooms[currentRoomID];
} break;
case 'W':
{
if (currentRoom->westID == -1) {
int newRoomID = addRoom();
room *newRoom = &rooms[newRoomID];
currentRoom->westID = newRoomID;
newRoom->eastID = currentRoomID;
++depth;
if (depth > maxDepth) {
maxDepth = depth;
}
if (depth >= 1000) {
atLeast1000DoorsDeepCounter++;
}
}
else {
--depth; // assumes this can only happen for backtracking from dead-ends
}
currentRoomID = currentRoom->westID;
currentRoom = &rooms[currentRoomID];
} break;
case '(':
{
// scan until | is found
char *parenthesisStart = currentCharacter + 1;
char *parenthesisEnd = parenthesisStart;
int leftParenCount = 0;
char *subDirectionsStart = parenthesisStart;
char *subDirectionsEnd = 0;
while (true) {
char parenthesizedCharacter = *parenthesisEnd;
bool foundEnd = false;
switch (parenthesizedCharacter) {
case '(':
{
leftParenCount++;
} break;
case ')':
{
if (leftParenCount == 0) {
foundEnd = true;
}
else {
leftParenCount--;
}
} break;
case '|':
{
if (leftParenCount == 0) {
subDirectionsEnd = parenthesisEnd - 1;
parseDirectionsString(currentRoomID, subDirectionsStart, subDirectionsEnd, depth);
subDirectionsStart = parenthesisEnd + 1;
subDirectionsEnd = 0;
}
} break;
}
if (foundEnd) {
subDirectionsEnd = parenthesisEnd - 1;
currentCharacter = parenthesisEnd;
if (subDirectionsStart <= subDirectionsEnd) {
parseDirectionsString(currentRoomID, subDirectionsStart, subDirectionsEnd, depth);
}
break;
}
else {
++parenthesisEnd;
}
}
} break;
}
++currentCharacter;
} while (currentCharacter <= directionsEnd);
}
int main (int argc, char **argv) {
rooms = (room *)malloc(20000 * sizeof(room));
numRooms = 0;
maxDepth = 0;
const int stringLength = 20000;
char line[stringLength];
fgets(line, stringLength, stdin);
int startingRoomID = addRoom();
char *directionsStart = line + 1;
char *directionsEnd = directionsStart;
while (*directionsEnd != '$') {
++directionsEnd;
}
parseDirectionsString(startingRoomID, directionsStart, directionsEnd, 0);
printf("%d\n", maxDepth);
printf("%d\n", atLeast1000DoorsDeepCounter);
return 0;
}
|
808840668796b28b5fcd82f0d83d80b25df230e4
|
370ef24a296878aa3a84fd9c6fc6cd6a6310bdd8
|
/2404a2/PurchaseArray.h
|
0587152b957a607cf58c4e74a6add2ec53d92702
|
[] |
no_license
|
HaoyuanDu/4042
|
dfe0ccf9dcbd7f481113b11829357385e274d415
|
510b91747f1125b94075ad56569ce207ca423032
|
refs/heads/master
| 2021-01-18T18:55:35.439761
| 2017-04-07T00:22:41
| 2017-04-07T00:22:41
| 86,878,347
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 349
|
h
|
PurchaseArray.h
|
#ifndef PURCHASEARRAY_H
#define PURCHASEARRAY_H
#include "defs.h"
#include <string>
#include "Purchase.h"
using namespace std;
class PurchaseArray
{
public:
PurchaseArray();
~PurchaseArray();
void add(Purchase*);
Purchase* get(int);
int getSize();
protected:
Purchase* pElements[MAX_ARR];
int size;
};
#endif
|
2084305472d595a334d8bec8a4eb02c92dbe2835
|
04a3e8ee778b443f8983ac38f672bebb2607e3fa
|
/protocal/drivers/delphi_esr.pb.cc
|
2870ed0382c9e6a30e503cac8368839560c68201
|
[
"Apache-2.0"
] |
permissive
|
gA4ss/g2r
|
28a51aec1741a1ff00c9564b8569ce703dbb6749
|
a6e2ee5758ab59fd95704e3c3090dd234fbfb2c9
|
refs/heads/master
| 2022-07-08T14:27:31.443671
| 2020-05-12T16:35:17
| 2020-05-12T16:35:17
| 263,392,475
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| true
| 913,122
|
cc
|
delphi_esr.pb.cc
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: drivers/delphi_esr.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "drivers/delphi_esr.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
namespace apollo {
namespace drivers {
namespace {
const ::google::protobuf::Descriptor* Esr_status9_5e8_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_status9_5e8_reflection_ = NULL;
const ::google::protobuf::Descriptor* Esr_status6_5e5_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_status6_5e5_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_vertical_align_updatedType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_found_targetType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_factory_align_status_2Type_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_factory_align_status_1Type_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_recommend_unconvergeType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_system_power_modeType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Esr_status5_5e4_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_status5_5e4_reflection_ = NULL;
const ::google::protobuf::Descriptor* Esr_status3_4e2_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_status3_4e2_reflection_ = NULL;
const ::google::protobuf::Descriptor* Esr_status4_4e3_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_status4_4e3_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status4_4e3_Can_tx_truck_target_detType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status4_4e3_Can_tx_sidelobe_blockageType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status4_4e3_Can_tx_partial_blockageType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status4_4e3_Can_tx_mr_lr_modeType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Esr_trackmotionpower_540_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_trackmotionpower_540_reflection_ = NULL;
const ::google::protobuf::Descriptor* Esr_trackmotionpower_540_Motionpower_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_trackmotionpower_540_Motionpower_reflection_ = NULL;
const ::google::protobuf::Descriptor* Acm_inst_req_7e0_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Acm_inst_req_7e0_reflection_ = NULL;
const ::google::protobuf::Descriptor* Esr_track01_500_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_track01_500_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_track01_500_Can_tx_track_grouping_changedType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_track01_500_Can_tx_track_oncomingType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_track01_500_Can_tx_track_bridge_objectType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_track01_500_Can_tx_track_statusType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_track01_500_Can_tx_track_med_range_modeType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Esr_valid1_5d0_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_valid1_5d0_reflection_ = NULL;
const ::google::protobuf::Descriptor* Esr_valid2_5d1_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_valid2_5d1_reflection_ = NULL;
const ::google::protobuf::Descriptor* Acm_inst_resp_7e4_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Acm_inst_resp_7e4_reflection_ = NULL;
const ::google::protobuf::Descriptor* Vehicle2_4f1_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Vehicle2_4f1_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_mr_only_transmitType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_lr_only_transmitType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_clear_faultsType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_use_angle_misalignmentType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_turn_signal_statusType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_blockage_disableType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_vehicle_speed_validityType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_mmr_upside_downType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_wiper_statusType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_raw_data_enableType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_radar_cmd_radiateType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_grouping_modeType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Vehicle1_4f0_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Vehicle1_4f0_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle1_4f0_Can_rx_steering_angle_validityType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle1_4f0_Can_rx_steering_angle_signType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle1_4f0_Can_rx_steering_angle_rate_signType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle1_4f0_Can_rx_yaw_rate_validityType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle1_4f0_Can_rx_vehicle_speed_directionType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Esr_sim1_5c0_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_sim1_5c0_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_sim1_5c0_Can_rx_sim_track_idType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_sim1_5c0_Can_rx_sim_statusType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_sim1_5c0_Can_rx_sim_functionType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Esr_status1_4e0_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_status1_4e0_reflection_ = NULL;
const ::google::protobuf::Descriptor* Esr_status2_4e1_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_status2_4e1_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_raw_data_modeType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_range_perf_errorType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_overheat_errorType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_internal_errorType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_grouping_modeType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_xcvr_operationalType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Esr_status8_5e7_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_status8_5e7_reflection_ = NULL;
const ::google::protobuf::Descriptor* Esr_status7_5e6_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Esr_status7_5e6_reflection_ = NULL;
const ::google::protobuf::Descriptor* Vehicle3_5f2_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Vehicle3_5f2_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_serv_align_typeType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_serv_align_enableType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_auto_align_convergedType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_auto_align_disableType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_wheel_slipType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_long_accel_validityType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_lat_accel_validityType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Vehicle4_5f3_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Vehicle4_5f3_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle4_5f3_Can_rx_fac_align_cmd_2Type_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle4_5f3_Can_rx_fac_align_cmd_1Type_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Vehicle5_5f4_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Vehicle5_5f4_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Vehicle6_5f5_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
Vehicle6_5f5_reflection_ = NULL;
const ::google::protobuf::Descriptor* DelphiESR_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
DelphiESR_reflection_ = NULL;
} // namespace
void protobuf_AssignDesc_drivers_2fdelphi_5fesr_2eproto() GOOGLE_ATTRIBUTE_COLD;
void protobuf_AssignDesc_drivers_2fdelphi_5fesr_2eproto() {
protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
const ::google::protobuf::FileDescriptor* file =
::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
"drivers/delphi_esr.proto");
GOOGLE_CHECK(file != NULL);
Esr_status9_5e8_descriptor_ = file->message_type(0);
static const int Esr_status9_5e8_offsets_[7] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status9_5e8, can_tx_path_id_acc_3_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status9_5e8, can_tx_path_id_acc_2_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status9_5e8, can_tx_filtered_xohp_acc_cipv_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status9_5e8, can_tx_water_spray_target_id_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status9_5e8, can_tx_serial_num_3rd_byte_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status9_5e8, can_tx_sideslip_angle_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status9_5e8, can_tx_avg_pwr_cwblkg_),
};
Esr_status9_5e8_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_status9_5e8_descriptor_,
Esr_status9_5e8::default_instance_,
Esr_status9_5e8_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status9_5e8, _has_bits_[0]),
-1,
-1,
sizeof(Esr_status9_5e8),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status9_5e8, _internal_metadata_),
-1);
Esr_status6_5e5_descriptor_ = file->message_type(1);
static const int Esr_status6_5e5_offsets_[13] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_sw_version_dsp_3rd_byte_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_vertical_align_updated_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_vertical_misalignment_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_serv_align_updates_done_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_found_target_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_factory_misalignment_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_factory_align_status_2_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_factory_align_status_1_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_recommend_unconverge_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_wave_diff_a2d_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_system_power_mode_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_supply_n5v_a2d_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, can_tx_supply_1p8v_a2d_),
};
Esr_status6_5e5_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_status6_5e5_descriptor_,
Esr_status6_5e5::default_instance_,
Esr_status6_5e5_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, _has_bits_[0]),
-1,
-1,
sizeof(Esr_status6_5e5),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status6_5e5, _internal_metadata_),
-1);
Esr_status6_5e5_Can_tx_vertical_align_updatedType_descriptor_ = Esr_status6_5e5_descriptor_->enum_type(0);
Esr_status6_5e5_Can_tx_found_targetType_descriptor_ = Esr_status6_5e5_descriptor_->enum_type(1);
Esr_status6_5e5_Can_tx_factory_align_status_2Type_descriptor_ = Esr_status6_5e5_descriptor_->enum_type(2);
Esr_status6_5e5_Can_tx_factory_align_status_1Type_descriptor_ = Esr_status6_5e5_descriptor_->enum_type(3);
Esr_status6_5e5_Can_tx_recommend_unconvergeType_descriptor_ = Esr_status6_5e5_descriptor_->enum_type(4);
Esr_status6_5e5_Can_tx_system_power_modeType_descriptor_ = Esr_status6_5e5_descriptor_->enum_type(5);
Esr_status5_5e4_descriptor_ = file->message_type(2);
static const int Esr_status5_5e4_offsets_[8] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status5_5e4, can_tx_supply_10v_a2d_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status5_5e4, can_tx_temp2_a2d_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status5_5e4, can_tx_temp1_a2d_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status5_5e4, can_tx_swbatt_a2d_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status5_5e4, can_tx_supply_5vdx_a2d_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status5_5e4, can_tx_supply_5va_a2d_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status5_5e4, can_tx_supply_3p3v_a2d_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status5_5e4, can_tx_ignp_a2d_),
};
Esr_status5_5e4_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_status5_5e4_descriptor_,
Esr_status5_5e4::default_instance_,
Esr_status5_5e4_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status5_5e4, _has_bits_[0]),
-1,
-1,
sizeof(Esr_status5_5e4),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status5_5e4, _internal_metadata_),
-1);
Esr_status3_4e2_descriptor_ = file->message_type(3);
static const int Esr_status3_4e2_offsets_[5] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status3_4e2, can_tx_sw_version_pld_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status3_4e2, can_tx_sw_version_host_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status3_4e2, can_tx_hw_version_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status3_4e2, can_tx_interface_version_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status3_4e2, can_tx_serial_num_),
};
Esr_status3_4e2_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_status3_4e2_descriptor_,
Esr_status3_4e2::default_instance_,
Esr_status3_4e2_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status3_4e2, _has_bits_[0]),
-1,
-1,
sizeof(Esr_status3_4e2),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status3_4e2, _internal_metadata_),
-1);
Esr_status4_4e3_descriptor_ = file->message_type(4);
static const int Esr_status4_4e3_offsets_[13] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_truck_target_det_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_lr_only_grating_lobe_det_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_sidelobe_blockage_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_partial_blockage_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_path_id_acc_stat_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_mr_lr_mode_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_auto_align_angle_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_rolling_count_3_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_path_id_fcw_stat_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_path_id_fcw_move_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_path_id_cmbb_stat_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_path_id_cmbb_move_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, can_tx_path_id_acc_),
};
Esr_status4_4e3_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_status4_4e3_descriptor_,
Esr_status4_4e3::default_instance_,
Esr_status4_4e3_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, _has_bits_[0]),
-1,
-1,
sizeof(Esr_status4_4e3),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status4_4e3, _internal_metadata_),
-1);
Esr_status4_4e3_Can_tx_truck_target_detType_descriptor_ = Esr_status4_4e3_descriptor_->enum_type(0);
Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType_descriptor_ = Esr_status4_4e3_descriptor_->enum_type(1);
Esr_status4_4e3_Can_tx_sidelobe_blockageType_descriptor_ = Esr_status4_4e3_descriptor_->enum_type(2);
Esr_status4_4e3_Can_tx_partial_blockageType_descriptor_ = Esr_status4_4e3_descriptor_->enum_type(3);
Esr_status4_4e3_Can_tx_mr_lr_modeType_descriptor_ = Esr_status4_4e3_descriptor_->enum_type(4);
Esr_trackmotionpower_540_descriptor_ = file->message_type(5);
static const int Esr_trackmotionpower_540_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540, can_tx_track_rolling_count_2_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540, can_tx_track_can_id_group_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540, can_tx_track_motion_power_),
};
Esr_trackmotionpower_540_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_trackmotionpower_540_descriptor_,
Esr_trackmotionpower_540::default_instance_,
Esr_trackmotionpower_540_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540, _has_bits_[0]),
-1,
-1,
sizeof(Esr_trackmotionpower_540),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540, _internal_metadata_),
-1);
Esr_trackmotionpower_540_Motionpower_descriptor_ = Esr_trackmotionpower_540_descriptor_->nested_type(0);
static const int Esr_trackmotionpower_540_Motionpower_offsets_[4] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540_Motionpower, can_tx_track_moving_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540_Motionpower, can_tx_track_moving_fast_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540_Motionpower, can_tx_track_moving_slow_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540_Motionpower, can_tx_track_power_),
};
Esr_trackmotionpower_540_Motionpower_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_trackmotionpower_540_Motionpower_descriptor_,
Esr_trackmotionpower_540_Motionpower::default_instance_,
Esr_trackmotionpower_540_Motionpower_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540_Motionpower, _has_bits_[0]),
-1,
-1,
sizeof(Esr_trackmotionpower_540_Motionpower),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_trackmotionpower_540_Motionpower, _internal_metadata_),
-1);
Acm_inst_req_7e0_descriptor_ = file->message_type(6);
static const int Acm_inst_req_7e0_offsets_[6] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_req_7e0, command_ctr_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_req_7e0, command_code_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_req_7e0, cc_word_2_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_req_7e0, cc_word_1_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_req_7e0, cc_byte_2_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_req_7e0, cc_byte_1_),
};
Acm_inst_req_7e0_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Acm_inst_req_7e0_descriptor_,
Acm_inst_req_7e0::default_instance_,
Acm_inst_req_7e0_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_req_7e0, _has_bits_[0]),
-1,
-1,
sizeof(Acm_inst_req_7e0),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_req_7e0, _internal_metadata_),
-1);
Esr_track01_500_descriptor_ = file->message_type(7);
static const int Esr_track01_500_offsets_[12] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_grouping_changed_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_oncoming_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_lat_rate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_bridge_object_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_width_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_status_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_rolling_count_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_range_rate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_range_accel_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_range_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_med_range_mode_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, can_tx_track_angle_),
};
Esr_track01_500_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_track01_500_descriptor_,
Esr_track01_500::default_instance_,
Esr_track01_500_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, _has_bits_[0]),
-1,
-1,
sizeof(Esr_track01_500),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_track01_500, _internal_metadata_),
-1);
Esr_track01_500_Can_tx_track_grouping_changedType_descriptor_ = Esr_track01_500_descriptor_->enum_type(0);
Esr_track01_500_Can_tx_track_oncomingType_descriptor_ = Esr_track01_500_descriptor_->enum_type(1);
Esr_track01_500_Can_tx_track_bridge_objectType_descriptor_ = Esr_track01_500_descriptor_->enum_type(2);
Esr_track01_500_Can_tx_track_statusType_descriptor_ = Esr_track01_500_descriptor_->enum_type(3);
Esr_track01_500_Can_tx_track_med_range_modeType_descriptor_ = Esr_track01_500_descriptor_->enum_type(4);
Esr_valid1_5d0_descriptor_ = file->message_type(8);
static const int Esr_valid1_5d0_offsets_[5] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid1_5d0, can_tx_valid_lr_sn_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid1_5d0, can_tx_valid_lr_range_rate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid1_5d0, can_tx_valid_lr_range_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid1_5d0, can_tx_valid_lr_power_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid1_5d0, can_tx_valid_lr_angle_),
};
Esr_valid1_5d0_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_valid1_5d0_descriptor_,
Esr_valid1_5d0::default_instance_,
Esr_valid1_5d0_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid1_5d0, _has_bits_[0]),
-1,
-1,
sizeof(Esr_valid1_5d0),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid1_5d0, _internal_metadata_),
-1);
Esr_valid2_5d1_descriptor_ = file->message_type(9);
static const int Esr_valid2_5d1_offsets_[5] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid2_5d1, can_tx_valid_mr_sn_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid2_5d1, can_tx_valid_mr_range_rate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid2_5d1, can_tx_valid_mr_range_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid2_5d1, can_tx_valid_mr_power_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid2_5d1, can_tx_valid_mr_angle_),
};
Esr_valid2_5d1_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_valid2_5d1_descriptor_,
Esr_valid2_5d1::default_instance_,
Esr_valid2_5d1_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid2_5d1, _has_bits_[0]),
-1,
-1,
sizeof(Esr_valid2_5d1),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_valid2_5d1, _internal_metadata_),
-1);
Acm_inst_resp_7e4_descriptor_ = file->message_type(10);
static const int Acm_inst_resp_7e4_offsets_[8] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_resp_7e4, data_7_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_resp_7e4, data_6_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_resp_7e4, data_5_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_resp_7e4, data_4_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_resp_7e4, data_3_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_resp_7e4, rtn_cmd_counter_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_resp_7e4, command_return_code_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_resp_7e4, pid_),
};
Acm_inst_resp_7e4_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Acm_inst_resp_7e4_descriptor_,
Acm_inst_resp_7e4::default_instance_,
Acm_inst_resp_7e4_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_resp_7e4, _has_bits_[0]),
-1,
-1,
sizeof(Acm_inst_resp_7e4),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Acm_inst_resp_7e4, _internal_metadata_),
-1);
Vehicle2_4f1_descriptor_ = file->message_type(11);
static const int Vehicle2_4f1_offsets_[18] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_volvo_short_track_roc_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_mr_only_transmit_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_lr_only_transmit_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_high_yaw_angle_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_clear_faults_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_use_angle_misalignment_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_turn_signal_status_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_blockage_disable_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_vehicle_speed_validity_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_mmr_upside_down_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_wiper_status_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_raw_data_enable_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_radar_cmd_radiate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_grouping_mode_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_maximum_tracks_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_lateral_mounting_offset_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_angle_misalignment_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, can_rx_scan_index_ack_),
};
Vehicle2_4f1_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Vehicle2_4f1_descriptor_,
Vehicle2_4f1::default_instance_,
Vehicle2_4f1_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, _has_bits_[0]),
-1,
-1,
sizeof(Vehicle2_4f1),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle2_4f1, _internal_metadata_),
-1);
Vehicle2_4f1_Can_rx_mr_only_transmitType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(0);
Vehicle2_4f1_Can_rx_lr_only_transmitType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(1);
Vehicle2_4f1_Can_rx_clear_faultsType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(2);
Vehicle2_4f1_Can_rx_use_angle_misalignmentType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(3);
Vehicle2_4f1_Can_rx_turn_signal_statusType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(4);
Vehicle2_4f1_Can_rx_blockage_disableType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(5);
Vehicle2_4f1_Can_rx_vehicle_speed_validityType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(6);
Vehicle2_4f1_Can_rx_mmr_upside_downType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(7);
Vehicle2_4f1_Can_rx_wiper_statusType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(8);
Vehicle2_4f1_Can_rx_raw_data_enableType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(9);
Vehicle2_4f1_Can_rx_radar_cmd_radiateType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(10);
Vehicle2_4f1_Can_rx_grouping_modeType_descriptor_ = Vehicle2_4f1_descriptor_->enum_type(11);
Vehicle1_4f0_descriptor_ = file->message_type(12);
static const int Vehicle1_4f0_offsets_[10] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, can_rx_steering_angle_validity_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, can_rx_steering_angle_rate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, can_rx_steering_angle_sign_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, can_rx_steering_angle_rate_sign_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, can_rx_steering_angle_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, can_rx_radius_curvature_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, can_rx_yaw_rate_validity_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, can_rx_yaw_rate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, can_rx_vehicle_speed_direction_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, can_rx_vehicle_speed_),
};
Vehicle1_4f0_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Vehicle1_4f0_descriptor_,
Vehicle1_4f0::default_instance_,
Vehicle1_4f0_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, _has_bits_[0]),
-1,
-1,
sizeof(Vehicle1_4f0),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle1_4f0, _internal_metadata_),
-1);
Vehicle1_4f0_Can_rx_steering_angle_validityType_descriptor_ = Vehicle1_4f0_descriptor_->enum_type(0);
Vehicle1_4f0_Can_rx_steering_angle_signType_descriptor_ = Vehicle1_4f0_descriptor_->enum_type(1);
Vehicle1_4f0_Can_rx_steering_angle_rate_signType_descriptor_ = Vehicle1_4f0_descriptor_->enum_type(2);
Vehicle1_4f0_Can_rx_yaw_rate_validityType_descriptor_ = Vehicle1_4f0_descriptor_->enum_type(3);
Vehicle1_4f0_Can_rx_vehicle_speed_directionType_descriptor_ = Vehicle1_4f0_descriptor_->enum_type(4);
Esr_sim1_5c0_descriptor_ = file->message_type(13);
static const int Esr_sim1_5c0_offsets_[9] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, can_rx_sim_track_id_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, can_rx_sim_status_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, can_rx_sim_range_rate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, can_rx_sim_range_accel_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, can_rx_sim_range_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, can_rx_sim_lat_rate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, can_rx_sim_lat_pos_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, can_rx_sim_function_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, can_rx_sim_angle_),
};
Esr_sim1_5c0_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_sim1_5c0_descriptor_,
Esr_sim1_5c0::default_instance_,
Esr_sim1_5c0_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, _has_bits_[0]),
-1,
-1,
sizeof(Esr_sim1_5c0),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_sim1_5c0, _internal_metadata_),
-1);
Esr_sim1_5c0_Can_rx_sim_track_idType_descriptor_ = Esr_sim1_5c0_descriptor_->enum_type(0);
Esr_sim1_5c0_Can_rx_sim_statusType_descriptor_ = Esr_sim1_5c0_descriptor_->enum_type(1);
Esr_sim1_5c0_Can_rx_sim_functionType_descriptor_ = Esr_sim1_5c0_descriptor_->enum_type(2);
Esr_status1_4e0_descriptor_ = file->message_type(14);
static const int Esr_status1_4e0_offsets_[7] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status1_4e0, can_tx_dsp_timestamp_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status1_4e0, can_tx_comm_error_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status1_4e0, can_tx_yaw_rate_calc_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status1_4e0, can_tx_vehicle_speed_calc_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status1_4e0, can_tx_scan_index_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status1_4e0, can_tx_rolling_count_1_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status1_4e0, can_tx_radius_curvature_calc_),
};
Esr_status1_4e0_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_status1_4e0_descriptor_,
Esr_status1_4e0::default_instance_,
Esr_status1_4e0_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status1_4e0, _has_bits_[0]),
-1,
-1,
sizeof(Esr_status1_4e0),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status1_4e0, _internal_metadata_),
-1);
Esr_status2_4e1_descriptor_ = file->message_type(15);
static const int Esr_status2_4e1_offsets_[13] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_yaw_rate_bias_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_veh_spd_comp_factor_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_sw_version_dsp_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_temperature_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_raw_data_mode_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_range_perf_error_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_overheat_error_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_maximum_tracks_ack_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_internal_error_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_grouping_mode_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_xcvr_operational_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_steering_angle_ack_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, can_tx_rolling_count_2_),
};
Esr_status2_4e1_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_status2_4e1_descriptor_,
Esr_status2_4e1::default_instance_,
Esr_status2_4e1_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, _has_bits_[0]),
-1,
-1,
sizeof(Esr_status2_4e1),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status2_4e1, _internal_metadata_),
-1);
Esr_status2_4e1_Can_tx_raw_data_modeType_descriptor_ = Esr_status2_4e1_descriptor_->enum_type(0);
Esr_status2_4e1_Can_tx_range_perf_errorType_descriptor_ = Esr_status2_4e1_descriptor_->enum_type(1);
Esr_status2_4e1_Can_tx_overheat_errorType_descriptor_ = Esr_status2_4e1_descriptor_->enum_type(2);
Esr_status2_4e1_Can_tx_internal_errorType_descriptor_ = Esr_status2_4e1_descriptor_->enum_type(3);
Esr_status2_4e1_Can_tx_grouping_modeType_descriptor_ = Esr_status2_4e1_descriptor_->enum_type(4);
Esr_status2_4e1_Can_tx_xcvr_operationalType_descriptor_ = Esr_status2_4e1_descriptor_->enum_type(5);
Esr_status8_5e7_descriptor_ = file->message_type(16);
static const int Esr_status8_5e7_offsets_[8] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status8_5e7, can_tx_history_fault_7_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status8_5e7, can_tx_history_fault_6_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status8_5e7, can_tx_history_fault_5_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status8_5e7, can_tx_history_fault_4_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status8_5e7, can_tx_history_fault_3_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status8_5e7, can_tx_history_fault_2_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status8_5e7, can_tx_history_fault_1_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status8_5e7, can_tx_history_fault_0_),
};
Esr_status8_5e7_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_status8_5e7_descriptor_,
Esr_status8_5e7::default_instance_,
Esr_status8_5e7_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status8_5e7, _has_bits_[0]),
-1,
-1,
sizeof(Esr_status8_5e7),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status8_5e7, _internal_metadata_),
-1);
Esr_status7_5e6_descriptor_ = file->message_type(17);
static const int Esr_status7_5e6_offsets_[8] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status7_5e6, can_tx_active_fault_7_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status7_5e6, can_tx_active_fault_6_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status7_5e6, can_tx_active_fault_5_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status7_5e6, can_tx_active_fault_4_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status7_5e6, can_tx_active_fault_3_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status7_5e6, can_tx_active_fault_2_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status7_5e6, can_tx_active_fault_0_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status7_5e6, can_tx_active_fault_1_),
};
Esr_status7_5e6_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Esr_status7_5e6_descriptor_,
Esr_status7_5e6::default_instance_,
Esr_status7_5e6_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status7_5e6, _has_bits_[0]),
-1,
-1,
sizeof(Esr_status7_5e6),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Esr_status7_5e6, _internal_metadata_),
-1);
Vehicle3_5f2_descriptor_ = file->message_type(18);
static const int Vehicle3_5f2_offsets_[15] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_serv_align_updates_need_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_serv_align_type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_serv_align_enable_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_aalign_avg_ctr_total_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_auto_align_converged_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_auto_align_disable_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_angle_mounting_offset_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_wheel_slip_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_radar_height_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_radar_fov_mr_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_radar_fov_lr_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_long_accel_validity_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_long_accel_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_lat_accel_validity_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, can_rx_lat_accel_),
};
Vehicle3_5f2_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Vehicle3_5f2_descriptor_,
Vehicle3_5f2::default_instance_,
Vehicle3_5f2_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, _has_bits_[0]),
-1,
-1,
sizeof(Vehicle3_5f2),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle3_5f2, _internal_metadata_),
-1);
Vehicle3_5f2_Can_rx_serv_align_typeType_descriptor_ = Vehicle3_5f2_descriptor_->enum_type(0);
Vehicle3_5f2_Can_rx_serv_align_enableType_descriptor_ = Vehicle3_5f2_descriptor_->enum_type(1);
Vehicle3_5f2_Can_rx_auto_align_convergedType_descriptor_ = Vehicle3_5f2_descriptor_->enum_type(2);
Vehicle3_5f2_Can_rx_auto_align_disableType_descriptor_ = Vehicle3_5f2_descriptor_->enum_type(3);
Vehicle3_5f2_Can_rx_wheel_slipType_descriptor_ = Vehicle3_5f2_descriptor_->enum_type(4);
Vehicle3_5f2_Can_rx_long_accel_validityType_descriptor_ = Vehicle3_5f2_descriptor_->enum_type(5);
Vehicle3_5f2_Can_rx_lat_accel_validityType_descriptor_ = Vehicle3_5f2_descriptor_->enum_type(6);
Vehicle4_5f3_descriptor_ = file->message_type(19);
static const int Vehicle4_5f3_offsets_[10] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, can_rx_fac_tgt_range_r2m_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, can_rx_fac_tgt_range_m2t_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, can_rx_fac_tgt_range_1_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, can_rx_fac_tgt_mtg_space_ver_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, can_rx_fac_tgt_mtg_space_hor_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, can_rx_fac_tgt_mtg_offset_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, can_rx_fac_align_samp_req_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, can_rx_fac_align_max_nt_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, can_rx_fac_align_cmd_2_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, can_rx_fac_align_cmd_1_),
};
Vehicle4_5f3_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Vehicle4_5f3_descriptor_,
Vehicle4_5f3::default_instance_,
Vehicle4_5f3_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, _has_bits_[0]),
-1,
-1,
sizeof(Vehicle4_5f3),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle4_5f3, _internal_metadata_),
-1);
Vehicle4_5f3_Can_rx_fac_align_cmd_2Type_descriptor_ = Vehicle4_5f3_descriptor_->enum_type(0);
Vehicle4_5f3_Can_rx_fac_align_cmd_1Type_descriptor_ = Vehicle4_5f3_descriptor_->enum_type(1);
Vehicle5_5f4_descriptor_ = file->message_type(20);
static const int Vehicle5_5f4_offsets_[9] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, can_rx_yaw_rate_bias_shift_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, can_rx_steering_gear_ratio_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, can_rx_wheelbase_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, can_rx_distance_rear_axle_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, can_rx_cw_blockage_threshold_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, can_rx_funnel_offset_right_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, can_rx_funnel_offset_left_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, can_rx_beamwidth_vert_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, can_rx_oversteer_understeer_),
};
Vehicle5_5f4_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Vehicle5_5f4_descriptor_,
Vehicle5_5f4::default_instance_,
Vehicle5_5f4_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, _has_bits_[0]),
-1,
-1,
sizeof(Vehicle5_5f4),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle5_5f4, _internal_metadata_),
-1);
Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType_descriptor_ = Vehicle5_5f4_descriptor_->enum_type(0);
Vehicle6_5f5_descriptor_ = file->message_type(21);
static const int Vehicle6_5f5_offsets_[5] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle6_5f5, can_rx_inner_funnel_offset_right_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle6_5f5, can_rx_inner_funnel_offset_left_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle6_5f5, can_volvo_fa_range_max_short_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle6_5f5, can_volvo_fa_min_vspeed_short_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle6_5f5, can_volvo_fa_aalign_estimate_),
};
Vehicle6_5f5_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
Vehicle6_5f5_descriptor_,
Vehicle6_5f5::default_instance_,
Vehicle6_5f5_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle6_5f5, _has_bits_[0]),
-1,
-1,
sizeof(Vehicle6_5f5),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Vehicle6_5f5, _internal_metadata_),
-1);
DelphiESR_descriptor_ = file->message_type(22);
static const int DelphiESR_offsets_[23] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, header_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_status9_5e8_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_status6_5e5_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_status5_5e4_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_status3_4e2_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_status4_4e3_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_trackmotionpower_540_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, acm_inst_req_7e0_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_track01_500_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_valid1_5d0_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_valid2_5d1_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, acm_inst_resp_7e4_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, vehicle2_4f1_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, vehicle1_4f0_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_sim1_5c0_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_status1_4e0_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_status2_4e1_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_status8_5e7_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, esr_status7_5e6_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, vehicle3_5f2_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, vehicle4_5f3_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, vehicle5_5f4_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, vehicle6_5f5_),
};
DelphiESR_reflection_ =
::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
DelphiESR_descriptor_,
DelphiESR::default_instance_,
DelphiESR_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, _has_bits_[0]),
-1,
-1,
sizeof(DelphiESR),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DelphiESR, _internal_metadata_),
-1);
}
namespace {
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
&protobuf_AssignDesc_drivers_2fdelphi_5fesr_2eproto);
}
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_status9_5e8_descriptor_, &Esr_status9_5e8::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_status6_5e5_descriptor_, &Esr_status6_5e5::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_status5_5e4_descriptor_, &Esr_status5_5e4::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_status3_4e2_descriptor_, &Esr_status3_4e2::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_status4_4e3_descriptor_, &Esr_status4_4e3::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_trackmotionpower_540_descriptor_, &Esr_trackmotionpower_540::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_trackmotionpower_540_Motionpower_descriptor_, &Esr_trackmotionpower_540_Motionpower::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Acm_inst_req_7e0_descriptor_, &Acm_inst_req_7e0::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_track01_500_descriptor_, &Esr_track01_500::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_valid1_5d0_descriptor_, &Esr_valid1_5d0::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_valid2_5d1_descriptor_, &Esr_valid2_5d1::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Acm_inst_resp_7e4_descriptor_, &Acm_inst_resp_7e4::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Vehicle2_4f1_descriptor_, &Vehicle2_4f1::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Vehicle1_4f0_descriptor_, &Vehicle1_4f0::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_sim1_5c0_descriptor_, &Esr_sim1_5c0::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_status1_4e0_descriptor_, &Esr_status1_4e0::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_status2_4e1_descriptor_, &Esr_status2_4e1::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_status8_5e7_descriptor_, &Esr_status8_5e7::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Esr_status7_5e6_descriptor_, &Esr_status7_5e6::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Vehicle3_5f2_descriptor_, &Vehicle3_5f2::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Vehicle4_5f3_descriptor_, &Vehicle4_5f3::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Vehicle5_5f4_descriptor_, &Vehicle5_5f4::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Vehicle6_5f5_descriptor_, &Vehicle6_5f5::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
DelphiESR_descriptor_, &DelphiESR::default_instance());
}
} // namespace
void protobuf_ShutdownFile_drivers_2fdelphi_5fesr_2eproto() {
delete Esr_status9_5e8::default_instance_;
delete Esr_status9_5e8_reflection_;
delete Esr_status6_5e5::default_instance_;
delete Esr_status6_5e5_reflection_;
delete Esr_status5_5e4::default_instance_;
delete Esr_status5_5e4_reflection_;
delete Esr_status3_4e2::default_instance_;
delete Esr_status3_4e2_reflection_;
delete Esr_status4_4e3::default_instance_;
delete Esr_status4_4e3_reflection_;
delete Esr_trackmotionpower_540::default_instance_;
delete Esr_trackmotionpower_540_reflection_;
delete Esr_trackmotionpower_540_Motionpower::default_instance_;
delete Esr_trackmotionpower_540_Motionpower_reflection_;
delete Acm_inst_req_7e0::default_instance_;
delete Acm_inst_req_7e0_reflection_;
delete Esr_track01_500::default_instance_;
delete Esr_track01_500_reflection_;
delete Esr_valid1_5d0::default_instance_;
delete Esr_valid1_5d0_reflection_;
delete Esr_valid2_5d1::default_instance_;
delete Esr_valid2_5d1_reflection_;
delete Acm_inst_resp_7e4::default_instance_;
delete Acm_inst_resp_7e4_reflection_;
delete Vehicle2_4f1::default_instance_;
delete Vehicle2_4f1_reflection_;
delete Vehicle1_4f0::default_instance_;
delete Vehicle1_4f0_reflection_;
delete Esr_sim1_5c0::default_instance_;
delete Esr_sim1_5c0_reflection_;
delete Esr_status1_4e0::default_instance_;
delete Esr_status1_4e0_reflection_;
delete Esr_status2_4e1::default_instance_;
delete Esr_status2_4e1_reflection_;
delete Esr_status8_5e7::default_instance_;
delete Esr_status8_5e7_reflection_;
delete Esr_status7_5e6::default_instance_;
delete Esr_status7_5e6_reflection_;
delete Vehicle3_5f2::default_instance_;
delete Vehicle3_5f2_reflection_;
delete Vehicle4_5f3::default_instance_;
delete Vehicle4_5f3_reflection_;
delete Vehicle5_5f4::default_instance_;
delete Vehicle5_5f4_reflection_;
delete Vehicle6_5f5::default_instance_;
delete Vehicle6_5f5_reflection_;
delete DelphiESR::default_instance_;
delete DelphiESR_reflection_;
}
void protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto() GOOGLE_ATTRIBUTE_COLD;
void protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto() {
static bool already_here = false;
if (already_here) return;
already_here = true;
GOOGLE_PROTOBUF_VERIFY_VERSION;
::apollo::common::protobuf_AddDesc_common_2fheader_2eproto();
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\030drivers/delphi_esr.proto\022\016apollo.drive"
"rs\032\023common/header.proto\"\374\001\n\017Esr_status9_"
"5e8\022\034\n\024can_tx_path_id_acc_3\030\001 \001(\005\022\034\n\024can"
"_tx_path_id_acc_2\030\002 \001(\005\022%\n\035can_tx_filter"
"ed_xohp_acc_cipv\030\003 \001(\001\022$\n\034can_tx_water_s"
"pray_target_id\030\004 \001(\005\022\"\n\032can_tx_serial_nu"
"m_3rd_byte\030\005 \001(\005\022\035\n\025can_tx_sideslip_angl"
"e\030\006 \001(\001\022\035\n\025can_tx_avg_pwr_cwblkg\030\007 \001(\005\"\232"
"\021\n\017Esr_status6_5e5\022&\n\036can_tx_sw_version_"
"dsp_3rd_byte\030\001 \001(\005\022h\n\035can_tx_vertical_al"
"ign_updated\030\002 \001(\0162A.apollo.drivers.Esr_s"
"tatus6_5e5.Can_tx_vertical_align_updated"
"Type\022$\n\034can_tx_vertical_misalignment\030\003 \001"
"(\001\022&\n\036can_tx_serv_align_updates_done\030\004 \001"
"(\005\022T\n\023can_tx_found_target\030\005 \001(\01627.apollo"
".drivers.Esr_status6_5e5.Can_tx_found_ta"
"rgetType\022#\n\033can_tx_factory_misalignment\030"
"\006 \001(\001\022h\n\035can_tx_factory_align_status_2\030\007"
" \001(\0162A.apollo.drivers.Esr_status6_5e5.Ca"
"n_tx_factory_align_status_2Type\022h\n\035can_t"
"x_factory_align_status_1\030\010 \001(\0162A.apollo."
"drivers.Esr_status6_5e5.Can_tx_factory_a"
"lign_status_1Type\022d\n\033can_tx_recommend_un"
"converge\030\t \001(\0162\?.apollo.drivers.Esr_stat"
"us6_5e5.Can_tx_recommend_unconvergeType\022"
"\034\n\024can_tx_wave_diff_a2d\030\n \001(\005\022^\n\030can_tx_"
"system_power_mode\030\013 \001(\0162<.apollo.drivers"
".Esr_status6_5e5.Can_tx_system_power_mod"
"eType\022\035\n\025can_tx_supply_n5v_a2d\030\014 \001(\005\022\036\n\026"
"can_tx_supply_1p8v_a2d\030\r \001(\005\"}\n!Can_tx_v"
"ertical_align_updatedType\022-\n)CAN_TX_VERT"
"ICAL_ALIGN_UPDATED_NOT_UPDATED\020\000\022)\n%CAN_"
"TX_VERTICAL_ALIGN_UPDATED_UPDATED\020\001\"[\n\027C"
"an_tx_found_targetType\022!\n\035CAN_TX_FOUND_T"
"ARGET_NOT_FOUND\020\000\022\035\n\031CAN_TX_FOUND_TARGET"
"_FOUND\020\001\"\273\002\n!Can_tx_factory_align_status"
"_2Type\022%\n!CAN_TX_FACTORY_ALIGN_STATUS_2_"
"OFF\020\000\022&\n\"CAN_TX_FACTORY_ALIGN_STATUS_2_B"
"USY\020\001\022)\n%CAN_TX_FACTORY_ALIGN_STATUS_2_S"
"UCCESS\020\002\0220\n,CAN_TX_FACTORY_ALIGN_STATUS_"
"2_FAIL_NO_TARGET\020\003\0224\n0CAN_TX_FACTORY_ALI"
"GN_STATUS_2_FAIL_DEV_TOO_LARGE\020\004\0224\n0CAN_"
"TX_FACTORY_ALIGN_STATUS_2_FAIL_VAR_TOO_L"
"ARGE\020\005\"\273\002\n!Can_tx_factory_align_status_1"
"Type\022%\n!CAN_TX_FACTORY_ALIGN_STATUS_1_OF"
"F\020\000\022&\n\"CAN_TX_FACTORY_ALIGN_STATUS_1_BUS"
"Y\020\001\022)\n%CAN_TX_FACTORY_ALIGN_STATUS_1_SUC"
"CESS\020\002\0220\n,CAN_TX_FACTORY_ALIGN_STATUS_1_"
"FAIL_NO_TARGET\020\003\0224\n0CAN_TX_FACTORY_ALIGN"
"_STATUS_1_FAIL_DEV_TOO_LARGE\020\004\0224\n0CAN_TX"
"_FACTORY_ALIGN_STATUS_1_FAIL_VAR_TOO_LAR"
"GE\020\005\"{\n\037Can_tx_recommend_unconvergeType\022"
"-\n)CAN_TX_RECOMMEND_UNCONVERGE_NOT_RECOM"
"MEND\020\000\022)\n%CAN_TX_RECOMMEND_UNCONVERGE_RE"
"COMMEND\020\001\"\337\002\n\034Can_tx_system_power_modeTy"
"pe\022%\n!CAN_TX_SYSTEM_POWER_MODE_DSP_INIT\020"
"\000\022(\n$CAN_TX_SYSTEM_POWER_MODE_RADIATE_OF"
"F\020\001\022\'\n#CAN_TX_SYSTEM_POWER_MODE_RADIATE_"
"ON\020\002\022)\n%CAN_TX_SYSTEM_POWER_MODE_DSP_SHU"
"TDOWN\020\003\022$\n CAN_TX_SYSTEM_POWER_MODE_DSP_"
"OFF\020\004\022*\n&CAN_TX_SYSTEM_POWER_MODE_HOST_S"
"HUTDOWN\020\005\022!\n\035CAN_TX_SYSTEM_POWER_MODE_TE"
"ST\020\006\022%\n!CAN_TX_SYSTEM_POWER_MODE_7INVALI"
"D\020\007\"\367\001\n\017Esr_status5_5e4\022\035\n\025can_tx_supply"
"_10v_a2d\030\001 \001(\005\022\030\n\020can_tx_temp2_a2d\030\002 \001(\005"
"\022\030\n\020can_tx_temp1_a2d\030\003 \001(\005\022\031\n\021can_tx_swb"
"att_a2d\030\004 \001(\005\022\036\n\026can_tx_supply_5vdx_a2d\030"
"\005 \001(\005\022\035\n\025can_tx_supply_5va_a2d\030\006 \001(\005\022\036\n\026"
"can_tx_supply_3p3v_a2d\030\007 \001(\005\022\027\n\017can_tx_i"
"gnp_a2d\030\010 \001(\005\"\250\001\n\017Esr_status3_4e2\022\035\n\025can"
"_tx_sw_version_pld\030\001 \001(\005\022\036\n\026can_tx_sw_ve"
"rsion_host\030\002 \001(\005\022\031\n\021can_tx_hw_version\030\003 "
"\001(\005\022 \n\030can_tx_interface_version\030\004 \001(\005\022\031\n"
"\021can_tx_serial_num\030\005 \001(\005\"\226\013\n\017Esr_status4"
"_4e3\022\\\n\027can_tx_truck_target_det\030\001 \001(\0162;."
"apollo.drivers.Esr_status4_4e3.Can_tx_tr"
"uck_target_detType\022l\n\037can_tx_lr_only_gra"
"ting_lobe_det\030\002 \001(\0162C.apollo.drivers.Esr"
"_status4_4e3.Can_tx_lr_only_grating_lobe"
"_detType\022^\n\030can_tx_sidelobe_blockage\030\003 \001"
"(\0162<.apollo.drivers.Esr_status4_4e3.Can_"
"tx_sidelobe_blockageType\022\\\n\027can_tx_parti"
"al_blockage\030\004 \001(\0162;.apollo.drivers.Esr_s"
"tatus4_4e3.Can_tx_partial_blockageType\022\037"
"\n\027can_tx_path_id_acc_stat\030\005 \001(\005\022P\n\021can_t"
"x_mr_lr_mode\030\006 \001(\01625.apollo.drivers.Esr_"
"status4_4e3.Can_tx_mr_lr_modeType\022\037\n\027can"
"_tx_auto_align_angle\030\007 \001(\001\022\036\n\026can_tx_rol"
"ling_count_3\030\010 \001(\005\022\037\n\027can_tx_path_id_fcw"
"_stat\030\t \001(\005\022\037\n\027can_tx_path_id_fcw_move\030\n"
" \001(\005\022 \n\030can_tx_path_id_cmbb_stat\030\013 \001(\005\022 "
"\n\030can_tx_path_id_cmbb_move\030\014 \001(\005\022\032\n\022can_"
"tx_path_id_acc\030\r \001(\005\"m\n\033Can_tx_truck_tar"
"get_detType\022(\n$CAN_TX_TRUCK_TARGET_DET_N"
"OT_DETECTED\020\000\022$\n CAN_TX_TRUCK_TARGET_DET"
"_DETECTED\020\001\"\205\001\n#Can_tx_lr_only_grating_l"
"obe_detType\0220\n,CAN_TX_LR_ONLY_GRATING_LO"
"BE_DET_NOT_DETECTED\020\000\022,\n(CAN_TX_LR_ONLY_"
"GRATING_LOBE_DET_DETECTED\020\001\"a\n\034Can_tx_si"
"delobe_blockageType\022 \n\034CAN_TX_SIDELOBE_B"
"LOCKAGE_OFF\020\000\022\037\n\033CAN_TX_SIDELOBE_BLOCKAG"
"E_ON\020\001\"k\n\033Can_tx_partial_blockageType\022\'\n"
"#CAN_TX_PARTIAL_BLOCKAGE_NOT_BLOCKED\020\000\022#"
"\n\037CAN_TX_PARTIAL_BLOCKAGE_BLOCKED\020\001\"\333\001\n\025"
"Can_tx_mr_lr_modeType\022\036\n\032CAN_TX_MR_LR_MO"
"DE_RESERVED\020\000\0225\n1CAN_TX_MR_LR_MODE_OUTPU"
"T_ONLY_MEDIUM_RANGE_TRACKS\020\001\0223\n/CAN_TX_M"
"R_LR_MODE_OUTPUT_ONLY_LONG_RANGE_TRACKS\020"
"\002\0226\n2CAN_TX_MR_LR_MODE_OUTPUT_ALL_MEDIUM"
"_RANGE_AND_LONG\020\003\"\311\002\n\030Esr_trackmotionpow"
"er_540\022$\n\034can_tx_track_rolling_count_2\030\001"
" \001(\010\022!\n\031can_tx_track_can_id_group\030\002 \001(\005\022"
"W\n\031can_tx_track_motion_power\030\003 \003(\01324.apo"
"llo.drivers.Esr_trackmotionpower_540.Mot"
"ionpower\032\212\001\n\013Motionpower\022\033\n\023can_tx_track"
"_moving\030\001 \001(\010\022 \n\030can_tx_track_moving_fas"
"t\030\002 \001(\010\022 \n\030can_tx_track_moving_slow\030\003 \001("
"\010\022\032\n\022can_tx_track_power\030\004 \001(\005\"\211\001\n\020Acm_in"
"st_req_7e0\022\023\n\013command_ctr\030\001 \001(\005\022\024\n\014comma"
"nd_code\030\002 \001(\005\022\021\n\tcc_word_2\030\003 \001(\005\022\021\n\tcc_w"
"ord_1\030\004 \001(\005\022\021\n\tcc_byte_2\030\005 \001(\005\022\021\n\tcc_byt"
"e_1\030\006 \001(\005\"\203\r\n\017Esr_track01_500\022h\n\035can_tx_"
"track_grouping_changed\030\001 \001(\0162A.apollo.dr"
"ivers.Esr_track01_500.Can_tx_track_group"
"ing_changedType\022X\n\025can_tx_track_oncoming"
"\030\002 \001(\01629.apollo.drivers.Esr_track01_500."
"Can_tx_track_oncomingType\022\035\n\025can_tx_trac"
"k_lat_rate\030\003 \001(\001\022b\n\032can_tx_track_bridge_"
"object\030\004 \001(\0162>.apollo.drivers.Esr_track0"
"1_500.Can_tx_track_bridge_objectType\022\032\n\022"
"can_tx_track_width\030\005 \001(\001\022T\n\023can_tx_track"
"_status\030\006 \001(\01627.apollo.drivers.Esr_track"
"01_500.Can_tx_track_statusType\022\"\n\032can_tx"
"_track_rolling_count\030\007 \001(\010\022\037\n\027can_tx_tra"
"ck_range_rate\030\010 \001(\001\022 \n\030can_tx_track_rang"
"e_accel\030\t \001(\001\022\032\n\022can_tx_track_range\030\n \001("
"\001\022d\n\033can_tx_track_med_range_mode\030\013 \001(\0162\?"
".apollo.drivers.Esr_track01_500.Can_tx_t"
"rack_med_range_modeType\022\032\n\022can_tx_track_"
"angle\030\014 \001(\001\"\213\001\n!Can_tx_track_grouping_ch"
"angedType\0223\n/CAN_TX_TRACK_GROUPING_CHANG"
"ED_GROUPINGUNCHANGED\020\000\0221\n-CAN_TX_TRACK_G"
"ROUPING_CHANGED_GROUPINGCHANGED\020\001\"f\n\031Can"
"_tx_track_oncomingType\022%\n!CAN_TX_TRACK_O"
"NCOMING_NOTONCOMING\020\000\022\"\n\036CAN_TX_TRACK_ON"
"COMING_ONCOMING\020\001\"r\n\036Can_tx_track_bridge"
"_objectType\022)\n%CAN_TX_TRACK_BRIDGE_OBJEC"
"T_NOT_BRIDGE\020\000\022%\n!CAN_TX_TRACK_BRIDGE_OB"
"JECT_BRIDGE\020\001\"\337\002\n\027Can_tx_track_statusTyp"
"e\022!\n\035CAN_TX_TRACK_STATUS_NO_TARGET\020\000\022\"\n\036"
"CAN_TX_TRACK_STATUS_NEW_TARGET\020\001\022*\n&CAN_"
"TX_TRACK_STATUS_NEW_UPDATED_TARGET\020\002\022&\n\""
"CAN_TX_TRACK_STATUS_UPDATED_TARGET\020\003\022&\n\""
"CAN_TX_TRACK_STATUS_COASTED_TARGET\020\004\022%\n!"
"CAN_TX_TRACK_STATUS_MERGED_TARGET\020\005\022.\n*C"
"AN_TX_TRACK_STATUS_INVALID_COASTED_TARGE"
"T\020\006\022*\n&CAN_TX_TRACK_STATUS_NEW_COASTED_T"
"ARGET\020\007\"\345\001\n\037Can_tx_track_med_range_modeT"
"ype\022/\n+CAN_TX_TRACK_MED_RANGE_MODE_NO_MR"
"_LR_UPDATE\020\000\022.\n*CAN_TX_TRACK_MED_RANGE_M"
"ODE_MR_UPDATE_ONLY\020\001\022.\n*CAN_TX_TRACK_MED"
"_RANGE_MODE_LR_UPDATE_ONLY\020\002\0221\n-CAN_TX_T"
"RACK_MED_RANGE_MODE_BOTH_MR_LR_UPDATE\020\003\""
"\255\001\n\016Esr_valid1_5d0\022\032\n\022can_tx_valid_lr_sn"
"\030\001 \001(\005\022\"\n\032can_tx_valid_lr_range_rate\030\002 \001"
"(\001\022\035\n\025can_tx_valid_lr_range\030\003 \001(\001\022\035\n\025can"
"_tx_valid_lr_power\030\004 \001(\005\022\035\n\025can_tx_valid"
"_lr_angle\030\005 \001(\001\"\255\001\n\016Esr_valid2_5d1\022\032\n\022ca"
"n_tx_valid_mr_sn\030\001 \001(\005\022\"\n\032can_tx_valid_m"
"r_range_rate\030\002 \001(\001\022\035\n\025can_tx_valid_mr_ra"
"nge\030\003 \001(\001\022\035\n\025can_tx_valid_mr_power\030\004 \001(\005"
"\022\035\n\025can_tx_valid_mr_angle\030\005 \001(\001\"\246\001\n\021Acm_"
"inst_resp_7e4\022\016\n\006data_7\030\001 \001(\005\022\016\n\006data_6\030"
"\002 \001(\005\022\016\n\006data_5\030\003 \001(\005\022\016\n\006data_4\030\004 \001(\005\022\016\n"
"\006data_3\030\005 \001(\005\022\027\n\017rtn_cmd_counter\030\006 \001(\005\022\033"
"\n\023command_return_code\030\007 \001(\005\022\013\n\003pid\030\010 \001(\005"
"\"\237\025\n\014Vehicle2_4f1\022$\n\034can_rx_volvo_short_"
"track_roc\030\001 \001(\001\022Y\n\027can_rx_mr_only_transm"
"it\030\002 \001(\01628.apollo.drivers.Vehicle2_4f1.C"
"an_rx_mr_only_transmitType\022Y\n\027can_rx_lr_"
"only_transmit\030\003 \001(\01628.apollo.drivers.Veh"
"icle2_4f1.Can_rx_lr_only_transmitType\022\035\n"
"\025can_rx_high_yaw_angle\030\004 \001(\005\022Q\n\023can_rx_c"
"lear_faults\030\005 \001(\01624.apollo.drivers.Vehic"
"le2_4f1.Can_rx_clear_faultsType\022e\n\035can_r"
"x_use_angle_misalignment\030\006 \001(\0162>.apollo."
"drivers.Vehicle2_4f1.Can_rx_use_angle_mi"
"salignmentType\022]\n\031can_rx_turn_signal_sta"
"tus\030\007 \001(\0162:.apollo.drivers.Vehicle2_4f1."
"Can_rx_turn_signal_statusType\022Y\n\027can_rx_"
"blockage_disable\030\010 \001(\01628.apollo.drivers."
"Vehicle2_4f1.Can_rx_blockage_disableType"
"\022e\n\035can_rx_vehicle_speed_validity\030\t \001(\0162"
">.apollo.drivers.Vehicle2_4f1.Can_rx_veh"
"icle_speed_validityType\022W\n\026can_rx_mmr_up"
"side_down\030\n \001(\01627.apollo.drivers.Vehicle"
"2_4f1.Can_rx_mmr_upside_downType\022Q\n\023can_"
"rx_wiper_status\030\013 \001(\01624.apollo.drivers.V"
"ehicle2_4f1.Can_rx_wiper_statusType\022W\n\026c"
"an_rx_raw_data_enable\030\014 \001(\01627.apollo.dri"
"vers.Vehicle2_4f1.Can_rx_raw_data_enable"
"Type\022[\n\030can_rx_radar_cmd_radiate\030\r \001(\01629"
".apollo.drivers.Vehicle2_4f1.Can_rx_rada"
"r_cmd_radiateType\022S\n\024can_rx_grouping_mod"
"e\030\016 \001(\01625.apollo.drivers.Vehicle2_4f1.Ca"
"n_rx_grouping_modeType\022\035\n\025can_rx_maximum"
"_tracks\030\017 \001(\005\022&\n\036can_rx_lateral_mounting"
"_offset\030\020 \001(\001\022!\n\031can_rx_angle_misalignme"
"nt\030\021 \001(\001\022\035\n\025can_rx_scan_index_ack\030\022 \001(\005\""
"^\n\033Can_rx_mr_only_transmitType\022\037\n\033CAN_RX"
"_MR_ONLY_TRANSMIT_OFF\020\000\022\036\n\032CAN_RX_MR_ONL"
"Y_TRANSMIT_ON\020\001\"^\n\033Can_rx_lr_only_transm"
"itType\022\037\n\033CAN_RX_LR_ONLY_TRANSMIT_OFF\020\000\022"
"\036\n\032CAN_RX_LR_ONLY_TRANSMIT_ON\020\001\"R\n\027Can_r"
"x_clear_faultsType\022\033\n\027CAN_RX_CLEAR_FAULT"
"S_OFF\020\000\022\032\n\026CAN_RX_CLEAR_FAULTS_ON\020\001\"p\n!C"
"an_rx_use_angle_misalignmentType\022%\n!CAN_"
"RX_USE_ANGLE_MISALIGNMENT_OFF\020\000\022$\n CAN_R"
"X_USE_ANGLE_MISALIGNMENT_ON\020\001\"\264\001\n\035Can_rx"
"_turn_signal_statusType\022!\n\035CAN_RX_TURN_S"
"IGNAL_STATUS_OFF\020\000\022\"\n\036CAN_RX_TURN_SIGNAL"
"_STATUS_LEFT\020\001\022#\n\037CAN_RX_TURN_SIGNAL_STA"
"TUS_RIGHT\020\002\022\'\n#CAN_RX_TURN_SIGNAL_STATUS"
"_INVALID_3\020\003\"h\n\033Can_rx_blockage_disableT"
"ype\022#\n\037CAN_RX_BLOCKAGE_DISABLE_ENABLED\020\000"
"\022$\n CAN_RX_BLOCKAGE_DISABLE_DISABLED\020\001\"w"
"\n!Can_rx_vehicle_speed_validityType\022)\n%C"
"AN_RX_VEHICLE_SPEED_VALIDITY_INVALID\020\000\022\'"
"\n#CAN_RX_VEHICLE_SPEED_VALIDITY_VALID\020\001\""
"n\n\032Can_rx_mmr_upside_downType\022(\n$CAN_RX_"
"MMR_UPSIDE_DOWN_RIGHT_SIDE_UP\020\000\022&\n\"CAN_R"
"X_MMR_UPSIDE_DOWN_UPSIDE_DOWN\020\001\"R\n\027Can_r"
"x_wiper_statusType\022\033\n\027CAN_RX_WIPER_STATU"
"S_OFF\020\000\022\032\n\026CAN_RX_WIPER_STATUS_ON\020\001\"a\n\032C"
"an_rx_raw_data_enableType\022#\n\037CAN_RX_RAW_"
"DATA_ENABLE_FILTERED\020\000\022\036\n\032CAN_RX_RAW_DAT"
"A_ENABLE_RAW\020\001\"a\n\034Can_rx_radar_cmd_radia"
"teType\022 \n\034CAN_RX_RADAR_CMD_RADIATE_OFF\020\000"
"\022\037\n\033CAN_RX_RADAR_CMD_RADIATE_ON\020\001\"\316\001\n\030Ca"
"n_rx_grouping_modeType\022$\n CAN_RX_GROUPIN"
"G_MODE_NO_GROUPING\020\000\022*\n&CAN_RX_GROUPING_"
"MODE_GROUP_MOVING_ONLY\020\001\022.\n*CAN_RX_GROUP"
"ING_MODE_GROUP_STATIONARY_ONLY\020\002\0220\n,CAN_"
"RX_GROUPING_MODE_GROUP_MOVING_STATIONARY"
"\020\003\"\222\n\n\014Vehicle1_4f0\022g\n\036can_rx_steering_a"
"ngle_validity\030\001 \001(\0162\?.apollo.drivers.Veh"
"icle1_4f0.Can_rx_steering_angle_validity"
"Type\022\"\n\032can_rx_steering_angle_rate\030\002 \001(\005"
"\022_\n\032can_rx_steering_angle_sign\030\003 \001(\0162;.a"
"pollo.drivers.Vehicle1_4f0.Can_rx_steeri"
"ng_angle_signType\022i\n\037can_rx_steering_ang"
"le_rate_sign\030\004 \001(\0162@.apollo.drivers.Vehi"
"cle1_4f0.Can_rx_steering_angle_rate_sign"
"Type\022\035\n\025can_rx_steering_angle\030\005 \001(\005\022\037\n\027c"
"an_rx_radius_curvature\030\006 \001(\005\022[\n\030can_rx_y"
"aw_rate_validity\030\007 \001(\01629.apollo.drivers."
"Vehicle1_4f0.Can_rx_yaw_rate_validityTyp"
"e\022\027\n\017can_rx_yaw_rate\030\010 \001(\001\022g\n\036can_rx_veh"
"icle_speed_direction\030\t \001(\0162\?.apollo.driv"
"ers.Vehicle1_4f0.Can_rx_vehicle_speed_di"
"rectionType\022\034\n\024can_rx_vehicle_speed\030\n \001("
"\001\"z\n\"Can_rx_steering_angle_validityType\022"
"*\n&CAN_RX_STEERING_ANGLE_VALIDITY_INVALI"
"D\020\000\022(\n$CAN_RX_STEERING_ANGLE_VALIDITY_VA"
"LID\020\001\"{\n\036Can_rx_steering_angle_signType\022"
"/\n+CAN_RX_STEERING_ANGLE_SIGN_COUNTERCLO"
"CKWISE\020\000\022(\n$CAN_RX_STEERING_ANGLE_SIGN_C"
"LOCKWISE\020\001\"\212\001\n#Can_rx_steering_angle_rat"
"e_signType\0224\n0CAN_RX_STEERING_ANGLE_RATE"
"_SIGN_COUNTERCLOCKWISE\020\000\022-\n)CAN_RX_STEER"
"ING_ANGLE_RATE_SIGN_CLOCKWISE\020\001\"h\n\034Can_r"
"x_yaw_rate_validityType\022$\n CAN_RX_YAW_RA"
"TE_VALIDITY_INVALID\020\000\022\"\n\036CAN_RX_YAW_RATE"
"_VALIDITY_VALID\020\001\"|\n\"Can_rx_vehicle_spee"
"d_directionType\022*\n&CAN_RX_VEHICLE_SPEED_"
"DIRECTION_FORWARD\020\000\022*\n&CAN_RX_VEHICLE_SP"
"EED_DIRECTION_REVERSE\020\001\"\202\010\n\014Esr_sim1_5c0"
"\022Q\n\023can_rx_sim_track_id\030\001 \001(\01624.apollo.d"
"rivers.Esr_sim1_5c0.Can_rx_sim_track_idT"
"ype\022M\n\021can_rx_sim_status\030\002 \001(\01622.apollo."
"drivers.Esr_sim1_5c0.Can_rx_sim_statusTy"
"pe\022\035\n\025can_rx_sim_range_rate\030\003 \001(\001\022\036\n\026can"
"_rx_sim_range_accel\030\004 \001(\001\022\030\n\020can_rx_sim_"
"range\030\005 \001(\005\022\033\n\023can_rx_sim_lat_rate\030\006 \001(\001"
"\022\032\n\022can_rx_sim_lat_pos\030\007 \001(\001\022Q\n\023can_rx_s"
"im_function\030\010 \001(\01624.apollo.drivers.Esr_s"
"im1_5c0.Can_rx_sim_functionType\022\030\n\020can_r"
"x_sim_angle\030\t \001(\001\"\200\001\n\027Can_rx_sim_track_i"
"dType\022!\n\035CAN_RX_SIM_TRACK_ID_NO_TARGET\020\000"
"\022 \n\034CAN_RX_SIM_TRACK_ID_TARGET_1\020\001\022 \n\034CA"
"N_RX_SIM_TRACK_ID_TARGET_2\020\002\"\217\001\n\025Can_rx_"
"sim_statusType\022\035\n\031CAN_RX_SIM_STATUS_INVA"
"LID\020\000\022\031\n\025CAN_RX_SIM_STATUS_NEW\020\001\022\035\n\031CAN_"
"RX_SIM_STATUS_UPDATED\020\002\022\035\n\031CAN_RX_SIM_ST"
"ATUS_COASTED\020\003\"\273\002\n\027Can_rx_sim_functionTy"
"pe\022\033\n\027CAN_RX_SIM_FUNCTION_ACC\020\000\022\032\n\026CAN_R"
"X_SIM_FUNCTION_RI\020\001\022 \n\034CAN_RX_SIM_FUNCTI"
"ON_FCW_MOVE\020\002\022 \n\034CAN_RX_SIM_FUNCTION_FCW"
"_STAT\020\003\022!\n\035CAN_RX_SIM_FUNCTION_CMBB_MOVE"
"\020\004\022!\n\035CAN_RX_SIM_FUNCTION_CMBB_STAT\020\005\022/\n"
"+CAN_RX_SIM_FUNCTION_ALL_MOVING_ACC_FCW_"
"CMBB\020\006\022,\n(CAN_RX_SIM_FUNCTION_ALL_STAT_R"
"I_FCW_CMBB\020\007\"\354\001\n\017Esr_status1_4e0\022\034\n\024can_"
"tx_dsp_timestamp\030\001 \001(\001\022\031\n\021can_tx_comm_er"
"ror\030\002 \001(\010\022\034\n\024can_tx_yaw_rate_calc\030\003 \001(\001\022"
"!\n\031can_tx_vehicle_speed_calc\030\004 \001(\001\022\031\n\021ca"
"n_tx_scan_index\030\005 \001(\005\022\036\n\026can_tx_rolling_"
"count_1\030\006 \001(\005\022$\n\034can_tx_radius_curvature"
"_calc\030\007 \001(\005\"\335\013\n\017Esr_status2_4e1\022\034\n\024can_t"
"x_yaw_rate_bias\030\001 \001(\001\022\"\n\032can_tx_veh_spd_"
"comp_factor\030\002 \001(\001\022\035\n\025can_tx_sw_version_d"
"sp\030\003 \001(\005\022\032\n\022can_tx_temperature\030\004 \001(\005\022V\n\024"
"can_tx_raw_data_mode\030\005 \001(\01628.apollo.driv"
"ers.Esr_status2_4e1.Can_tx_raw_data_mode"
"Type\022\\\n\027can_tx_range_perf_error\030\006 \001(\0162;."
"apollo.drivers.Esr_status2_4e1.Can_tx_ra"
"nge_perf_errorType\022X\n\025can_tx_overheat_er"
"ror\030\007 \001(\01629.apollo.drivers.Esr_status2_4"
"e1.Can_tx_overheat_errorType\022!\n\031can_tx_m"
"aximum_tracks_ack\030\010 \001(\005\022X\n\025can_tx_intern"
"al_error\030\t \001(\01629.apollo.drivers.Esr_stat"
"us2_4e1.Can_tx_internal_errorType\022V\n\024can"
"_tx_grouping_mode\030\n \001(\01628.apollo.drivers"
".Esr_status2_4e1.Can_tx_grouping_modeTyp"
"e\022\\\n\027can_tx_xcvr_operational\030\013 \001(\0162;.apo"
"llo.drivers.Esr_status2_4e1.Can_tx_xcvr_"
"operationalType\022!\n\031can_tx_steering_angle"
"_ack\030\014 \001(\005\022\036\n\026can_tx_rolling_count_2\030\r \001"
"(\005\"[\n\030Can_tx_raw_data_modeType\022!\n\035CAN_TX"
"_RAW_DATA_MODE_FILTERED\020\000\022\034\n\030CAN_TX_RAW_"
"DATA_MODE_RAW\020\001\"k\n\033Can_tx_range_perf_err"
"orType\022\'\n#CAN_TX_RANGE_PERF_ERROR_NOT_BL"
"OCKED\020\000\022#\n\037CAN_TX_RANGE_PERF_ERROR_BLOCK"
"ED\020\001\"g\n\031Can_tx_overheat_errorType\022&\n\"CAN"
"_TX_OVERHEAT_ERROR_NOT_OVERTEMP\020\000\022\"\n\036CAN"
"_TX_OVERHEAT_ERROR_OVERTEMP\020\001\"c\n\031Can_tx_"
"internal_errorType\022$\n CAN_TX_INTERNAL_ER"
"ROR_NOT_FAILED\020\000\022 \n\034CAN_TX_INTERNAL_ERRO"
"R_FAILED\020\001\"\316\001\n\030Can_tx_grouping_modeType\022"
"$\n CAN_TX_GROUPING_MODE_NO_GROUPING\020\000\022*\n"
"&CAN_TX_GROUPING_MODE_GROUP_MOVING_ONLY\020"
"\001\022.\n*CAN_TX_GROUPING_MODE_GROUP_STATIONA"
"RY_ONLY\020\002\0220\n,CAN_TX_GROUPING_MODE_GROUP_"
"MOVING_STATIONARY\020\003\"^\n\033Can_tx_xcvr_opera"
"tionalType\022\037\n\033CAN_TX_XCVR_OPERATIONAL_OF"
"F\020\000\022\036\n\032CAN_TX_XCVR_OPERATIONAL_ON\020\001\"\221\002\n\017"
"Esr_status8_5e7\022\036\n\026can_tx_history_fault_"
"7\030\001 \001(\005\022\036\n\026can_tx_history_fault_6\030\002 \001(\005\022"
"\036\n\026can_tx_history_fault_5\030\003 \001(\005\022\036\n\026can_t"
"x_history_fault_4\030\004 \001(\005\022\036\n\026can_tx_histor"
"y_fault_3\030\005 \001(\005\022\036\n\026can_tx_history_fault_"
"2\030\006 \001(\005\022\036\n\026can_tx_history_fault_1\030\007 \001(\005\022"
"\036\n\026can_tx_history_fault_0\030\010 \001(\005\"\211\002\n\017Esr_"
"status7_5e6\022\035\n\025can_tx_active_fault_7\030\001 \001"
"(\005\022\035\n\025can_tx_active_fault_6\030\002 \001(\005\022\035\n\025can"
"_tx_active_fault_5\030\003 \001(\005\022\035\n\025can_tx_activ"
"e_fault_4\030\004 \001(\005\022\035\n\025can_tx_active_fault_3"
"\030\005 \001(\005\022\035\n\025can_tx_active_fault_2\030\006 \001(\005\022\035\n"
"\025can_tx_active_fault_0\030\007 \001(\005\022\035\n\025can_tx_a"
"ctive_fault_1\030\010 \001(\005\"\366\r\n\014Vehicle3_5f2\022&\n\036"
"can_rx_serv_align_updates_need\030\001 \001(\005\022W\n\026"
"can_rx_serv_align_type\030\002 \001(\01627.apollo.dr"
"ivers.Vehicle3_5f2.Can_rx_serv_align_typ"
"eType\022[\n\030can_rx_serv_align_enable\030\003 \001(\0162"
"9.apollo.drivers.Vehicle3_5f2.Can_rx_ser"
"v_align_enableType\022#\n\033can_rx_aalign_avg_"
"ctr_total\030\004 \001(\001\022a\n\033can_rx_auto_align_con"
"verged\030\005 \001(\0162<.apollo.drivers.Vehicle3_5"
"f2.Can_rx_auto_align_convergedType\022]\n\031ca"
"n_rx_auto_align_disable\030\006 \001(\0162:.apollo.d"
"rivers.Vehicle3_5f2.Can_rx_auto_align_di"
"sableType\022$\n\034can_rx_angle_mounting_offse"
"t\030\007 \001(\001\022M\n\021can_rx_wheel_slip\030\010 \001(\01622.apo"
"llo.drivers.Vehicle3_5f2.Can_rx_wheel_sl"
"ipType\022\033\n\023can_rx_radar_height\030\t \001(\005\022\033\n\023c"
"an_rx_radar_fov_mr\030\n \001(\005\022\033\n\023can_rx_radar"
"_fov_lr\030\013 \001(\005\022_\n\032can_rx_long_accel_valid"
"ity\030\014 \001(\0162;.apollo.drivers.Vehicle3_5f2."
"Can_rx_long_accel_validityType\022\031\n\021can_rx"
"_long_accel\030\r \001(\001\022]\n\031can_rx_lat_accel_va"
"lidity\030\016 \001(\0162:.apollo.drivers.Vehicle3_5"
"f2.Can_rx_lat_accel_validityType\022\030\n\020can_"
"rx_lat_accel\030\017 \001(\001\"u\n\032Can_rx_serv_align_"
"typeType\022)\n%CAN_RX_SERV_ALIGN_TYPE_AUTO_"
"OR_DEALER\020\000\022,\n(CAN_RX_SERV_ALIGN_TYPE_VO"
"LVO_SHORT_TRACK\020\001\"k\n\034Can_rx_serv_align_e"
"nableType\022%\n!CAN_RX_SERV_ALIGN_ENABLE_DI"
"SABLED\020\000\022$\n CAN_RX_SERV_ALIGN_ENABLE_ENA"
"BLED\020\001\"{\n\037Can_rx_auto_align_convergedTyp"
"e\022-\n)CAN_RX_AUTO_ALIGN_CONVERGED_NOT_CON"
"VERGED\020\000\022)\n%CAN_RX_AUTO_ALIGN_CONVERGED_"
"CONVERGED\020\001\"n\n\035Can_rx_auto_align_disable"
"Type\022%\n!CAN_RX_AUTO_ALIGN_DISABLE_ENABLE"
"D\020\000\022&\n\"CAN_RX_AUTO_ALIGN_DISABLE_DISABLE"
"D\020\001\"\261\001\n\025Can_rx_wheel_slipType\022 \n\034CAN_RX_"
"WHEEL_SLIP_NO_CONTROL\020\000\022(\n$CAN_RX_WHEEL_"
"SLIP_BRAKE_SLIP_CONTROL\020\001\022+\n\'CAN_RX_WHEE"
"L_SLIP_TRACTION_SLIP_CONTROL\020\002\022\037\n\033CAN_RX"
"_WHEEL_SLIP_INVALID_3\020\003\"n\n\036Can_rx_long_a"
"ccel_validityType\022&\n\"CAN_RX_LONG_ACCEL_V"
"ALIDITY_INVALID\020\000\022$\n CAN_RX_LONG_ACCEL_V"
"ALIDITY_VALID\020\001\"k\n\035Can_rx_lat_accel_vali"
"dityType\022%\n!CAN_RX_LAT_ACCEL_VALIDITY_IN"
"VALID\020\000\022#\n\037CAN_RX_LAT_ACCEL_VALIDITY_VAL"
"ID\020\001\"\221\005\n\014Vehicle4_5f3\022 \n\030can_rx_fac_tgt_"
"range_r2m\030\001 \001(\001\022 \n\030can_rx_fac_tgt_range_"
"m2t\030\002 \001(\001\022\036\n\026can_rx_fac_tgt_range_1\030\003 \001("
"\001\022$\n\034can_rx_fac_tgt_mtg_space_ver\030\004 \001(\005\022"
"$\n\034can_rx_fac_tgt_mtg_space_hor\030\005 \001(\005\022!\n"
"\031can_rx_fac_tgt_mtg_offset\030\006 \001(\005\022!\n\031can_"
"rx_fac_align_samp_req\030\007 \001(\005\022\037\n\027can_rx_fa"
"c_align_max_nt\030\010 \001(\005\022W\n\026can_rx_fac_align"
"_cmd_2\030\t \001(\01627.apollo.drivers.Vehicle4_5"
"f3.Can_rx_fac_align_cmd_2Type\022W\n\026can_rx_"
"fac_align_cmd_1\030\n \001(\01627.apollo.drivers.V"
"ehicle4_5f3.Can_rx_fac_align_cmd_1Type\"["
"\n\032Can_rx_fac_align_cmd_2Type\022\036\n\032CAN_RX_F"
"AC_ALIGN_CMD_2_OFF\020\000\022\035\n\031CAN_RX_FAC_ALIGN"
"_CMD_2_ON\020\001\"[\n\032Can_rx_fac_align_cmd_1Typ"
"e\022\036\n\032CAN_RX_FAC_ALIGN_CMD_1_OFF\020\000\022\035\n\031CAN"
"_RX_FAC_ALIGN_CMD_1_ON\020\001\"\364\003\n\014Vehicle5_5f"
"4\022_\n\032can_rx_yaw_rate_bias_shift\030\001 \001(\0162;."
"apollo.drivers.Vehicle5_5f4.Can_rx_yaw_r"
"ate_bias_shiftType\022\"\n\032can_rx_steering_ge"
"ar_ratio\030\002 \001(\001\022\030\n\020can_rx_wheelbase\030\003 \001(\001"
"\022!\n\031can_rx_distance_rear_axle\030\004 \001(\001\022$\n\034c"
"an_rx_cw_blockage_threshold\030\005 \001(\001\022\"\n\032can"
"_rx_funnel_offset_right\030\006 \001(\001\022!\n\031can_rx_"
"funnel_offset_left\030\007 \001(\001\022\035\n\025can_rx_beamw"
"idth_vert\030\010 \001(\001\022#\n\033can_rx_oversteer_unde"
"rsteer\030\t \001(\005\"q\n\036Can_rx_yaw_rate_bias_shi"
"ftType\022(\n$CAN_RX_YAW_RATE_BIAS_SHIFT_NO_"
"DETECT\020\000\022%\n!CAN_RX_YAW_RATE_BIAS_SHIFT_D"
"ETECT\020\001\"\324\001\n\014Vehicle6_5f5\022(\n can_rx_inner"
"_funnel_offset_right\030\001 \001(\001\022\'\n\037can_rx_inn"
"er_funnel_offset_left\030\002 \001(\001\022$\n\034can_volvo"
"_fa_range_max_short\030\003 \001(\005\022%\n\035can_volvo_f"
"a_min_vspeed_short\030\004 \001(\001\022$\n\034can_volvo_fa"
"_aalign_estimate\030\005 \001(\001\"\230\n\n\tDelphiESR\022%\n\006"
"header\030\001 \001(\0132\025.apollo.common.Header\0228\n\017e"
"sr_status9_5e8\030\002 \001(\0132\037.apollo.drivers.Es"
"r_status9_5e8\0228\n\017esr_status6_5e5\030\003 \001(\0132\037"
".apollo.drivers.Esr_status6_5e5\0228\n\017esr_s"
"tatus5_5e4\030\004 \001(\0132\037.apollo.drivers.Esr_st"
"atus5_5e4\0228\n\017esr_status3_4e2\030\005 \001(\0132\037.apo"
"llo.drivers.Esr_status3_4e2\0228\n\017esr_statu"
"s4_4e3\030\006 \001(\0132\037.apollo.drivers.Esr_status"
"4_4e3\022J\n\030esr_trackmotionpower_540\030\007 \003(\0132"
"(.apollo.drivers.Esr_trackmotionpower_54"
"0\022:\n\020acm_inst_req_7e0\030\010 \001(\0132 .apollo.dri"
"vers.Acm_inst_req_7e0\0228\n\017esr_track01_500"
"\030\t \003(\0132\037.apollo.drivers.Esr_track01_500\022"
"6\n\016esr_valid1_5d0\030\n \001(\0132\036.apollo.drivers"
".Esr_valid1_5d0\0226\n\016esr_valid2_5d1\030\013 \001(\0132"
"\036.apollo.drivers.Esr_valid2_5d1\022<\n\021acm_i"
"nst_resp_7e4\030\014 \001(\0132!.apollo.drivers.Acm_"
"inst_resp_7e4\0222\n\014vehicle2_4f1\030\r \001(\0132\034.ap"
"ollo.drivers.Vehicle2_4f1\0222\n\014vehicle1_4f"
"0\030\016 \001(\0132\034.apollo.drivers.Vehicle1_4f0\0222\n"
"\014esr_sim1_5c0\030\017 \001(\0132\034.apollo.drivers.Esr"
"_sim1_5c0\0228\n\017esr_status1_4e0\030\020 \001(\0132\037.apo"
"llo.drivers.Esr_status1_4e0\0228\n\017esr_statu"
"s2_4e1\030\021 \001(\0132\037.apollo.drivers.Esr_status"
"2_4e1\0228\n\017esr_status8_5e7\030\022 \001(\0132\037.apollo."
"drivers.Esr_status8_5e7\0228\n\017esr_status7_5"
"e6\030\023 \001(\0132\037.apollo.drivers.Esr_status7_5e"
"6\0222\n\014vehicle3_5f2\030\024 \001(\0132\034.apollo.drivers"
".Vehicle3_5f2\0222\n\014vehicle4_5f3\030\025 \001(\0132\034.ap"
"ollo.drivers.Vehicle4_5f3\0222\n\014vehicle5_5f"
"4\030\026 \001(\0132\034.apollo.drivers.Vehicle5_5f4\0222\n"
"\014vehicle6_5f5\030\027 \001(\0132\034.apollo.drivers.Veh"
"icle6_5f5", 18849);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"drivers/delphi_esr.proto", &protobuf_RegisterTypes);
Esr_status9_5e8::default_instance_ = new Esr_status9_5e8();
Esr_status6_5e5::default_instance_ = new Esr_status6_5e5();
Esr_status5_5e4::default_instance_ = new Esr_status5_5e4();
Esr_status3_4e2::default_instance_ = new Esr_status3_4e2();
Esr_status4_4e3::default_instance_ = new Esr_status4_4e3();
Esr_trackmotionpower_540::default_instance_ = new Esr_trackmotionpower_540();
Esr_trackmotionpower_540_Motionpower::default_instance_ = new Esr_trackmotionpower_540_Motionpower();
Acm_inst_req_7e0::default_instance_ = new Acm_inst_req_7e0();
Esr_track01_500::default_instance_ = new Esr_track01_500();
Esr_valid1_5d0::default_instance_ = new Esr_valid1_5d0();
Esr_valid2_5d1::default_instance_ = new Esr_valid2_5d1();
Acm_inst_resp_7e4::default_instance_ = new Acm_inst_resp_7e4();
Vehicle2_4f1::default_instance_ = new Vehicle2_4f1();
Vehicle1_4f0::default_instance_ = new Vehicle1_4f0();
Esr_sim1_5c0::default_instance_ = new Esr_sim1_5c0();
Esr_status1_4e0::default_instance_ = new Esr_status1_4e0();
Esr_status2_4e1::default_instance_ = new Esr_status2_4e1();
Esr_status8_5e7::default_instance_ = new Esr_status8_5e7();
Esr_status7_5e6::default_instance_ = new Esr_status7_5e6();
Vehicle3_5f2::default_instance_ = new Vehicle3_5f2();
Vehicle4_5f3::default_instance_ = new Vehicle4_5f3();
Vehicle5_5f4::default_instance_ = new Vehicle5_5f4();
Vehicle6_5f5::default_instance_ = new Vehicle6_5f5();
DelphiESR::default_instance_ = new DelphiESR();
Esr_status9_5e8::default_instance_->InitAsDefaultInstance();
Esr_status6_5e5::default_instance_->InitAsDefaultInstance();
Esr_status5_5e4::default_instance_->InitAsDefaultInstance();
Esr_status3_4e2::default_instance_->InitAsDefaultInstance();
Esr_status4_4e3::default_instance_->InitAsDefaultInstance();
Esr_trackmotionpower_540::default_instance_->InitAsDefaultInstance();
Esr_trackmotionpower_540_Motionpower::default_instance_->InitAsDefaultInstance();
Acm_inst_req_7e0::default_instance_->InitAsDefaultInstance();
Esr_track01_500::default_instance_->InitAsDefaultInstance();
Esr_valid1_5d0::default_instance_->InitAsDefaultInstance();
Esr_valid2_5d1::default_instance_->InitAsDefaultInstance();
Acm_inst_resp_7e4::default_instance_->InitAsDefaultInstance();
Vehicle2_4f1::default_instance_->InitAsDefaultInstance();
Vehicle1_4f0::default_instance_->InitAsDefaultInstance();
Esr_sim1_5c0::default_instance_->InitAsDefaultInstance();
Esr_status1_4e0::default_instance_->InitAsDefaultInstance();
Esr_status2_4e1::default_instance_->InitAsDefaultInstance();
Esr_status8_5e7::default_instance_->InitAsDefaultInstance();
Esr_status7_5e6::default_instance_->InitAsDefaultInstance();
Vehicle3_5f2::default_instance_->InitAsDefaultInstance();
Vehicle4_5f3::default_instance_->InitAsDefaultInstance();
Vehicle5_5f4::default_instance_->InitAsDefaultInstance();
Vehicle6_5f5::default_instance_->InitAsDefaultInstance();
DelphiESR::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_drivers_2fdelphi_5fesr_2eproto);
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_drivers_2fdelphi_5fesr_2eproto {
StaticDescriptorInitializer_drivers_2fdelphi_5fesr_2eproto() {
protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
}
} static_descriptor_initializer_drivers_2fdelphi_5fesr_2eproto_;
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_status9_5e8::kCanTxPathIdAcc3FieldNumber;
const int Esr_status9_5e8::kCanTxPathIdAcc2FieldNumber;
const int Esr_status9_5e8::kCanTxFilteredXohpAccCipvFieldNumber;
const int Esr_status9_5e8::kCanTxWaterSprayTargetIdFieldNumber;
const int Esr_status9_5e8::kCanTxSerialNum3RdByteFieldNumber;
const int Esr_status9_5e8::kCanTxSideslipAngleFieldNumber;
const int Esr_status9_5e8::kCanTxAvgPwrCwblkgFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_status9_5e8::Esr_status9_5e8()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_status9_5e8)
}
void Esr_status9_5e8::InitAsDefaultInstance() {
}
Esr_status9_5e8::Esr_status9_5e8(const Esr_status9_5e8& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_status9_5e8)
}
void Esr_status9_5e8::SharedCtor() {
_cached_size_ = 0;
can_tx_path_id_acc_3_ = 0;
can_tx_path_id_acc_2_ = 0;
can_tx_filtered_xohp_acc_cipv_ = 0;
can_tx_water_spray_target_id_ = 0;
can_tx_serial_num_3rd_byte_ = 0;
can_tx_sideslip_angle_ = 0;
can_tx_avg_pwr_cwblkg_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_status9_5e8::~Esr_status9_5e8() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_status9_5e8)
SharedDtor();
}
void Esr_status9_5e8::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_status9_5e8::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_status9_5e8::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status9_5e8_descriptor_;
}
const Esr_status9_5e8& Esr_status9_5e8::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_status9_5e8* Esr_status9_5e8::default_instance_ = NULL;
Esr_status9_5e8* Esr_status9_5e8::New(::google::protobuf::Arena* arena) const {
Esr_status9_5e8* n = new Esr_status9_5e8;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_status9_5e8::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_status9_5e8)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_status9_5e8, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_status9_5e8*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 127u) {
ZR_(can_tx_path_id_acc_3_, can_tx_avg_pwr_cwblkg_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_status9_5e8::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_status9_5e8)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 can_tx_path_id_acc_3 = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_path_id_acc_3_)));
set_has_can_tx_path_id_acc_3();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_path_id_acc_2;
break;
}
// optional int32 can_tx_path_id_acc_2 = 2;
case 2: {
if (tag == 16) {
parse_can_tx_path_id_acc_2:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_path_id_acc_2_)));
set_has_can_tx_path_id_acc_2();
} else {
goto handle_unusual;
}
if (input->ExpectTag(25)) goto parse_can_tx_filtered_xohp_acc_cipv;
break;
}
// optional double can_tx_filtered_xohp_acc_cipv = 3;
case 3: {
if (tag == 25) {
parse_can_tx_filtered_xohp_acc_cipv:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_filtered_xohp_acc_cipv_)));
set_has_can_tx_filtered_xohp_acc_cipv();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_water_spray_target_id;
break;
}
// optional int32 can_tx_water_spray_target_id = 4;
case 4: {
if (tag == 32) {
parse_can_tx_water_spray_target_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_water_spray_target_id_)));
set_has_can_tx_water_spray_target_id();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_tx_serial_num_3rd_byte;
break;
}
// optional int32 can_tx_serial_num_3rd_byte = 5;
case 5: {
if (tag == 40) {
parse_can_tx_serial_num_3rd_byte:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_serial_num_3rd_byte_)));
set_has_can_tx_serial_num_3rd_byte();
} else {
goto handle_unusual;
}
if (input->ExpectTag(49)) goto parse_can_tx_sideslip_angle;
break;
}
// optional double can_tx_sideslip_angle = 6;
case 6: {
if (tag == 49) {
parse_can_tx_sideslip_angle:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_sideslip_angle_)));
set_has_can_tx_sideslip_angle();
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_tx_avg_pwr_cwblkg;
break;
}
// optional int32 can_tx_avg_pwr_cwblkg = 7;
case 7: {
if (tag == 56) {
parse_can_tx_avg_pwr_cwblkg:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_avg_pwr_cwblkg_)));
set_has_can_tx_avg_pwr_cwblkg();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_status9_5e8)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_status9_5e8)
return false;
#undef DO_
}
void Esr_status9_5e8::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_status9_5e8)
// optional int32 can_tx_path_id_acc_3 = 1;
if (has_can_tx_path_id_acc_3()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->can_tx_path_id_acc_3(), output);
}
// optional int32 can_tx_path_id_acc_2 = 2;
if (has_can_tx_path_id_acc_2()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->can_tx_path_id_acc_2(), output);
}
// optional double can_tx_filtered_xohp_acc_cipv = 3;
if (has_can_tx_filtered_xohp_acc_cipv()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->can_tx_filtered_xohp_acc_cipv(), output);
}
// optional int32 can_tx_water_spray_target_id = 4;
if (has_can_tx_water_spray_target_id()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_tx_water_spray_target_id(), output);
}
// optional int32 can_tx_serial_num_3rd_byte = 5;
if (has_can_tx_serial_num_3rd_byte()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->can_tx_serial_num_3rd_byte(), output);
}
// optional double can_tx_sideslip_angle = 6;
if (has_can_tx_sideslip_angle()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->can_tx_sideslip_angle(), output);
}
// optional int32 can_tx_avg_pwr_cwblkg = 7;
if (has_can_tx_avg_pwr_cwblkg()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->can_tx_avg_pwr_cwblkg(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_status9_5e8)
}
::google::protobuf::uint8* Esr_status9_5e8::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_status9_5e8)
// optional int32 can_tx_path_id_acc_3 = 1;
if (has_can_tx_path_id_acc_3()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->can_tx_path_id_acc_3(), target);
}
// optional int32 can_tx_path_id_acc_2 = 2;
if (has_can_tx_path_id_acc_2()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->can_tx_path_id_acc_2(), target);
}
// optional double can_tx_filtered_xohp_acc_cipv = 3;
if (has_can_tx_filtered_xohp_acc_cipv()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->can_tx_filtered_xohp_acc_cipv(), target);
}
// optional int32 can_tx_water_spray_target_id = 4;
if (has_can_tx_water_spray_target_id()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_tx_water_spray_target_id(), target);
}
// optional int32 can_tx_serial_num_3rd_byte = 5;
if (has_can_tx_serial_num_3rd_byte()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->can_tx_serial_num_3rd_byte(), target);
}
// optional double can_tx_sideslip_angle = 6;
if (has_can_tx_sideslip_angle()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->can_tx_sideslip_angle(), target);
}
// optional int32 can_tx_avg_pwr_cwblkg = 7;
if (has_can_tx_avg_pwr_cwblkg()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->can_tx_avg_pwr_cwblkg(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_status9_5e8)
return target;
}
int Esr_status9_5e8::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_status9_5e8)
int total_size = 0;
if (_has_bits_[0 / 32] & 127u) {
// optional int32 can_tx_path_id_acc_3 = 1;
if (has_can_tx_path_id_acc_3()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_path_id_acc_3());
}
// optional int32 can_tx_path_id_acc_2 = 2;
if (has_can_tx_path_id_acc_2()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_path_id_acc_2());
}
// optional double can_tx_filtered_xohp_acc_cipv = 3;
if (has_can_tx_filtered_xohp_acc_cipv()) {
total_size += 1 + 8;
}
// optional int32 can_tx_water_spray_target_id = 4;
if (has_can_tx_water_spray_target_id()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_water_spray_target_id());
}
// optional int32 can_tx_serial_num_3rd_byte = 5;
if (has_can_tx_serial_num_3rd_byte()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_serial_num_3rd_byte());
}
// optional double can_tx_sideslip_angle = 6;
if (has_can_tx_sideslip_angle()) {
total_size += 1 + 8;
}
// optional int32 can_tx_avg_pwr_cwblkg = 7;
if (has_can_tx_avg_pwr_cwblkg()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_avg_pwr_cwblkg());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_status9_5e8::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_status9_5e8)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_status9_5e8* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_status9_5e8>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_status9_5e8)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_status9_5e8)
MergeFrom(*source);
}
}
void Esr_status9_5e8::MergeFrom(const Esr_status9_5e8& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_status9_5e8)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_path_id_acc_3()) {
set_can_tx_path_id_acc_3(from.can_tx_path_id_acc_3());
}
if (from.has_can_tx_path_id_acc_2()) {
set_can_tx_path_id_acc_2(from.can_tx_path_id_acc_2());
}
if (from.has_can_tx_filtered_xohp_acc_cipv()) {
set_can_tx_filtered_xohp_acc_cipv(from.can_tx_filtered_xohp_acc_cipv());
}
if (from.has_can_tx_water_spray_target_id()) {
set_can_tx_water_spray_target_id(from.can_tx_water_spray_target_id());
}
if (from.has_can_tx_serial_num_3rd_byte()) {
set_can_tx_serial_num_3rd_byte(from.can_tx_serial_num_3rd_byte());
}
if (from.has_can_tx_sideslip_angle()) {
set_can_tx_sideslip_angle(from.can_tx_sideslip_angle());
}
if (from.has_can_tx_avg_pwr_cwblkg()) {
set_can_tx_avg_pwr_cwblkg(from.can_tx_avg_pwr_cwblkg());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_status9_5e8::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_status9_5e8)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_status9_5e8::CopyFrom(const Esr_status9_5e8& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_status9_5e8)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_status9_5e8::IsInitialized() const {
return true;
}
void Esr_status9_5e8::Swap(Esr_status9_5e8* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_status9_5e8::InternalSwap(Esr_status9_5e8* other) {
std::swap(can_tx_path_id_acc_3_, other->can_tx_path_id_acc_3_);
std::swap(can_tx_path_id_acc_2_, other->can_tx_path_id_acc_2_);
std::swap(can_tx_filtered_xohp_acc_cipv_, other->can_tx_filtered_xohp_acc_cipv_);
std::swap(can_tx_water_spray_target_id_, other->can_tx_water_spray_target_id_);
std::swap(can_tx_serial_num_3rd_byte_, other->can_tx_serial_num_3rd_byte_);
std::swap(can_tx_sideslip_angle_, other->can_tx_sideslip_angle_);
std::swap(can_tx_avg_pwr_cwblkg_, other->can_tx_avg_pwr_cwblkg_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_status9_5e8::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_status9_5e8_descriptor_;
metadata.reflection = Esr_status9_5e8_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_status9_5e8
// optional int32 can_tx_path_id_acc_3 = 1;
bool Esr_status9_5e8::has_can_tx_path_id_acc_3() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_status9_5e8::set_has_can_tx_path_id_acc_3() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_status9_5e8::clear_has_can_tx_path_id_acc_3() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_status9_5e8::clear_can_tx_path_id_acc_3() {
can_tx_path_id_acc_3_ = 0;
clear_has_can_tx_path_id_acc_3();
}
::google::protobuf::int32 Esr_status9_5e8::can_tx_path_id_acc_3() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status9_5e8.can_tx_path_id_acc_3)
return can_tx_path_id_acc_3_;
}
void Esr_status9_5e8::set_can_tx_path_id_acc_3(::google::protobuf::int32 value) {
set_has_can_tx_path_id_acc_3();
can_tx_path_id_acc_3_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status9_5e8.can_tx_path_id_acc_3)
}
// optional int32 can_tx_path_id_acc_2 = 2;
bool Esr_status9_5e8::has_can_tx_path_id_acc_2() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_status9_5e8::set_has_can_tx_path_id_acc_2() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_status9_5e8::clear_has_can_tx_path_id_acc_2() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_status9_5e8::clear_can_tx_path_id_acc_2() {
can_tx_path_id_acc_2_ = 0;
clear_has_can_tx_path_id_acc_2();
}
::google::protobuf::int32 Esr_status9_5e8::can_tx_path_id_acc_2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status9_5e8.can_tx_path_id_acc_2)
return can_tx_path_id_acc_2_;
}
void Esr_status9_5e8::set_can_tx_path_id_acc_2(::google::protobuf::int32 value) {
set_has_can_tx_path_id_acc_2();
can_tx_path_id_acc_2_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status9_5e8.can_tx_path_id_acc_2)
}
// optional double can_tx_filtered_xohp_acc_cipv = 3;
bool Esr_status9_5e8::has_can_tx_filtered_xohp_acc_cipv() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_status9_5e8::set_has_can_tx_filtered_xohp_acc_cipv() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_status9_5e8::clear_has_can_tx_filtered_xohp_acc_cipv() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_status9_5e8::clear_can_tx_filtered_xohp_acc_cipv() {
can_tx_filtered_xohp_acc_cipv_ = 0;
clear_has_can_tx_filtered_xohp_acc_cipv();
}
double Esr_status9_5e8::can_tx_filtered_xohp_acc_cipv() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status9_5e8.can_tx_filtered_xohp_acc_cipv)
return can_tx_filtered_xohp_acc_cipv_;
}
void Esr_status9_5e8::set_can_tx_filtered_xohp_acc_cipv(double value) {
set_has_can_tx_filtered_xohp_acc_cipv();
can_tx_filtered_xohp_acc_cipv_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status9_5e8.can_tx_filtered_xohp_acc_cipv)
}
// optional int32 can_tx_water_spray_target_id = 4;
bool Esr_status9_5e8::has_can_tx_water_spray_target_id() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_status9_5e8::set_has_can_tx_water_spray_target_id() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_status9_5e8::clear_has_can_tx_water_spray_target_id() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_status9_5e8::clear_can_tx_water_spray_target_id() {
can_tx_water_spray_target_id_ = 0;
clear_has_can_tx_water_spray_target_id();
}
::google::protobuf::int32 Esr_status9_5e8::can_tx_water_spray_target_id() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status9_5e8.can_tx_water_spray_target_id)
return can_tx_water_spray_target_id_;
}
void Esr_status9_5e8::set_can_tx_water_spray_target_id(::google::protobuf::int32 value) {
set_has_can_tx_water_spray_target_id();
can_tx_water_spray_target_id_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status9_5e8.can_tx_water_spray_target_id)
}
// optional int32 can_tx_serial_num_3rd_byte = 5;
bool Esr_status9_5e8::has_can_tx_serial_num_3rd_byte() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_status9_5e8::set_has_can_tx_serial_num_3rd_byte() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_status9_5e8::clear_has_can_tx_serial_num_3rd_byte() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_status9_5e8::clear_can_tx_serial_num_3rd_byte() {
can_tx_serial_num_3rd_byte_ = 0;
clear_has_can_tx_serial_num_3rd_byte();
}
::google::protobuf::int32 Esr_status9_5e8::can_tx_serial_num_3rd_byte() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status9_5e8.can_tx_serial_num_3rd_byte)
return can_tx_serial_num_3rd_byte_;
}
void Esr_status9_5e8::set_can_tx_serial_num_3rd_byte(::google::protobuf::int32 value) {
set_has_can_tx_serial_num_3rd_byte();
can_tx_serial_num_3rd_byte_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status9_5e8.can_tx_serial_num_3rd_byte)
}
// optional double can_tx_sideslip_angle = 6;
bool Esr_status9_5e8::has_can_tx_sideslip_angle() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Esr_status9_5e8::set_has_can_tx_sideslip_angle() {
_has_bits_[0] |= 0x00000020u;
}
void Esr_status9_5e8::clear_has_can_tx_sideslip_angle() {
_has_bits_[0] &= ~0x00000020u;
}
void Esr_status9_5e8::clear_can_tx_sideslip_angle() {
can_tx_sideslip_angle_ = 0;
clear_has_can_tx_sideslip_angle();
}
double Esr_status9_5e8::can_tx_sideslip_angle() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status9_5e8.can_tx_sideslip_angle)
return can_tx_sideslip_angle_;
}
void Esr_status9_5e8::set_can_tx_sideslip_angle(double value) {
set_has_can_tx_sideslip_angle();
can_tx_sideslip_angle_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status9_5e8.can_tx_sideslip_angle)
}
// optional int32 can_tx_avg_pwr_cwblkg = 7;
bool Esr_status9_5e8::has_can_tx_avg_pwr_cwblkg() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Esr_status9_5e8::set_has_can_tx_avg_pwr_cwblkg() {
_has_bits_[0] |= 0x00000040u;
}
void Esr_status9_5e8::clear_has_can_tx_avg_pwr_cwblkg() {
_has_bits_[0] &= ~0x00000040u;
}
void Esr_status9_5e8::clear_can_tx_avg_pwr_cwblkg() {
can_tx_avg_pwr_cwblkg_ = 0;
clear_has_can_tx_avg_pwr_cwblkg();
}
::google::protobuf::int32 Esr_status9_5e8::can_tx_avg_pwr_cwblkg() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status9_5e8.can_tx_avg_pwr_cwblkg)
return can_tx_avg_pwr_cwblkg_;
}
void Esr_status9_5e8::set_can_tx_avg_pwr_cwblkg(::google::protobuf::int32 value) {
set_has_can_tx_avg_pwr_cwblkg();
can_tx_avg_pwr_cwblkg_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status9_5e8.can_tx_avg_pwr_cwblkg)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_vertical_align_updatedType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status6_5e5_Can_tx_vertical_align_updatedType_descriptor_;
}
bool Esr_status6_5e5_Can_tx_vertical_align_updatedType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status6_5e5_Can_tx_vertical_align_updatedType Esr_status6_5e5::CAN_TX_VERTICAL_ALIGN_UPDATED_NOT_UPDATED;
const Esr_status6_5e5_Can_tx_vertical_align_updatedType Esr_status6_5e5::CAN_TX_VERTICAL_ALIGN_UPDATED_UPDATED;
const Esr_status6_5e5_Can_tx_vertical_align_updatedType Esr_status6_5e5::Can_tx_vertical_align_updatedType_MIN;
const Esr_status6_5e5_Can_tx_vertical_align_updatedType Esr_status6_5e5::Can_tx_vertical_align_updatedType_MAX;
const int Esr_status6_5e5::Can_tx_vertical_align_updatedType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_found_targetType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status6_5e5_Can_tx_found_targetType_descriptor_;
}
bool Esr_status6_5e5_Can_tx_found_targetType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status6_5e5_Can_tx_found_targetType Esr_status6_5e5::CAN_TX_FOUND_TARGET_NOT_FOUND;
const Esr_status6_5e5_Can_tx_found_targetType Esr_status6_5e5::CAN_TX_FOUND_TARGET_FOUND;
const Esr_status6_5e5_Can_tx_found_targetType Esr_status6_5e5::Can_tx_found_targetType_MIN;
const Esr_status6_5e5_Can_tx_found_targetType Esr_status6_5e5::Can_tx_found_targetType_MAX;
const int Esr_status6_5e5::Can_tx_found_targetType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_factory_align_status_2Type_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status6_5e5_Can_tx_factory_align_status_2Type_descriptor_;
}
bool Esr_status6_5e5_Can_tx_factory_align_status_2Type_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status6_5e5_Can_tx_factory_align_status_2Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_2_OFF;
const Esr_status6_5e5_Can_tx_factory_align_status_2Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_2_BUSY;
const Esr_status6_5e5_Can_tx_factory_align_status_2Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_2_SUCCESS;
const Esr_status6_5e5_Can_tx_factory_align_status_2Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_2_FAIL_NO_TARGET;
const Esr_status6_5e5_Can_tx_factory_align_status_2Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_2_FAIL_DEV_TOO_LARGE;
const Esr_status6_5e5_Can_tx_factory_align_status_2Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_2_FAIL_VAR_TOO_LARGE;
const Esr_status6_5e5_Can_tx_factory_align_status_2Type Esr_status6_5e5::Can_tx_factory_align_status_2Type_MIN;
const Esr_status6_5e5_Can_tx_factory_align_status_2Type Esr_status6_5e5::Can_tx_factory_align_status_2Type_MAX;
const int Esr_status6_5e5::Can_tx_factory_align_status_2Type_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_factory_align_status_1Type_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status6_5e5_Can_tx_factory_align_status_1Type_descriptor_;
}
bool Esr_status6_5e5_Can_tx_factory_align_status_1Type_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status6_5e5_Can_tx_factory_align_status_1Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_1_OFF;
const Esr_status6_5e5_Can_tx_factory_align_status_1Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_1_BUSY;
const Esr_status6_5e5_Can_tx_factory_align_status_1Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_1_SUCCESS;
const Esr_status6_5e5_Can_tx_factory_align_status_1Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_1_FAIL_NO_TARGET;
const Esr_status6_5e5_Can_tx_factory_align_status_1Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_1_FAIL_DEV_TOO_LARGE;
const Esr_status6_5e5_Can_tx_factory_align_status_1Type Esr_status6_5e5::CAN_TX_FACTORY_ALIGN_STATUS_1_FAIL_VAR_TOO_LARGE;
const Esr_status6_5e5_Can_tx_factory_align_status_1Type Esr_status6_5e5::Can_tx_factory_align_status_1Type_MIN;
const Esr_status6_5e5_Can_tx_factory_align_status_1Type Esr_status6_5e5::Can_tx_factory_align_status_1Type_MAX;
const int Esr_status6_5e5::Can_tx_factory_align_status_1Type_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_recommend_unconvergeType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status6_5e5_Can_tx_recommend_unconvergeType_descriptor_;
}
bool Esr_status6_5e5_Can_tx_recommend_unconvergeType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status6_5e5_Can_tx_recommend_unconvergeType Esr_status6_5e5::CAN_TX_RECOMMEND_UNCONVERGE_NOT_RECOMMEND;
const Esr_status6_5e5_Can_tx_recommend_unconvergeType Esr_status6_5e5::CAN_TX_RECOMMEND_UNCONVERGE_RECOMMEND;
const Esr_status6_5e5_Can_tx_recommend_unconvergeType Esr_status6_5e5::Can_tx_recommend_unconvergeType_MIN;
const Esr_status6_5e5_Can_tx_recommend_unconvergeType Esr_status6_5e5::Can_tx_recommend_unconvergeType_MAX;
const int Esr_status6_5e5::Can_tx_recommend_unconvergeType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status6_5e5_Can_tx_system_power_modeType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status6_5e5_Can_tx_system_power_modeType_descriptor_;
}
bool Esr_status6_5e5_Can_tx_system_power_modeType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::CAN_TX_SYSTEM_POWER_MODE_DSP_INIT;
const Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::CAN_TX_SYSTEM_POWER_MODE_RADIATE_OFF;
const Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::CAN_TX_SYSTEM_POWER_MODE_RADIATE_ON;
const Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::CAN_TX_SYSTEM_POWER_MODE_DSP_SHUTDOWN;
const Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::CAN_TX_SYSTEM_POWER_MODE_DSP_OFF;
const Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::CAN_TX_SYSTEM_POWER_MODE_HOST_SHUTDOWN;
const Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::CAN_TX_SYSTEM_POWER_MODE_TEST;
const Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::CAN_TX_SYSTEM_POWER_MODE_7INVALID;
const Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::Can_tx_system_power_modeType_MIN;
const Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::Can_tx_system_power_modeType_MAX;
const int Esr_status6_5e5::Can_tx_system_power_modeType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_status6_5e5::kCanTxSwVersionDsp3RdByteFieldNumber;
const int Esr_status6_5e5::kCanTxVerticalAlignUpdatedFieldNumber;
const int Esr_status6_5e5::kCanTxVerticalMisalignmentFieldNumber;
const int Esr_status6_5e5::kCanTxServAlignUpdatesDoneFieldNumber;
const int Esr_status6_5e5::kCanTxFoundTargetFieldNumber;
const int Esr_status6_5e5::kCanTxFactoryMisalignmentFieldNumber;
const int Esr_status6_5e5::kCanTxFactoryAlignStatus2FieldNumber;
const int Esr_status6_5e5::kCanTxFactoryAlignStatus1FieldNumber;
const int Esr_status6_5e5::kCanTxRecommendUnconvergeFieldNumber;
const int Esr_status6_5e5::kCanTxWaveDiffA2DFieldNumber;
const int Esr_status6_5e5::kCanTxSystemPowerModeFieldNumber;
const int Esr_status6_5e5::kCanTxSupplyN5VA2DFieldNumber;
const int Esr_status6_5e5::kCanTxSupply1P8VA2DFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_status6_5e5::Esr_status6_5e5()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_status6_5e5)
}
void Esr_status6_5e5::InitAsDefaultInstance() {
}
Esr_status6_5e5::Esr_status6_5e5(const Esr_status6_5e5& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_status6_5e5)
}
void Esr_status6_5e5::SharedCtor() {
_cached_size_ = 0;
can_tx_sw_version_dsp_3rd_byte_ = 0;
can_tx_vertical_align_updated_ = 0;
can_tx_vertical_misalignment_ = 0;
can_tx_serv_align_updates_done_ = 0;
can_tx_found_target_ = 0;
can_tx_factory_misalignment_ = 0;
can_tx_factory_align_status_2_ = 0;
can_tx_factory_align_status_1_ = 0;
can_tx_recommend_unconverge_ = 0;
can_tx_wave_diff_a2d_ = 0;
can_tx_system_power_mode_ = 0;
can_tx_supply_n5v_a2d_ = 0;
can_tx_supply_1p8v_a2d_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_status6_5e5::~Esr_status6_5e5() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_status6_5e5)
SharedDtor();
}
void Esr_status6_5e5::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_status6_5e5::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_status6_5e5::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status6_5e5_descriptor_;
}
const Esr_status6_5e5& Esr_status6_5e5::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_status6_5e5* Esr_status6_5e5::default_instance_ = NULL;
Esr_status6_5e5* Esr_status6_5e5::New(::google::protobuf::Arena* arena) const {
Esr_status6_5e5* n = new Esr_status6_5e5;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_status6_5e5::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_status6_5e5)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_status6_5e5, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_status6_5e5*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_tx_sw_version_dsp_3rd_byte_, can_tx_factory_align_status_1_);
}
if (_has_bits_[8 / 32] & 7936u) {
ZR_(can_tx_recommend_unconverge_, can_tx_supply_1p8v_a2d_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_status6_5e5::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_status6_5e5)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 can_tx_sw_version_dsp_3rd_byte = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_sw_version_dsp_3rd_byte_)));
set_has_can_tx_sw_version_dsp_3rd_byte();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_vertical_align_updated;
break;
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_vertical_align_updatedType can_tx_vertical_align_updated = 2;
case 2: {
if (tag == 16) {
parse_can_tx_vertical_align_updated:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status6_5e5_Can_tx_vertical_align_updatedType_IsValid(value)) {
set_can_tx_vertical_align_updated(static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_vertical_align_updatedType >(value));
} else {
mutable_unknown_fields()->AddVarint(2, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(25)) goto parse_can_tx_vertical_misalignment;
break;
}
// optional double can_tx_vertical_misalignment = 3;
case 3: {
if (tag == 25) {
parse_can_tx_vertical_misalignment:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_vertical_misalignment_)));
set_has_can_tx_vertical_misalignment();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_serv_align_updates_done;
break;
}
// optional int32 can_tx_serv_align_updates_done = 4;
case 4: {
if (tag == 32) {
parse_can_tx_serv_align_updates_done:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_serv_align_updates_done_)));
set_has_can_tx_serv_align_updates_done();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_tx_found_target;
break;
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_found_targetType can_tx_found_target = 5;
case 5: {
if (tag == 40) {
parse_can_tx_found_target:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status6_5e5_Can_tx_found_targetType_IsValid(value)) {
set_can_tx_found_target(static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_found_targetType >(value));
} else {
mutable_unknown_fields()->AddVarint(5, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(49)) goto parse_can_tx_factory_misalignment;
break;
}
// optional double can_tx_factory_misalignment = 6;
case 6: {
if (tag == 49) {
parse_can_tx_factory_misalignment:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_factory_misalignment_)));
set_has_can_tx_factory_misalignment();
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_tx_factory_align_status_2;
break;
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_factory_align_status_2Type can_tx_factory_align_status_2 = 7;
case 7: {
if (tag == 56) {
parse_can_tx_factory_align_status_2:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_2Type_IsValid(value)) {
set_can_tx_factory_align_status_2(static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_2Type >(value));
} else {
mutable_unknown_fields()->AddVarint(7, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_can_tx_factory_align_status_1;
break;
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_factory_align_status_1Type can_tx_factory_align_status_1 = 8;
case 8: {
if (tag == 64) {
parse_can_tx_factory_align_status_1:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_1Type_IsValid(value)) {
set_can_tx_factory_align_status_1(static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_1Type >(value));
} else {
mutable_unknown_fields()->AddVarint(8, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(72)) goto parse_can_tx_recommend_unconverge;
break;
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_recommend_unconvergeType can_tx_recommend_unconverge = 9;
case 9: {
if (tag == 72) {
parse_can_tx_recommend_unconverge:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status6_5e5_Can_tx_recommend_unconvergeType_IsValid(value)) {
set_can_tx_recommend_unconverge(static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_recommend_unconvergeType >(value));
} else {
mutable_unknown_fields()->AddVarint(9, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(80)) goto parse_can_tx_wave_diff_a2d;
break;
}
// optional int32 can_tx_wave_diff_a2d = 10;
case 10: {
if (tag == 80) {
parse_can_tx_wave_diff_a2d:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_wave_diff_a2d_)));
set_has_can_tx_wave_diff_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectTag(88)) goto parse_can_tx_system_power_mode;
break;
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_system_power_modeType can_tx_system_power_mode = 11;
case 11: {
if (tag == 88) {
parse_can_tx_system_power_mode:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status6_5e5_Can_tx_system_power_modeType_IsValid(value)) {
set_can_tx_system_power_mode(static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_system_power_modeType >(value));
} else {
mutable_unknown_fields()->AddVarint(11, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(96)) goto parse_can_tx_supply_n5v_a2d;
break;
}
// optional int32 can_tx_supply_n5v_a2d = 12;
case 12: {
if (tag == 96) {
parse_can_tx_supply_n5v_a2d:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_supply_n5v_a2d_)));
set_has_can_tx_supply_n5v_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectTag(104)) goto parse_can_tx_supply_1p8v_a2d;
break;
}
// optional int32 can_tx_supply_1p8v_a2d = 13;
case 13: {
if (tag == 104) {
parse_can_tx_supply_1p8v_a2d:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_supply_1p8v_a2d_)));
set_has_can_tx_supply_1p8v_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_status6_5e5)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_status6_5e5)
return false;
#undef DO_
}
void Esr_status6_5e5::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_status6_5e5)
// optional int32 can_tx_sw_version_dsp_3rd_byte = 1;
if (has_can_tx_sw_version_dsp_3rd_byte()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->can_tx_sw_version_dsp_3rd_byte(), output);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_vertical_align_updatedType can_tx_vertical_align_updated = 2;
if (has_can_tx_vertical_align_updated()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
2, this->can_tx_vertical_align_updated(), output);
}
// optional double can_tx_vertical_misalignment = 3;
if (has_can_tx_vertical_misalignment()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->can_tx_vertical_misalignment(), output);
}
// optional int32 can_tx_serv_align_updates_done = 4;
if (has_can_tx_serv_align_updates_done()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_tx_serv_align_updates_done(), output);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_found_targetType can_tx_found_target = 5;
if (has_can_tx_found_target()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
5, this->can_tx_found_target(), output);
}
// optional double can_tx_factory_misalignment = 6;
if (has_can_tx_factory_misalignment()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->can_tx_factory_misalignment(), output);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_factory_align_status_2Type can_tx_factory_align_status_2 = 7;
if (has_can_tx_factory_align_status_2()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
7, this->can_tx_factory_align_status_2(), output);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_factory_align_status_1Type can_tx_factory_align_status_1 = 8;
if (has_can_tx_factory_align_status_1()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
8, this->can_tx_factory_align_status_1(), output);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_recommend_unconvergeType can_tx_recommend_unconverge = 9;
if (has_can_tx_recommend_unconverge()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
9, this->can_tx_recommend_unconverge(), output);
}
// optional int32 can_tx_wave_diff_a2d = 10;
if (has_can_tx_wave_diff_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->can_tx_wave_diff_a2d(), output);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_system_power_modeType can_tx_system_power_mode = 11;
if (has_can_tx_system_power_mode()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
11, this->can_tx_system_power_mode(), output);
}
// optional int32 can_tx_supply_n5v_a2d = 12;
if (has_can_tx_supply_n5v_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(12, this->can_tx_supply_n5v_a2d(), output);
}
// optional int32 can_tx_supply_1p8v_a2d = 13;
if (has_can_tx_supply_1p8v_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(13, this->can_tx_supply_1p8v_a2d(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_status6_5e5)
}
::google::protobuf::uint8* Esr_status6_5e5::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_status6_5e5)
// optional int32 can_tx_sw_version_dsp_3rd_byte = 1;
if (has_can_tx_sw_version_dsp_3rd_byte()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->can_tx_sw_version_dsp_3rd_byte(), target);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_vertical_align_updatedType can_tx_vertical_align_updated = 2;
if (has_can_tx_vertical_align_updated()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2, this->can_tx_vertical_align_updated(), target);
}
// optional double can_tx_vertical_misalignment = 3;
if (has_can_tx_vertical_misalignment()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->can_tx_vertical_misalignment(), target);
}
// optional int32 can_tx_serv_align_updates_done = 4;
if (has_can_tx_serv_align_updates_done()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_tx_serv_align_updates_done(), target);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_found_targetType can_tx_found_target = 5;
if (has_can_tx_found_target()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
5, this->can_tx_found_target(), target);
}
// optional double can_tx_factory_misalignment = 6;
if (has_can_tx_factory_misalignment()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->can_tx_factory_misalignment(), target);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_factory_align_status_2Type can_tx_factory_align_status_2 = 7;
if (has_can_tx_factory_align_status_2()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
7, this->can_tx_factory_align_status_2(), target);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_factory_align_status_1Type can_tx_factory_align_status_1 = 8;
if (has_can_tx_factory_align_status_1()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
8, this->can_tx_factory_align_status_1(), target);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_recommend_unconvergeType can_tx_recommend_unconverge = 9;
if (has_can_tx_recommend_unconverge()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
9, this->can_tx_recommend_unconverge(), target);
}
// optional int32 can_tx_wave_diff_a2d = 10;
if (has_can_tx_wave_diff_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(10, this->can_tx_wave_diff_a2d(), target);
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_system_power_modeType can_tx_system_power_mode = 11;
if (has_can_tx_system_power_mode()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
11, this->can_tx_system_power_mode(), target);
}
// optional int32 can_tx_supply_n5v_a2d = 12;
if (has_can_tx_supply_n5v_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(12, this->can_tx_supply_n5v_a2d(), target);
}
// optional int32 can_tx_supply_1p8v_a2d = 13;
if (has_can_tx_supply_1p8v_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(13, this->can_tx_supply_1p8v_a2d(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_status6_5e5)
return target;
}
int Esr_status6_5e5::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_status6_5e5)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional int32 can_tx_sw_version_dsp_3rd_byte = 1;
if (has_can_tx_sw_version_dsp_3rd_byte()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_sw_version_dsp_3rd_byte());
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_vertical_align_updatedType can_tx_vertical_align_updated = 2;
if (has_can_tx_vertical_align_updated()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_vertical_align_updated());
}
// optional double can_tx_vertical_misalignment = 3;
if (has_can_tx_vertical_misalignment()) {
total_size += 1 + 8;
}
// optional int32 can_tx_serv_align_updates_done = 4;
if (has_can_tx_serv_align_updates_done()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_serv_align_updates_done());
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_found_targetType can_tx_found_target = 5;
if (has_can_tx_found_target()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_found_target());
}
// optional double can_tx_factory_misalignment = 6;
if (has_can_tx_factory_misalignment()) {
total_size += 1 + 8;
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_factory_align_status_2Type can_tx_factory_align_status_2 = 7;
if (has_can_tx_factory_align_status_2()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_factory_align_status_2());
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_factory_align_status_1Type can_tx_factory_align_status_1 = 8;
if (has_can_tx_factory_align_status_1()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_factory_align_status_1());
}
}
if (_has_bits_[8 / 32] & 7936u) {
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_recommend_unconvergeType can_tx_recommend_unconverge = 9;
if (has_can_tx_recommend_unconverge()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_recommend_unconverge());
}
// optional int32 can_tx_wave_diff_a2d = 10;
if (has_can_tx_wave_diff_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_wave_diff_a2d());
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_system_power_modeType can_tx_system_power_mode = 11;
if (has_can_tx_system_power_mode()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_system_power_mode());
}
// optional int32 can_tx_supply_n5v_a2d = 12;
if (has_can_tx_supply_n5v_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_supply_n5v_a2d());
}
// optional int32 can_tx_supply_1p8v_a2d = 13;
if (has_can_tx_supply_1p8v_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_supply_1p8v_a2d());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_status6_5e5::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_status6_5e5)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_status6_5e5* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_status6_5e5>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_status6_5e5)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_status6_5e5)
MergeFrom(*source);
}
}
void Esr_status6_5e5::MergeFrom(const Esr_status6_5e5& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_status6_5e5)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_sw_version_dsp_3rd_byte()) {
set_can_tx_sw_version_dsp_3rd_byte(from.can_tx_sw_version_dsp_3rd_byte());
}
if (from.has_can_tx_vertical_align_updated()) {
set_can_tx_vertical_align_updated(from.can_tx_vertical_align_updated());
}
if (from.has_can_tx_vertical_misalignment()) {
set_can_tx_vertical_misalignment(from.can_tx_vertical_misalignment());
}
if (from.has_can_tx_serv_align_updates_done()) {
set_can_tx_serv_align_updates_done(from.can_tx_serv_align_updates_done());
}
if (from.has_can_tx_found_target()) {
set_can_tx_found_target(from.can_tx_found_target());
}
if (from.has_can_tx_factory_misalignment()) {
set_can_tx_factory_misalignment(from.can_tx_factory_misalignment());
}
if (from.has_can_tx_factory_align_status_2()) {
set_can_tx_factory_align_status_2(from.can_tx_factory_align_status_2());
}
if (from.has_can_tx_factory_align_status_1()) {
set_can_tx_factory_align_status_1(from.can_tx_factory_align_status_1());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_can_tx_recommend_unconverge()) {
set_can_tx_recommend_unconverge(from.can_tx_recommend_unconverge());
}
if (from.has_can_tx_wave_diff_a2d()) {
set_can_tx_wave_diff_a2d(from.can_tx_wave_diff_a2d());
}
if (from.has_can_tx_system_power_mode()) {
set_can_tx_system_power_mode(from.can_tx_system_power_mode());
}
if (from.has_can_tx_supply_n5v_a2d()) {
set_can_tx_supply_n5v_a2d(from.can_tx_supply_n5v_a2d());
}
if (from.has_can_tx_supply_1p8v_a2d()) {
set_can_tx_supply_1p8v_a2d(from.can_tx_supply_1p8v_a2d());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_status6_5e5::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_status6_5e5)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_status6_5e5::CopyFrom(const Esr_status6_5e5& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_status6_5e5)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_status6_5e5::IsInitialized() const {
return true;
}
void Esr_status6_5e5::Swap(Esr_status6_5e5* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_status6_5e5::InternalSwap(Esr_status6_5e5* other) {
std::swap(can_tx_sw_version_dsp_3rd_byte_, other->can_tx_sw_version_dsp_3rd_byte_);
std::swap(can_tx_vertical_align_updated_, other->can_tx_vertical_align_updated_);
std::swap(can_tx_vertical_misalignment_, other->can_tx_vertical_misalignment_);
std::swap(can_tx_serv_align_updates_done_, other->can_tx_serv_align_updates_done_);
std::swap(can_tx_found_target_, other->can_tx_found_target_);
std::swap(can_tx_factory_misalignment_, other->can_tx_factory_misalignment_);
std::swap(can_tx_factory_align_status_2_, other->can_tx_factory_align_status_2_);
std::swap(can_tx_factory_align_status_1_, other->can_tx_factory_align_status_1_);
std::swap(can_tx_recommend_unconverge_, other->can_tx_recommend_unconverge_);
std::swap(can_tx_wave_diff_a2d_, other->can_tx_wave_diff_a2d_);
std::swap(can_tx_system_power_mode_, other->can_tx_system_power_mode_);
std::swap(can_tx_supply_n5v_a2d_, other->can_tx_supply_n5v_a2d_);
std::swap(can_tx_supply_1p8v_a2d_, other->can_tx_supply_1p8v_a2d_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_status6_5e5::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_status6_5e5_descriptor_;
metadata.reflection = Esr_status6_5e5_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_status6_5e5
// optional int32 can_tx_sw_version_dsp_3rd_byte = 1;
bool Esr_status6_5e5::has_can_tx_sw_version_dsp_3rd_byte() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_sw_version_dsp_3rd_byte() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_status6_5e5::clear_has_can_tx_sw_version_dsp_3rd_byte() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_status6_5e5::clear_can_tx_sw_version_dsp_3rd_byte() {
can_tx_sw_version_dsp_3rd_byte_ = 0;
clear_has_can_tx_sw_version_dsp_3rd_byte();
}
::google::protobuf::int32 Esr_status6_5e5::can_tx_sw_version_dsp_3rd_byte() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_sw_version_dsp_3rd_byte)
return can_tx_sw_version_dsp_3rd_byte_;
}
void Esr_status6_5e5::set_can_tx_sw_version_dsp_3rd_byte(::google::protobuf::int32 value) {
set_has_can_tx_sw_version_dsp_3rd_byte();
can_tx_sw_version_dsp_3rd_byte_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_sw_version_dsp_3rd_byte)
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_vertical_align_updatedType can_tx_vertical_align_updated = 2;
bool Esr_status6_5e5::has_can_tx_vertical_align_updated() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_vertical_align_updated() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_status6_5e5::clear_has_can_tx_vertical_align_updated() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_status6_5e5::clear_can_tx_vertical_align_updated() {
can_tx_vertical_align_updated_ = 0;
clear_has_can_tx_vertical_align_updated();
}
::apollo::drivers::Esr_status6_5e5_Can_tx_vertical_align_updatedType Esr_status6_5e5::can_tx_vertical_align_updated() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_vertical_align_updated)
return static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_vertical_align_updatedType >(can_tx_vertical_align_updated_);
}
void Esr_status6_5e5::set_can_tx_vertical_align_updated(::apollo::drivers::Esr_status6_5e5_Can_tx_vertical_align_updatedType value) {
assert(::apollo::drivers::Esr_status6_5e5_Can_tx_vertical_align_updatedType_IsValid(value));
set_has_can_tx_vertical_align_updated();
can_tx_vertical_align_updated_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_vertical_align_updated)
}
// optional double can_tx_vertical_misalignment = 3;
bool Esr_status6_5e5::has_can_tx_vertical_misalignment() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_vertical_misalignment() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_status6_5e5::clear_has_can_tx_vertical_misalignment() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_status6_5e5::clear_can_tx_vertical_misalignment() {
can_tx_vertical_misalignment_ = 0;
clear_has_can_tx_vertical_misalignment();
}
double Esr_status6_5e5::can_tx_vertical_misalignment() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_vertical_misalignment)
return can_tx_vertical_misalignment_;
}
void Esr_status6_5e5::set_can_tx_vertical_misalignment(double value) {
set_has_can_tx_vertical_misalignment();
can_tx_vertical_misalignment_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_vertical_misalignment)
}
// optional int32 can_tx_serv_align_updates_done = 4;
bool Esr_status6_5e5::has_can_tx_serv_align_updates_done() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_serv_align_updates_done() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_status6_5e5::clear_has_can_tx_serv_align_updates_done() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_status6_5e5::clear_can_tx_serv_align_updates_done() {
can_tx_serv_align_updates_done_ = 0;
clear_has_can_tx_serv_align_updates_done();
}
::google::protobuf::int32 Esr_status6_5e5::can_tx_serv_align_updates_done() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_serv_align_updates_done)
return can_tx_serv_align_updates_done_;
}
void Esr_status6_5e5::set_can_tx_serv_align_updates_done(::google::protobuf::int32 value) {
set_has_can_tx_serv_align_updates_done();
can_tx_serv_align_updates_done_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_serv_align_updates_done)
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_found_targetType can_tx_found_target = 5;
bool Esr_status6_5e5::has_can_tx_found_target() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_found_target() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_status6_5e5::clear_has_can_tx_found_target() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_status6_5e5::clear_can_tx_found_target() {
can_tx_found_target_ = 0;
clear_has_can_tx_found_target();
}
::apollo::drivers::Esr_status6_5e5_Can_tx_found_targetType Esr_status6_5e5::can_tx_found_target() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_found_target)
return static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_found_targetType >(can_tx_found_target_);
}
void Esr_status6_5e5::set_can_tx_found_target(::apollo::drivers::Esr_status6_5e5_Can_tx_found_targetType value) {
assert(::apollo::drivers::Esr_status6_5e5_Can_tx_found_targetType_IsValid(value));
set_has_can_tx_found_target();
can_tx_found_target_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_found_target)
}
// optional double can_tx_factory_misalignment = 6;
bool Esr_status6_5e5::has_can_tx_factory_misalignment() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_factory_misalignment() {
_has_bits_[0] |= 0x00000020u;
}
void Esr_status6_5e5::clear_has_can_tx_factory_misalignment() {
_has_bits_[0] &= ~0x00000020u;
}
void Esr_status6_5e5::clear_can_tx_factory_misalignment() {
can_tx_factory_misalignment_ = 0;
clear_has_can_tx_factory_misalignment();
}
double Esr_status6_5e5::can_tx_factory_misalignment() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_factory_misalignment)
return can_tx_factory_misalignment_;
}
void Esr_status6_5e5::set_can_tx_factory_misalignment(double value) {
set_has_can_tx_factory_misalignment();
can_tx_factory_misalignment_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_factory_misalignment)
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_factory_align_status_2Type can_tx_factory_align_status_2 = 7;
bool Esr_status6_5e5::has_can_tx_factory_align_status_2() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_factory_align_status_2() {
_has_bits_[0] |= 0x00000040u;
}
void Esr_status6_5e5::clear_has_can_tx_factory_align_status_2() {
_has_bits_[0] &= ~0x00000040u;
}
void Esr_status6_5e5::clear_can_tx_factory_align_status_2() {
can_tx_factory_align_status_2_ = 0;
clear_has_can_tx_factory_align_status_2();
}
::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_2Type Esr_status6_5e5::can_tx_factory_align_status_2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_factory_align_status_2)
return static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_2Type >(can_tx_factory_align_status_2_);
}
void Esr_status6_5e5::set_can_tx_factory_align_status_2(::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_2Type value) {
assert(::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_2Type_IsValid(value));
set_has_can_tx_factory_align_status_2();
can_tx_factory_align_status_2_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_factory_align_status_2)
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_factory_align_status_1Type can_tx_factory_align_status_1 = 8;
bool Esr_status6_5e5::has_can_tx_factory_align_status_1() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_factory_align_status_1() {
_has_bits_[0] |= 0x00000080u;
}
void Esr_status6_5e5::clear_has_can_tx_factory_align_status_1() {
_has_bits_[0] &= ~0x00000080u;
}
void Esr_status6_5e5::clear_can_tx_factory_align_status_1() {
can_tx_factory_align_status_1_ = 0;
clear_has_can_tx_factory_align_status_1();
}
::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_1Type Esr_status6_5e5::can_tx_factory_align_status_1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_factory_align_status_1)
return static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_1Type >(can_tx_factory_align_status_1_);
}
void Esr_status6_5e5::set_can_tx_factory_align_status_1(::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_1Type value) {
assert(::apollo::drivers::Esr_status6_5e5_Can_tx_factory_align_status_1Type_IsValid(value));
set_has_can_tx_factory_align_status_1();
can_tx_factory_align_status_1_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_factory_align_status_1)
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_recommend_unconvergeType can_tx_recommend_unconverge = 9;
bool Esr_status6_5e5::has_can_tx_recommend_unconverge() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_recommend_unconverge() {
_has_bits_[0] |= 0x00000100u;
}
void Esr_status6_5e5::clear_has_can_tx_recommend_unconverge() {
_has_bits_[0] &= ~0x00000100u;
}
void Esr_status6_5e5::clear_can_tx_recommend_unconverge() {
can_tx_recommend_unconverge_ = 0;
clear_has_can_tx_recommend_unconverge();
}
::apollo::drivers::Esr_status6_5e5_Can_tx_recommend_unconvergeType Esr_status6_5e5::can_tx_recommend_unconverge() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_recommend_unconverge)
return static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_recommend_unconvergeType >(can_tx_recommend_unconverge_);
}
void Esr_status6_5e5::set_can_tx_recommend_unconverge(::apollo::drivers::Esr_status6_5e5_Can_tx_recommend_unconvergeType value) {
assert(::apollo::drivers::Esr_status6_5e5_Can_tx_recommend_unconvergeType_IsValid(value));
set_has_can_tx_recommend_unconverge();
can_tx_recommend_unconverge_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_recommend_unconverge)
}
// optional int32 can_tx_wave_diff_a2d = 10;
bool Esr_status6_5e5::has_can_tx_wave_diff_a2d() const {
return (_has_bits_[0] & 0x00000200u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_wave_diff_a2d() {
_has_bits_[0] |= 0x00000200u;
}
void Esr_status6_5e5::clear_has_can_tx_wave_diff_a2d() {
_has_bits_[0] &= ~0x00000200u;
}
void Esr_status6_5e5::clear_can_tx_wave_diff_a2d() {
can_tx_wave_diff_a2d_ = 0;
clear_has_can_tx_wave_diff_a2d();
}
::google::protobuf::int32 Esr_status6_5e5::can_tx_wave_diff_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_wave_diff_a2d)
return can_tx_wave_diff_a2d_;
}
void Esr_status6_5e5::set_can_tx_wave_diff_a2d(::google::protobuf::int32 value) {
set_has_can_tx_wave_diff_a2d();
can_tx_wave_diff_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_wave_diff_a2d)
}
// optional .apollo.drivers.Esr_status6_5e5.Can_tx_system_power_modeType can_tx_system_power_mode = 11;
bool Esr_status6_5e5::has_can_tx_system_power_mode() const {
return (_has_bits_[0] & 0x00000400u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_system_power_mode() {
_has_bits_[0] |= 0x00000400u;
}
void Esr_status6_5e5::clear_has_can_tx_system_power_mode() {
_has_bits_[0] &= ~0x00000400u;
}
void Esr_status6_5e5::clear_can_tx_system_power_mode() {
can_tx_system_power_mode_ = 0;
clear_has_can_tx_system_power_mode();
}
::apollo::drivers::Esr_status6_5e5_Can_tx_system_power_modeType Esr_status6_5e5::can_tx_system_power_mode() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_system_power_mode)
return static_cast< ::apollo::drivers::Esr_status6_5e5_Can_tx_system_power_modeType >(can_tx_system_power_mode_);
}
void Esr_status6_5e5::set_can_tx_system_power_mode(::apollo::drivers::Esr_status6_5e5_Can_tx_system_power_modeType value) {
assert(::apollo::drivers::Esr_status6_5e5_Can_tx_system_power_modeType_IsValid(value));
set_has_can_tx_system_power_mode();
can_tx_system_power_mode_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_system_power_mode)
}
// optional int32 can_tx_supply_n5v_a2d = 12;
bool Esr_status6_5e5::has_can_tx_supply_n5v_a2d() const {
return (_has_bits_[0] & 0x00000800u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_supply_n5v_a2d() {
_has_bits_[0] |= 0x00000800u;
}
void Esr_status6_5e5::clear_has_can_tx_supply_n5v_a2d() {
_has_bits_[0] &= ~0x00000800u;
}
void Esr_status6_5e5::clear_can_tx_supply_n5v_a2d() {
can_tx_supply_n5v_a2d_ = 0;
clear_has_can_tx_supply_n5v_a2d();
}
::google::protobuf::int32 Esr_status6_5e5::can_tx_supply_n5v_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_supply_n5v_a2d)
return can_tx_supply_n5v_a2d_;
}
void Esr_status6_5e5::set_can_tx_supply_n5v_a2d(::google::protobuf::int32 value) {
set_has_can_tx_supply_n5v_a2d();
can_tx_supply_n5v_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_supply_n5v_a2d)
}
// optional int32 can_tx_supply_1p8v_a2d = 13;
bool Esr_status6_5e5::has_can_tx_supply_1p8v_a2d() const {
return (_has_bits_[0] & 0x00001000u) != 0;
}
void Esr_status6_5e5::set_has_can_tx_supply_1p8v_a2d() {
_has_bits_[0] |= 0x00001000u;
}
void Esr_status6_5e5::clear_has_can_tx_supply_1p8v_a2d() {
_has_bits_[0] &= ~0x00001000u;
}
void Esr_status6_5e5::clear_can_tx_supply_1p8v_a2d() {
can_tx_supply_1p8v_a2d_ = 0;
clear_has_can_tx_supply_1p8v_a2d();
}
::google::protobuf::int32 Esr_status6_5e5::can_tx_supply_1p8v_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status6_5e5.can_tx_supply_1p8v_a2d)
return can_tx_supply_1p8v_a2d_;
}
void Esr_status6_5e5::set_can_tx_supply_1p8v_a2d(::google::protobuf::int32 value) {
set_has_can_tx_supply_1p8v_a2d();
can_tx_supply_1p8v_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status6_5e5.can_tx_supply_1p8v_a2d)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_status5_5e4::kCanTxSupply10VA2DFieldNumber;
const int Esr_status5_5e4::kCanTxTemp2A2DFieldNumber;
const int Esr_status5_5e4::kCanTxTemp1A2DFieldNumber;
const int Esr_status5_5e4::kCanTxSwbattA2DFieldNumber;
const int Esr_status5_5e4::kCanTxSupply5VdxA2DFieldNumber;
const int Esr_status5_5e4::kCanTxSupply5VaA2DFieldNumber;
const int Esr_status5_5e4::kCanTxSupply3P3VA2DFieldNumber;
const int Esr_status5_5e4::kCanTxIgnpA2DFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_status5_5e4::Esr_status5_5e4()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_status5_5e4)
}
void Esr_status5_5e4::InitAsDefaultInstance() {
}
Esr_status5_5e4::Esr_status5_5e4(const Esr_status5_5e4& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_status5_5e4)
}
void Esr_status5_5e4::SharedCtor() {
_cached_size_ = 0;
can_tx_supply_10v_a2d_ = 0;
can_tx_temp2_a2d_ = 0;
can_tx_temp1_a2d_ = 0;
can_tx_swbatt_a2d_ = 0;
can_tx_supply_5vdx_a2d_ = 0;
can_tx_supply_5va_a2d_ = 0;
can_tx_supply_3p3v_a2d_ = 0;
can_tx_ignp_a2d_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_status5_5e4::~Esr_status5_5e4() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_status5_5e4)
SharedDtor();
}
void Esr_status5_5e4::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_status5_5e4::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_status5_5e4::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status5_5e4_descriptor_;
}
const Esr_status5_5e4& Esr_status5_5e4::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_status5_5e4* Esr_status5_5e4::default_instance_ = NULL;
Esr_status5_5e4* Esr_status5_5e4::New(::google::protobuf::Arena* arena) const {
Esr_status5_5e4* n = new Esr_status5_5e4;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_status5_5e4::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_status5_5e4)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_status5_5e4, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_status5_5e4*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_tx_supply_10v_a2d_, can_tx_ignp_a2d_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_status5_5e4::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_status5_5e4)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 can_tx_supply_10v_a2d = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_supply_10v_a2d_)));
set_has_can_tx_supply_10v_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_temp2_a2d;
break;
}
// optional int32 can_tx_temp2_a2d = 2;
case 2: {
if (tag == 16) {
parse_can_tx_temp2_a2d:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_temp2_a2d_)));
set_has_can_tx_temp2_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_tx_temp1_a2d;
break;
}
// optional int32 can_tx_temp1_a2d = 3;
case 3: {
if (tag == 24) {
parse_can_tx_temp1_a2d:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_temp1_a2d_)));
set_has_can_tx_temp1_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_swbatt_a2d;
break;
}
// optional int32 can_tx_swbatt_a2d = 4;
case 4: {
if (tag == 32) {
parse_can_tx_swbatt_a2d:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_swbatt_a2d_)));
set_has_can_tx_swbatt_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_tx_supply_5vdx_a2d;
break;
}
// optional int32 can_tx_supply_5vdx_a2d = 5;
case 5: {
if (tag == 40) {
parse_can_tx_supply_5vdx_a2d:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_supply_5vdx_a2d_)));
set_has_can_tx_supply_5vdx_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_tx_supply_5va_a2d;
break;
}
// optional int32 can_tx_supply_5va_a2d = 6;
case 6: {
if (tag == 48) {
parse_can_tx_supply_5va_a2d:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_supply_5va_a2d_)));
set_has_can_tx_supply_5va_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_tx_supply_3p3v_a2d;
break;
}
// optional int32 can_tx_supply_3p3v_a2d = 7;
case 7: {
if (tag == 56) {
parse_can_tx_supply_3p3v_a2d:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_supply_3p3v_a2d_)));
set_has_can_tx_supply_3p3v_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_can_tx_ignp_a2d;
break;
}
// optional int32 can_tx_ignp_a2d = 8;
case 8: {
if (tag == 64) {
parse_can_tx_ignp_a2d:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_ignp_a2d_)));
set_has_can_tx_ignp_a2d();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_status5_5e4)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_status5_5e4)
return false;
#undef DO_
}
void Esr_status5_5e4::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_status5_5e4)
// optional int32 can_tx_supply_10v_a2d = 1;
if (has_can_tx_supply_10v_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->can_tx_supply_10v_a2d(), output);
}
// optional int32 can_tx_temp2_a2d = 2;
if (has_can_tx_temp2_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->can_tx_temp2_a2d(), output);
}
// optional int32 can_tx_temp1_a2d = 3;
if (has_can_tx_temp1_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->can_tx_temp1_a2d(), output);
}
// optional int32 can_tx_swbatt_a2d = 4;
if (has_can_tx_swbatt_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_tx_swbatt_a2d(), output);
}
// optional int32 can_tx_supply_5vdx_a2d = 5;
if (has_can_tx_supply_5vdx_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->can_tx_supply_5vdx_a2d(), output);
}
// optional int32 can_tx_supply_5va_a2d = 6;
if (has_can_tx_supply_5va_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->can_tx_supply_5va_a2d(), output);
}
// optional int32 can_tx_supply_3p3v_a2d = 7;
if (has_can_tx_supply_3p3v_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->can_tx_supply_3p3v_a2d(), output);
}
// optional int32 can_tx_ignp_a2d = 8;
if (has_can_tx_ignp_a2d()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->can_tx_ignp_a2d(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_status5_5e4)
}
::google::protobuf::uint8* Esr_status5_5e4::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_status5_5e4)
// optional int32 can_tx_supply_10v_a2d = 1;
if (has_can_tx_supply_10v_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->can_tx_supply_10v_a2d(), target);
}
// optional int32 can_tx_temp2_a2d = 2;
if (has_can_tx_temp2_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->can_tx_temp2_a2d(), target);
}
// optional int32 can_tx_temp1_a2d = 3;
if (has_can_tx_temp1_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->can_tx_temp1_a2d(), target);
}
// optional int32 can_tx_swbatt_a2d = 4;
if (has_can_tx_swbatt_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_tx_swbatt_a2d(), target);
}
// optional int32 can_tx_supply_5vdx_a2d = 5;
if (has_can_tx_supply_5vdx_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->can_tx_supply_5vdx_a2d(), target);
}
// optional int32 can_tx_supply_5va_a2d = 6;
if (has_can_tx_supply_5va_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->can_tx_supply_5va_a2d(), target);
}
// optional int32 can_tx_supply_3p3v_a2d = 7;
if (has_can_tx_supply_3p3v_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->can_tx_supply_3p3v_a2d(), target);
}
// optional int32 can_tx_ignp_a2d = 8;
if (has_can_tx_ignp_a2d()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->can_tx_ignp_a2d(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_status5_5e4)
return target;
}
int Esr_status5_5e4::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_status5_5e4)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional int32 can_tx_supply_10v_a2d = 1;
if (has_can_tx_supply_10v_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_supply_10v_a2d());
}
// optional int32 can_tx_temp2_a2d = 2;
if (has_can_tx_temp2_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_temp2_a2d());
}
// optional int32 can_tx_temp1_a2d = 3;
if (has_can_tx_temp1_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_temp1_a2d());
}
// optional int32 can_tx_swbatt_a2d = 4;
if (has_can_tx_swbatt_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_swbatt_a2d());
}
// optional int32 can_tx_supply_5vdx_a2d = 5;
if (has_can_tx_supply_5vdx_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_supply_5vdx_a2d());
}
// optional int32 can_tx_supply_5va_a2d = 6;
if (has_can_tx_supply_5va_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_supply_5va_a2d());
}
// optional int32 can_tx_supply_3p3v_a2d = 7;
if (has_can_tx_supply_3p3v_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_supply_3p3v_a2d());
}
// optional int32 can_tx_ignp_a2d = 8;
if (has_can_tx_ignp_a2d()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_ignp_a2d());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_status5_5e4::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_status5_5e4)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_status5_5e4* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_status5_5e4>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_status5_5e4)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_status5_5e4)
MergeFrom(*source);
}
}
void Esr_status5_5e4::MergeFrom(const Esr_status5_5e4& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_status5_5e4)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_supply_10v_a2d()) {
set_can_tx_supply_10v_a2d(from.can_tx_supply_10v_a2d());
}
if (from.has_can_tx_temp2_a2d()) {
set_can_tx_temp2_a2d(from.can_tx_temp2_a2d());
}
if (from.has_can_tx_temp1_a2d()) {
set_can_tx_temp1_a2d(from.can_tx_temp1_a2d());
}
if (from.has_can_tx_swbatt_a2d()) {
set_can_tx_swbatt_a2d(from.can_tx_swbatt_a2d());
}
if (from.has_can_tx_supply_5vdx_a2d()) {
set_can_tx_supply_5vdx_a2d(from.can_tx_supply_5vdx_a2d());
}
if (from.has_can_tx_supply_5va_a2d()) {
set_can_tx_supply_5va_a2d(from.can_tx_supply_5va_a2d());
}
if (from.has_can_tx_supply_3p3v_a2d()) {
set_can_tx_supply_3p3v_a2d(from.can_tx_supply_3p3v_a2d());
}
if (from.has_can_tx_ignp_a2d()) {
set_can_tx_ignp_a2d(from.can_tx_ignp_a2d());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_status5_5e4::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_status5_5e4)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_status5_5e4::CopyFrom(const Esr_status5_5e4& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_status5_5e4)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_status5_5e4::IsInitialized() const {
return true;
}
void Esr_status5_5e4::Swap(Esr_status5_5e4* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_status5_5e4::InternalSwap(Esr_status5_5e4* other) {
std::swap(can_tx_supply_10v_a2d_, other->can_tx_supply_10v_a2d_);
std::swap(can_tx_temp2_a2d_, other->can_tx_temp2_a2d_);
std::swap(can_tx_temp1_a2d_, other->can_tx_temp1_a2d_);
std::swap(can_tx_swbatt_a2d_, other->can_tx_swbatt_a2d_);
std::swap(can_tx_supply_5vdx_a2d_, other->can_tx_supply_5vdx_a2d_);
std::swap(can_tx_supply_5va_a2d_, other->can_tx_supply_5va_a2d_);
std::swap(can_tx_supply_3p3v_a2d_, other->can_tx_supply_3p3v_a2d_);
std::swap(can_tx_ignp_a2d_, other->can_tx_ignp_a2d_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_status5_5e4::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_status5_5e4_descriptor_;
metadata.reflection = Esr_status5_5e4_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_status5_5e4
// optional int32 can_tx_supply_10v_a2d = 1;
bool Esr_status5_5e4::has_can_tx_supply_10v_a2d() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_status5_5e4::set_has_can_tx_supply_10v_a2d() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_status5_5e4::clear_has_can_tx_supply_10v_a2d() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_status5_5e4::clear_can_tx_supply_10v_a2d() {
can_tx_supply_10v_a2d_ = 0;
clear_has_can_tx_supply_10v_a2d();
}
::google::protobuf::int32 Esr_status5_5e4::can_tx_supply_10v_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status5_5e4.can_tx_supply_10v_a2d)
return can_tx_supply_10v_a2d_;
}
void Esr_status5_5e4::set_can_tx_supply_10v_a2d(::google::protobuf::int32 value) {
set_has_can_tx_supply_10v_a2d();
can_tx_supply_10v_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status5_5e4.can_tx_supply_10v_a2d)
}
// optional int32 can_tx_temp2_a2d = 2;
bool Esr_status5_5e4::has_can_tx_temp2_a2d() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_status5_5e4::set_has_can_tx_temp2_a2d() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_status5_5e4::clear_has_can_tx_temp2_a2d() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_status5_5e4::clear_can_tx_temp2_a2d() {
can_tx_temp2_a2d_ = 0;
clear_has_can_tx_temp2_a2d();
}
::google::protobuf::int32 Esr_status5_5e4::can_tx_temp2_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status5_5e4.can_tx_temp2_a2d)
return can_tx_temp2_a2d_;
}
void Esr_status5_5e4::set_can_tx_temp2_a2d(::google::protobuf::int32 value) {
set_has_can_tx_temp2_a2d();
can_tx_temp2_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status5_5e4.can_tx_temp2_a2d)
}
// optional int32 can_tx_temp1_a2d = 3;
bool Esr_status5_5e4::has_can_tx_temp1_a2d() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_status5_5e4::set_has_can_tx_temp1_a2d() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_status5_5e4::clear_has_can_tx_temp1_a2d() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_status5_5e4::clear_can_tx_temp1_a2d() {
can_tx_temp1_a2d_ = 0;
clear_has_can_tx_temp1_a2d();
}
::google::protobuf::int32 Esr_status5_5e4::can_tx_temp1_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status5_5e4.can_tx_temp1_a2d)
return can_tx_temp1_a2d_;
}
void Esr_status5_5e4::set_can_tx_temp1_a2d(::google::protobuf::int32 value) {
set_has_can_tx_temp1_a2d();
can_tx_temp1_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status5_5e4.can_tx_temp1_a2d)
}
// optional int32 can_tx_swbatt_a2d = 4;
bool Esr_status5_5e4::has_can_tx_swbatt_a2d() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_status5_5e4::set_has_can_tx_swbatt_a2d() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_status5_5e4::clear_has_can_tx_swbatt_a2d() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_status5_5e4::clear_can_tx_swbatt_a2d() {
can_tx_swbatt_a2d_ = 0;
clear_has_can_tx_swbatt_a2d();
}
::google::protobuf::int32 Esr_status5_5e4::can_tx_swbatt_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status5_5e4.can_tx_swbatt_a2d)
return can_tx_swbatt_a2d_;
}
void Esr_status5_5e4::set_can_tx_swbatt_a2d(::google::protobuf::int32 value) {
set_has_can_tx_swbatt_a2d();
can_tx_swbatt_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status5_5e4.can_tx_swbatt_a2d)
}
// optional int32 can_tx_supply_5vdx_a2d = 5;
bool Esr_status5_5e4::has_can_tx_supply_5vdx_a2d() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_status5_5e4::set_has_can_tx_supply_5vdx_a2d() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_status5_5e4::clear_has_can_tx_supply_5vdx_a2d() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_status5_5e4::clear_can_tx_supply_5vdx_a2d() {
can_tx_supply_5vdx_a2d_ = 0;
clear_has_can_tx_supply_5vdx_a2d();
}
::google::protobuf::int32 Esr_status5_5e4::can_tx_supply_5vdx_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status5_5e4.can_tx_supply_5vdx_a2d)
return can_tx_supply_5vdx_a2d_;
}
void Esr_status5_5e4::set_can_tx_supply_5vdx_a2d(::google::protobuf::int32 value) {
set_has_can_tx_supply_5vdx_a2d();
can_tx_supply_5vdx_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status5_5e4.can_tx_supply_5vdx_a2d)
}
// optional int32 can_tx_supply_5va_a2d = 6;
bool Esr_status5_5e4::has_can_tx_supply_5va_a2d() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Esr_status5_5e4::set_has_can_tx_supply_5va_a2d() {
_has_bits_[0] |= 0x00000020u;
}
void Esr_status5_5e4::clear_has_can_tx_supply_5va_a2d() {
_has_bits_[0] &= ~0x00000020u;
}
void Esr_status5_5e4::clear_can_tx_supply_5va_a2d() {
can_tx_supply_5va_a2d_ = 0;
clear_has_can_tx_supply_5va_a2d();
}
::google::protobuf::int32 Esr_status5_5e4::can_tx_supply_5va_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status5_5e4.can_tx_supply_5va_a2d)
return can_tx_supply_5va_a2d_;
}
void Esr_status5_5e4::set_can_tx_supply_5va_a2d(::google::protobuf::int32 value) {
set_has_can_tx_supply_5va_a2d();
can_tx_supply_5va_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status5_5e4.can_tx_supply_5va_a2d)
}
// optional int32 can_tx_supply_3p3v_a2d = 7;
bool Esr_status5_5e4::has_can_tx_supply_3p3v_a2d() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Esr_status5_5e4::set_has_can_tx_supply_3p3v_a2d() {
_has_bits_[0] |= 0x00000040u;
}
void Esr_status5_5e4::clear_has_can_tx_supply_3p3v_a2d() {
_has_bits_[0] &= ~0x00000040u;
}
void Esr_status5_5e4::clear_can_tx_supply_3p3v_a2d() {
can_tx_supply_3p3v_a2d_ = 0;
clear_has_can_tx_supply_3p3v_a2d();
}
::google::protobuf::int32 Esr_status5_5e4::can_tx_supply_3p3v_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status5_5e4.can_tx_supply_3p3v_a2d)
return can_tx_supply_3p3v_a2d_;
}
void Esr_status5_5e4::set_can_tx_supply_3p3v_a2d(::google::protobuf::int32 value) {
set_has_can_tx_supply_3p3v_a2d();
can_tx_supply_3p3v_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status5_5e4.can_tx_supply_3p3v_a2d)
}
// optional int32 can_tx_ignp_a2d = 8;
bool Esr_status5_5e4::has_can_tx_ignp_a2d() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Esr_status5_5e4::set_has_can_tx_ignp_a2d() {
_has_bits_[0] |= 0x00000080u;
}
void Esr_status5_5e4::clear_has_can_tx_ignp_a2d() {
_has_bits_[0] &= ~0x00000080u;
}
void Esr_status5_5e4::clear_can_tx_ignp_a2d() {
can_tx_ignp_a2d_ = 0;
clear_has_can_tx_ignp_a2d();
}
::google::protobuf::int32 Esr_status5_5e4::can_tx_ignp_a2d() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status5_5e4.can_tx_ignp_a2d)
return can_tx_ignp_a2d_;
}
void Esr_status5_5e4::set_can_tx_ignp_a2d(::google::protobuf::int32 value) {
set_has_can_tx_ignp_a2d();
can_tx_ignp_a2d_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status5_5e4.can_tx_ignp_a2d)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_status3_4e2::kCanTxSwVersionPldFieldNumber;
const int Esr_status3_4e2::kCanTxSwVersionHostFieldNumber;
const int Esr_status3_4e2::kCanTxHwVersionFieldNumber;
const int Esr_status3_4e2::kCanTxInterfaceVersionFieldNumber;
const int Esr_status3_4e2::kCanTxSerialNumFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_status3_4e2::Esr_status3_4e2()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_status3_4e2)
}
void Esr_status3_4e2::InitAsDefaultInstance() {
}
Esr_status3_4e2::Esr_status3_4e2(const Esr_status3_4e2& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_status3_4e2)
}
void Esr_status3_4e2::SharedCtor() {
_cached_size_ = 0;
can_tx_sw_version_pld_ = 0;
can_tx_sw_version_host_ = 0;
can_tx_hw_version_ = 0;
can_tx_interface_version_ = 0;
can_tx_serial_num_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_status3_4e2::~Esr_status3_4e2() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_status3_4e2)
SharedDtor();
}
void Esr_status3_4e2::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_status3_4e2::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_status3_4e2::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status3_4e2_descriptor_;
}
const Esr_status3_4e2& Esr_status3_4e2::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_status3_4e2* Esr_status3_4e2::default_instance_ = NULL;
Esr_status3_4e2* Esr_status3_4e2::New(::google::protobuf::Arena* arena) const {
Esr_status3_4e2* n = new Esr_status3_4e2;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_status3_4e2::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_status3_4e2)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_status3_4e2, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_status3_4e2*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 31u) {
ZR_(can_tx_sw_version_pld_, can_tx_serial_num_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_status3_4e2::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_status3_4e2)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 can_tx_sw_version_pld = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_sw_version_pld_)));
set_has_can_tx_sw_version_pld();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_sw_version_host;
break;
}
// optional int32 can_tx_sw_version_host = 2;
case 2: {
if (tag == 16) {
parse_can_tx_sw_version_host:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_sw_version_host_)));
set_has_can_tx_sw_version_host();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_tx_hw_version;
break;
}
// optional int32 can_tx_hw_version = 3;
case 3: {
if (tag == 24) {
parse_can_tx_hw_version:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_hw_version_)));
set_has_can_tx_hw_version();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_interface_version;
break;
}
// optional int32 can_tx_interface_version = 4;
case 4: {
if (tag == 32) {
parse_can_tx_interface_version:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_interface_version_)));
set_has_can_tx_interface_version();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_tx_serial_num;
break;
}
// optional int32 can_tx_serial_num = 5;
case 5: {
if (tag == 40) {
parse_can_tx_serial_num:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_serial_num_)));
set_has_can_tx_serial_num();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_status3_4e2)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_status3_4e2)
return false;
#undef DO_
}
void Esr_status3_4e2::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_status3_4e2)
// optional int32 can_tx_sw_version_pld = 1;
if (has_can_tx_sw_version_pld()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->can_tx_sw_version_pld(), output);
}
// optional int32 can_tx_sw_version_host = 2;
if (has_can_tx_sw_version_host()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->can_tx_sw_version_host(), output);
}
// optional int32 can_tx_hw_version = 3;
if (has_can_tx_hw_version()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->can_tx_hw_version(), output);
}
// optional int32 can_tx_interface_version = 4;
if (has_can_tx_interface_version()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_tx_interface_version(), output);
}
// optional int32 can_tx_serial_num = 5;
if (has_can_tx_serial_num()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->can_tx_serial_num(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_status3_4e2)
}
::google::protobuf::uint8* Esr_status3_4e2::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_status3_4e2)
// optional int32 can_tx_sw_version_pld = 1;
if (has_can_tx_sw_version_pld()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->can_tx_sw_version_pld(), target);
}
// optional int32 can_tx_sw_version_host = 2;
if (has_can_tx_sw_version_host()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->can_tx_sw_version_host(), target);
}
// optional int32 can_tx_hw_version = 3;
if (has_can_tx_hw_version()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->can_tx_hw_version(), target);
}
// optional int32 can_tx_interface_version = 4;
if (has_can_tx_interface_version()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_tx_interface_version(), target);
}
// optional int32 can_tx_serial_num = 5;
if (has_can_tx_serial_num()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->can_tx_serial_num(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_status3_4e2)
return target;
}
int Esr_status3_4e2::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_status3_4e2)
int total_size = 0;
if (_has_bits_[0 / 32] & 31u) {
// optional int32 can_tx_sw_version_pld = 1;
if (has_can_tx_sw_version_pld()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_sw_version_pld());
}
// optional int32 can_tx_sw_version_host = 2;
if (has_can_tx_sw_version_host()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_sw_version_host());
}
// optional int32 can_tx_hw_version = 3;
if (has_can_tx_hw_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_hw_version());
}
// optional int32 can_tx_interface_version = 4;
if (has_can_tx_interface_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_interface_version());
}
// optional int32 can_tx_serial_num = 5;
if (has_can_tx_serial_num()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_serial_num());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_status3_4e2::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_status3_4e2)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_status3_4e2* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_status3_4e2>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_status3_4e2)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_status3_4e2)
MergeFrom(*source);
}
}
void Esr_status3_4e2::MergeFrom(const Esr_status3_4e2& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_status3_4e2)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_sw_version_pld()) {
set_can_tx_sw_version_pld(from.can_tx_sw_version_pld());
}
if (from.has_can_tx_sw_version_host()) {
set_can_tx_sw_version_host(from.can_tx_sw_version_host());
}
if (from.has_can_tx_hw_version()) {
set_can_tx_hw_version(from.can_tx_hw_version());
}
if (from.has_can_tx_interface_version()) {
set_can_tx_interface_version(from.can_tx_interface_version());
}
if (from.has_can_tx_serial_num()) {
set_can_tx_serial_num(from.can_tx_serial_num());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_status3_4e2::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_status3_4e2)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_status3_4e2::CopyFrom(const Esr_status3_4e2& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_status3_4e2)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_status3_4e2::IsInitialized() const {
return true;
}
void Esr_status3_4e2::Swap(Esr_status3_4e2* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_status3_4e2::InternalSwap(Esr_status3_4e2* other) {
std::swap(can_tx_sw_version_pld_, other->can_tx_sw_version_pld_);
std::swap(can_tx_sw_version_host_, other->can_tx_sw_version_host_);
std::swap(can_tx_hw_version_, other->can_tx_hw_version_);
std::swap(can_tx_interface_version_, other->can_tx_interface_version_);
std::swap(can_tx_serial_num_, other->can_tx_serial_num_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_status3_4e2::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_status3_4e2_descriptor_;
metadata.reflection = Esr_status3_4e2_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_status3_4e2
// optional int32 can_tx_sw_version_pld = 1;
bool Esr_status3_4e2::has_can_tx_sw_version_pld() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_status3_4e2::set_has_can_tx_sw_version_pld() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_status3_4e2::clear_has_can_tx_sw_version_pld() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_status3_4e2::clear_can_tx_sw_version_pld() {
can_tx_sw_version_pld_ = 0;
clear_has_can_tx_sw_version_pld();
}
::google::protobuf::int32 Esr_status3_4e2::can_tx_sw_version_pld() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status3_4e2.can_tx_sw_version_pld)
return can_tx_sw_version_pld_;
}
void Esr_status3_4e2::set_can_tx_sw_version_pld(::google::protobuf::int32 value) {
set_has_can_tx_sw_version_pld();
can_tx_sw_version_pld_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status3_4e2.can_tx_sw_version_pld)
}
// optional int32 can_tx_sw_version_host = 2;
bool Esr_status3_4e2::has_can_tx_sw_version_host() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_status3_4e2::set_has_can_tx_sw_version_host() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_status3_4e2::clear_has_can_tx_sw_version_host() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_status3_4e2::clear_can_tx_sw_version_host() {
can_tx_sw_version_host_ = 0;
clear_has_can_tx_sw_version_host();
}
::google::protobuf::int32 Esr_status3_4e2::can_tx_sw_version_host() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status3_4e2.can_tx_sw_version_host)
return can_tx_sw_version_host_;
}
void Esr_status3_4e2::set_can_tx_sw_version_host(::google::protobuf::int32 value) {
set_has_can_tx_sw_version_host();
can_tx_sw_version_host_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status3_4e2.can_tx_sw_version_host)
}
// optional int32 can_tx_hw_version = 3;
bool Esr_status3_4e2::has_can_tx_hw_version() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_status3_4e2::set_has_can_tx_hw_version() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_status3_4e2::clear_has_can_tx_hw_version() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_status3_4e2::clear_can_tx_hw_version() {
can_tx_hw_version_ = 0;
clear_has_can_tx_hw_version();
}
::google::protobuf::int32 Esr_status3_4e2::can_tx_hw_version() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status3_4e2.can_tx_hw_version)
return can_tx_hw_version_;
}
void Esr_status3_4e2::set_can_tx_hw_version(::google::protobuf::int32 value) {
set_has_can_tx_hw_version();
can_tx_hw_version_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status3_4e2.can_tx_hw_version)
}
// optional int32 can_tx_interface_version = 4;
bool Esr_status3_4e2::has_can_tx_interface_version() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_status3_4e2::set_has_can_tx_interface_version() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_status3_4e2::clear_has_can_tx_interface_version() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_status3_4e2::clear_can_tx_interface_version() {
can_tx_interface_version_ = 0;
clear_has_can_tx_interface_version();
}
::google::protobuf::int32 Esr_status3_4e2::can_tx_interface_version() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status3_4e2.can_tx_interface_version)
return can_tx_interface_version_;
}
void Esr_status3_4e2::set_can_tx_interface_version(::google::protobuf::int32 value) {
set_has_can_tx_interface_version();
can_tx_interface_version_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status3_4e2.can_tx_interface_version)
}
// optional int32 can_tx_serial_num = 5;
bool Esr_status3_4e2::has_can_tx_serial_num() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_status3_4e2::set_has_can_tx_serial_num() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_status3_4e2::clear_has_can_tx_serial_num() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_status3_4e2::clear_can_tx_serial_num() {
can_tx_serial_num_ = 0;
clear_has_can_tx_serial_num();
}
::google::protobuf::int32 Esr_status3_4e2::can_tx_serial_num() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status3_4e2.can_tx_serial_num)
return can_tx_serial_num_;
}
void Esr_status3_4e2::set_can_tx_serial_num(::google::protobuf::int32 value) {
set_has_can_tx_serial_num();
can_tx_serial_num_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status3_4e2.can_tx_serial_num)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
const ::google::protobuf::EnumDescriptor* Esr_status4_4e3_Can_tx_truck_target_detType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status4_4e3_Can_tx_truck_target_detType_descriptor_;
}
bool Esr_status4_4e3_Can_tx_truck_target_detType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status4_4e3_Can_tx_truck_target_detType Esr_status4_4e3::CAN_TX_TRUCK_TARGET_DET_NOT_DETECTED;
const Esr_status4_4e3_Can_tx_truck_target_detType Esr_status4_4e3::CAN_TX_TRUCK_TARGET_DET_DETECTED;
const Esr_status4_4e3_Can_tx_truck_target_detType Esr_status4_4e3::Can_tx_truck_target_detType_MIN;
const Esr_status4_4e3_Can_tx_truck_target_detType Esr_status4_4e3::Can_tx_truck_target_detType_MAX;
const int Esr_status4_4e3::Can_tx_truck_target_detType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType_descriptor_;
}
bool Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType Esr_status4_4e3::CAN_TX_LR_ONLY_GRATING_LOBE_DET_NOT_DETECTED;
const Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType Esr_status4_4e3::CAN_TX_LR_ONLY_GRATING_LOBE_DET_DETECTED;
const Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType Esr_status4_4e3::Can_tx_lr_only_grating_lobe_detType_MIN;
const Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType Esr_status4_4e3::Can_tx_lr_only_grating_lobe_detType_MAX;
const int Esr_status4_4e3::Can_tx_lr_only_grating_lobe_detType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status4_4e3_Can_tx_sidelobe_blockageType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status4_4e3_Can_tx_sidelobe_blockageType_descriptor_;
}
bool Esr_status4_4e3_Can_tx_sidelobe_blockageType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status4_4e3_Can_tx_sidelobe_blockageType Esr_status4_4e3::CAN_TX_SIDELOBE_BLOCKAGE_OFF;
const Esr_status4_4e3_Can_tx_sidelobe_blockageType Esr_status4_4e3::CAN_TX_SIDELOBE_BLOCKAGE_ON;
const Esr_status4_4e3_Can_tx_sidelobe_blockageType Esr_status4_4e3::Can_tx_sidelobe_blockageType_MIN;
const Esr_status4_4e3_Can_tx_sidelobe_blockageType Esr_status4_4e3::Can_tx_sidelobe_blockageType_MAX;
const int Esr_status4_4e3::Can_tx_sidelobe_blockageType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status4_4e3_Can_tx_partial_blockageType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status4_4e3_Can_tx_partial_blockageType_descriptor_;
}
bool Esr_status4_4e3_Can_tx_partial_blockageType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status4_4e3_Can_tx_partial_blockageType Esr_status4_4e3::CAN_TX_PARTIAL_BLOCKAGE_NOT_BLOCKED;
const Esr_status4_4e3_Can_tx_partial_blockageType Esr_status4_4e3::CAN_TX_PARTIAL_BLOCKAGE_BLOCKED;
const Esr_status4_4e3_Can_tx_partial_blockageType Esr_status4_4e3::Can_tx_partial_blockageType_MIN;
const Esr_status4_4e3_Can_tx_partial_blockageType Esr_status4_4e3::Can_tx_partial_blockageType_MAX;
const int Esr_status4_4e3::Can_tx_partial_blockageType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status4_4e3_Can_tx_mr_lr_modeType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status4_4e3_Can_tx_mr_lr_modeType_descriptor_;
}
bool Esr_status4_4e3_Can_tx_mr_lr_modeType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status4_4e3_Can_tx_mr_lr_modeType Esr_status4_4e3::CAN_TX_MR_LR_MODE_RESERVED;
const Esr_status4_4e3_Can_tx_mr_lr_modeType Esr_status4_4e3::CAN_TX_MR_LR_MODE_OUTPUT_ONLY_MEDIUM_RANGE_TRACKS;
const Esr_status4_4e3_Can_tx_mr_lr_modeType Esr_status4_4e3::CAN_TX_MR_LR_MODE_OUTPUT_ONLY_LONG_RANGE_TRACKS;
const Esr_status4_4e3_Can_tx_mr_lr_modeType Esr_status4_4e3::CAN_TX_MR_LR_MODE_OUTPUT_ALL_MEDIUM_RANGE_AND_LONG;
const Esr_status4_4e3_Can_tx_mr_lr_modeType Esr_status4_4e3::Can_tx_mr_lr_modeType_MIN;
const Esr_status4_4e3_Can_tx_mr_lr_modeType Esr_status4_4e3::Can_tx_mr_lr_modeType_MAX;
const int Esr_status4_4e3::Can_tx_mr_lr_modeType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_status4_4e3::kCanTxTruckTargetDetFieldNumber;
const int Esr_status4_4e3::kCanTxLrOnlyGratingLobeDetFieldNumber;
const int Esr_status4_4e3::kCanTxSidelobeBlockageFieldNumber;
const int Esr_status4_4e3::kCanTxPartialBlockageFieldNumber;
const int Esr_status4_4e3::kCanTxPathIdAccStatFieldNumber;
const int Esr_status4_4e3::kCanTxMrLrModeFieldNumber;
const int Esr_status4_4e3::kCanTxAutoAlignAngleFieldNumber;
const int Esr_status4_4e3::kCanTxRollingCount3FieldNumber;
const int Esr_status4_4e3::kCanTxPathIdFcwStatFieldNumber;
const int Esr_status4_4e3::kCanTxPathIdFcwMoveFieldNumber;
const int Esr_status4_4e3::kCanTxPathIdCmbbStatFieldNumber;
const int Esr_status4_4e3::kCanTxPathIdCmbbMoveFieldNumber;
const int Esr_status4_4e3::kCanTxPathIdAccFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_status4_4e3::Esr_status4_4e3()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_status4_4e3)
}
void Esr_status4_4e3::InitAsDefaultInstance() {
}
Esr_status4_4e3::Esr_status4_4e3(const Esr_status4_4e3& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_status4_4e3)
}
void Esr_status4_4e3::SharedCtor() {
_cached_size_ = 0;
can_tx_truck_target_det_ = 0;
can_tx_lr_only_grating_lobe_det_ = 0;
can_tx_sidelobe_blockage_ = 0;
can_tx_partial_blockage_ = 0;
can_tx_path_id_acc_stat_ = 0;
can_tx_mr_lr_mode_ = 0;
can_tx_auto_align_angle_ = 0;
can_tx_rolling_count_3_ = 0;
can_tx_path_id_fcw_stat_ = 0;
can_tx_path_id_fcw_move_ = 0;
can_tx_path_id_cmbb_stat_ = 0;
can_tx_path_id_cmbb_move_ = 0;
can_tx_path_id_acc_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_status4_4e3::~Esr_status4_4e3() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_status4_4e3)
SharedDtor();
}
void Esr_status4_4e3::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_status4_4e3::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_status4_4e3::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status4_4e3_descriptor_;
}
const Esr_status4_4e3& Esr_status4_4e3::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_status4_4e3* Esr_status4_4e3::default_instance_ = NULL;
Esr_status4_4e3* Esr_status4_4e3::New(::google::protobuf::Arena* arena) const {
Esr_status4_4e3* n = new Esr_status4_4e3;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_status4_4e3::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_status4_4e3)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_status4_4e3, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_status4_4e3*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_tx_truck_target_det_, can_tx_rolling_count_3_);
}
if (_has_bits_[8 / 32] & 7936u) {
ZR_(can_tx_path_id_fcw_stat_, can_tx_path_id_acc_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_status4_4e3::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_status4_4e3)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_truck_target_detType can_tx_truck_target_det = 1;
case 1: {
if (tag == 8) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status4_4e3_Can_tx_truck_target_detType_IsValid(value)) {
set_can_tx_truck_target_det(static_cast< ::apollo::drivers::Esr_status4_4e3_Can_tx_truck_target_detType >(value));
} else {
mutable_unknown_fields()->AddVarint(1, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_lr_only_grating_lobe_det;
break;
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_lr_only_grating_lobe_detType can_tx_lr_only_grating_lobe_det = 2;
case 2: {
if (tag == 16) {
parse_can_tx_lr_only_grating_lobe_det:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType_IsValid(value)) {
set_can_tx_lr_only_grating_lobe_det(static_cast< ::apollo::drivers::Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType >(value));
} else {
mutable_unknown_fields()->AddVarint(2, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_tx_sidelobe_blockage;
break;
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_sidelobe_blockageType can_tx_sidelobe_blockage = 3;
case 3: {
if (tag == 24) {
parse_can_tx_sidelobe_blockage:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status4_4e3_Can_tx_sidelobe_blockageType_IsValid(value)) {
set_can_tx_sidelobe_blockage(static_cast< ::apollo::drivers::Esr_status4_4e3_Can_tx_sidelobe_blockageType >(value));
} else {
mutable_unknown_fields()->AddVarint(3, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_partial_blockage;
break;
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_partial_blockageType can_tx_partial_blockage = 4;
case 4: {
if (tag == 32) {
parse_can_tx_partial_blockage:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status4_4e3_Can_tx_partial_blockageType_IsValid(value)) {
set_can_tx_partial_blockage(static_cast< ::apollo::drivers::Esr_status4_4e3_Can_tx_partial_blockageType >(value));
} else {
mutable_unknown_fields()->AddVarint(4, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_tx_path_id_acc_stat;
break;
}
// optional int32 can_tx_path_id_acc_stat = 5;
case 5: {
if (tag == 40) {
parse_can_tx_path_id_acc_stat:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_path_id_acc_stat_)));
set_has_can_tx_path_id_acc_stat();
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_tx_mr_lr_mode;
break;
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_mr_lr_modeType can_tx_mr_lr_mode = 6;
case 6: {
if (tag == 48) {
parse_can_tx_mr_lr_mode:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status4_4e3_Can_tx_mr_lr_modeType_IsValid(value)) {
set_can_tx_mr_lr_mode(static_cast< ::apollo::drivers::Esr_status4_4e3_Can_tx_mr_lr_modeType >(value));
} else {
mutable_unknown_fields()->AddVarint(6, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(57)) goto parse_can_tx_auto_align_angle;
break;
}
// optional double can_tx_auto_align_angle = 7;
case 7: {
if (tag == 57) {
parse_can_tx_auto_align_angle:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_auto_align_angle_)));
set_has_can_tx_auto_align_angle();
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_can_tx_rolling_count_3;
break;
}
// optional int32 can_tx_rolling_count_3 = 8;
case 8: {
if (tag == 64) {
parse_can_tx_rolling_count_3:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_rolling_count_3_)));
set_has_can_tx_rolling_count_3();
} else {
goto handle_unusual;
}
if (input->ExpectTag(72)) goto parse_can_tx_path_id_fcw_stat;
break;
}
// optional int32 can_tx_path_id_fcw_stat = 9;
case 9: {
if (tag == 72) {
parse_can_tx_path_id_fcw_stat:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_path_id_fcw_stat_)));
set_has_can_tx_path_id_fcw_stat();
} else {
goto handle_unusual;
}
if (input->ExpectTag(80)) goto parse_can_tx_path_id_fcw_move;
break;
}
// optional int32 can_tx_path_id_fcw_move = 10;
case 10: {
if (tag == 80) {
parse_can_tx_path_id_fcw_move:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_path_id_fcw_move_)));
set_has_can_tx_path_id_fcw_move();
} else {
goto handle_unusual;
}
if (input->ExpectTag(88)) goto parse_can_tx_path_id_cmbb_stat;
break;
}
// optional int32 can_tx_path_id_cmbb_stat = 11;
case 11: {
if (tag == 88) {
parse_can_tx_path_id_cmbb_stat:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_path_id_cmbb_stat_)));
set_has_can_tx_path_id_cmbb_stat();
} else {
goto handle_unusual;
}
if (input->ExpectTag(96)) goto parse_can_tx_path_id_cmbb_move;
break;
}
// optional int32 can_tx_path_id_cmbb_move = 12;
case 12: {
if (tag == 96) {
parse_can_tx_path_id_cmbb_move:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_path_id_cmbb_move_)));
set_has_can_tx_path_id_cmbb_move();
} else {
goto handle_unusual;
}
if (input->ExpectTag(104)) goto parse_can_tx_path_id_acc;
break;
}
// optional int32 can_tx_path_id_acc = 13;
case 13: {
if (tag == 104) {
parse_can_tx_path_id_acc:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_path_id_acc_)));
set_has_can_tx_path_id_acc();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_status4_4e3)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_status4_4e3)
return false;
#undef DO_
}
void Esr_status4_4e3::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_status4_4e3)
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_truck_target_detType can_tx_truck_target_det = 1;
if (has_can_tx_truck_target_det()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->can_tx_truck_target_det(), output);
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_lr_only_grating_lobe_detType can_tx_lr_only_grating_lobe_det = 2;
if (has_can_tx_lr_only_grating_lobe_det()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
2, this->can_tx_lr_only_grating_lobe_det(), output);
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_sidelobe_blockageType can_tx_sidelobe_blockage = 3;
if (has_can_tx_sidelobe_blockage()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
3, this->can_tx_sidelobe_blockage(), output);
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_partial_blockageType can_tx_partial_blockage = 4;
if (has_can_tx_partial_blockage()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
4, this->can_tx_partial_blockage(), output);
}
// optional int32 can_tx_path_id_acc_stat = 5;
if (has_can_tx_path_id_acc_stat()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->can_tx_path_id_acc_stat(), output);
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_mr_lr_modeType can_tx_mr_lr_mode = 6;
if (has_can_tx_mr_lr_mode()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
6, this->can_tx_mr_lr_mode(), output);
}
// optional double can_tx_auto_align_angle = 7;
if (has_can_tx_auto_align_angle()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(7, this->can_tx_auto_align_angle(), output);
}
// optional int32 can_tx_rolling_count_3 = 8;
if (has_can_tx_rolling_count_3()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->can_tx_rolling_count_3(), output);
}
// optional int32 can_tx_path_id_fcw_stat = 9;
if (has_can_tx_path_id_fcw_stat()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->can_tx_path_id_fcw_stat(), output);
}
// optional int32 can_tx_path_id_fcw_move = 10;
if (has_can_tx_path_id_fcw_move()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->can_tx_path_id_fcw_move(), output);
}
// optional int32 can_tx_path_id_cmbb_stat = 11;
if (has_can_tx_path_id_cmbb_stat()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(11, this->can_tx_path_id_cmbb_stat(), output);
}
// optional int32 can_tx_path_id_cmbb_move = 12;
if (has_can_tx_path_id_cmbb_move()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(12, this->can_tx_path_id_cmbb_move(), output);
}
// optional int32 can_tx_path_id_acc = 13;
if (has_can_tx_path_id_acc()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(13, this->can_tx_path_id_acc(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_status4_4e3)
}
::google::protobuf::uint8* Esr_status4_4e3::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_status4_4e3)
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_truck_target_detType can_tx_truck_target_det = 1;
if (has_can_tx_truck_target_det()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->can_tx_truck_target_det(), target);
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_lr_only_grating_lobe_detType can_tx_lr_only_grating_lobe_det = 2;
if (has_can_tx_lr_only_grating_lobe_det()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2, this->can_tx_lr_only_grating_lobe_det(), target);
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_sidelobe_blockageType can_tx_sidelobe_blockage = 3;
if (has_can_tx_sidelobe_blockage()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
3, this->can_tx_sidelobe_blockage(), target);
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_partial_blockageType can_tx_partial_blockage = 4;
if (has_can_tx_partial_blockage()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4, this->can_tx_partial_blockage(), target);
}
// optional int32 can_tx_path_id_acc_stat = 5;
if (has_can_tx_path_id_acc_stat()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->can_tx_path_id_acc_stat(), target);
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_mr_lr_modeType can_tx_mr_lr_mode = 6;
if (has_can_tx_mr_lr_mode()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
6, this->can_tx_mr_lr_mode(), target);
}
// optional double can_tx_auto_align_angle = 7;
if (has_can_tx_auto_align_angle()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(7, this->can_tx_auto_align_angle(), target);
}
// optional int32 can_tx_rolling_count_3 = 8;
if (has_can_tx_rolling_count_3()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->can_tx_rolling_count_3(), target);
}
// optional int32 can_tx_path_id_fcw_stat = 9;
if (has_can_tx_path_id_fcw_stat()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->can_tx_path_id_fcw_stat(), target);
}
// optional int32 can_tx_path_id_fcw_move = 10;
if (has_can_tx_path_id_fcw_move()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(10, this->can_tx_path_id_fcw_move(), target);
}
// optional int32 can_tx_path_id_cmbb_stat = 11;
if (has_can_tx_path_id_cmbb_stat()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(11, this->can_tx_path_id_cmbb_stat(), target);
}
// optional int32 can_tx_path_id_cmbb_move = 12;
if (has_can_tx_path_id_cmbb_move()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(12, this->can_tx_path_id_cmbb_move(), target);
}
// optional int32 can_tx_path_id_acc = 13;
if (has_can_tx_path_id_acc()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(13, this->can_tx_path_id_acc(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_status4_4e3)
return target;
}
int Esr_status4_4e3::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_status4_4e3)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_truck_target_detType can_tx_truck_target_det = 1;
if (has_can_tx_truck_target_det()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_truck_target_det());
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_lr_only_grating_lobe_detType can_tx_lr_only_grating_lobe_det = 2;
if (has_can_tx_lr_only_grating_lobe_det()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_lr_only_grating_lobe_det());
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_sidelobe_blockageType can_tx_sidelobe_blockage = 3;
if (has_can_tx_sidelobe_blockage()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_sidelobe_blockage());
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_partial_blockageType can_tx_partial_blockage = 4;
if (has_can_tx_partial_blockage()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_partial_blockage());
}
// optional int32 can_tx_path_id_acc_stat = 5;
if (has_can_tx_path_id_acc_stat()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_path_id_acc_stat());
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_mr_lr_modeType can_tx_mr_lr_mode = 6;
if (has_can_tx_mr_lr_mode()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_mr_lr_mode());
}
// optional double can_tx_auto_align_angle = 7;
if (has_can_tx_auto_align_angle()) {
total_size += 1 + 8;
}
// optional int32 can_tx_rolling_count_3 = 8;
if (has_can_tx_rolling_count_3()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_rolling_count_3());
}
}
if (_has_bits_[8 / 32] & 7936u) {
// optional int32 can_tx_path_id_fcw_stat = 9;
if (has_can_tx_path_id_fcw_stat()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_path_id_fcw_stat());
}
// optional int32 can_tx_path_id_fcw_move = 10;
if (has_can_tx_path_id_fcw_move()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_path_id_fcw_move());
}
// optional int32 can_tx_path_id_cmbb_stat = 11;
if (has_can_tx_path_id_cmbb_stat()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_path_id_cmbb_stat());
}
// optional int32 can_tx_path_id_cmbb_move = 12;
if (has_can_tx_path_id_cmbb_move()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_path_id_cmbb_move());
}
// optional int32 can_tx_path_id_acc = 13;
if (has_can_tx_path_id_acc()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_path_id_acc());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_status4_4e3::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_status4_4e3)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_status4_4e3* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_status4_4e3>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_status4_4e3)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_status4_4e3)
MergeFrom(*source);
}
}
void Esr_status4_4e3::MergeFrom(const Esr_status4_4e3& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_status4_4e3)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_truck_target_det()) {
set_can_tx_truck_target_det(from.can_tx_truck_target_det());
}
if (from.has_can_tx_lr_only_grating_lobe_det()) {
set_can_tx_lr_only_grating_lobe_det(from.can_tx_lr_only_grating_lobe_det());
}
if (from.has_can_tx_sidelobe_blockage()) {
set_can_tx_sidelobe_blockage(from.can_tx_sidelobe_blockage());
}
if (from.has_can_tx_partial_blockage()) {
set_can_tx_partial_blockage(from.can_tx_partial_blockage());
}
if (from.has_can_tx_path_id_acc_stat()) {
set_can_tx_path_id_acc_stat(from.can_tx_path_id_acc_stat());
}
if (from.has_can_tx_mr_lr_mode()) {
set_can_tx_mr_lr_mode(from.can_tx_mr_lr_mode());
}
if (from.has_can_tx_auto_align_angle()) {
set_can_tx_auto_align_angle(from.can_tx_auto_align_angle());
}
if (from.has_can_tx_rolling_count_3()) {
set_can_tx_rolling_count_3(from.can_tx_rolling_count_3());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_can_tx_path_id_fcw_stat()) {
set_can_tx_path_id_fcw_stat(from.can_tx_path_id_fcw_stat());
}
if (from.has_can_tx_path_id_fcw_move()) {
set_can_tx_path_id_fcw_move(from.can_tx_path_id_fcw_move());
}
if (from.has_can_tx_path_id_cmbb_stat()) {
set_can_tx_path_id_cmbb_stat(from.can_tx_path_id_cmbb_stat());
}
if (from.has_can_tx_path_id_cmbb_move()) {
set_can_tx_path_id_cmbb_move(from.can_tx_path_id_cmbb_move());
}
if (from.has_can_tx_path_id_acc()) {
set_can_tx_path_id_acc(from.can_tx_path_id_acc());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_status4_4e3::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_status4_4e3)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_status4_4e3::CopyFrom(const Esr_status4_4e3& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_status4_4e3)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_status4_4e3::IsInitialized() const {
return true;
}
void Esr_status4_4e3::Swap(Esr_status4_4e3* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_status4_4e3::InternalSwap(Esr_status4_4e3* other) {
std::swap(can_tx_truck_target_det_, other->can_tx_truck_target_det_);
std::swap(can_tx_lr_only_grating_lobe_det_, other->can_tx_lr_only_grating_lobe_det_);
std::swap(can_tx_sidelobe_blockage_, other->can_tx_sidelobe_blockage_);
std::swap(can_tx_partial_blockage_, other->can_tx_partial_blockage_);
std::swap(can_tx_path_id_acc_stat_, other->can_tx_path_id_acc_stat_);
std::swap(can_tx_mr_lr_mode_, other->can_tx_mr_lr_mode_);
std::swap(can_tx_auto_align_angle_, other->can_tx_auto_align_angle_);
std::swap(can_tx_rolling_count_3_, other->can_tx_rolling_count_3_);
std::swap(can_tx_path_id_fcw_stat_, other->can_tx_path_id_fcw_stat_);
std::swap(can_tx_path_id_fcw_move_, other->can_tx_path_id_fcw_move_);
std::swap(can_tx_path_id_cmbb_stat_, other->can_tx_path_id_cmbb_stat_);
std::swap(can_tx_path_id_cmbb_move_, other->can_tx_path_id_cmbb_move_);
std::swap(can_tx_path_id_acc_, other->can_tx_path_id_acc_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_status4_4e3::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_status4_4e3_descriptor_;
metadata.reflection = Esr_status4_4e3_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_status4_4e3
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_truck_target_detType can_tx_truck_target_det = 1;
bool Esr_status4_4e3::has_can_tx_truck_target_det() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_truck_target_det() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_status4_4e3::clear_has_can_tx_truck_target_det() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_status4_4e3::clear_can_tx_truck_target_det() {
can_tx_truck_target_det_ = 0;
clear_has_can_tx_truck_target_det();
}
::apollo::drivers::Esr_status4_4e3_Can_tx_truck_target_detType Esr_status4_4e3::can_tx_truck_target_det() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_truck_target_det)
return static_cast< ::apollo::drivers::Esr_status4_4e3_Can_tx_truck_target_detType >(can_tx_truck_target_det_);
}
void Esr_status4_4e3::set_can_tx_truck_target_det(::apollo::drivers::Esr_status4_4e3_Can_tx_truck_target_detType value) {
assert(::apollo::drivers::Esr_status4_4e3_Can_tx_truck_target_detType_IsValid(value));
set_has_can_tx_truck_target_det();
can_tx_truck_target_det_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_truck_target_det)
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_lr_only_grating_lobe_detType can_tx_lr_only_grating_lobe_det = 2;
bool Esr_status4_4e3::has_can_tx_lr_only_grating_lobe_det() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_lr_only_grating_lobe_det() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_status4_4e3::clear_has_can_tx_lr_only_grating_lobe_det() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_status4_4e3::clear_can_tx_lr_only_grating_lobe_det() {
can_tx_lr_only_grating_lobe_det_ = 0;
clear_has_can_tx_lr_only_grating_lobe_det();
}
::apollo::drivers::Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType Esr_status4_4e3::can_tx_lr_only_grating_lobe_det() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_lr_only_grating_lobe_det)
return static_cast< ::apollo::drivers::Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType >(can_tx_lr_only_grating_lobe_det_);
}
void Esr_status4_4e3::set_can_tx_lr_only_grating_lobe_det(::apollo::drivers::Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType value) {
assert(::apollo::drivers::Esr_status4_4e3_Can_tx_lr_only_grating_lobe_detType_IsValid(value));
set_has_can_tx_lr_only_grating_lobe_det();
can_tx_lr_only_grating_lobe_det_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_lr_only_grating_lobe_det)
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_sidelobe_blockageType can_tx_sidelobe_blockage = 3;
bool Esr_status4_4e3::has_can_tx_sidelobe_blockage() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_sidelobe_blockage() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_status4_4e3::clear_has_can_tx_sidelobe_blockage() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_status4_4e3::clear_can_tx_sidelobe_blockage() {
can_tx_sidelobe_blockage_ = 0;
clear_has_can_tx_sidelobe_blockage();
}
::apollo::drivers::Esr_status4_4e3_Can_tx_sidelobe_blockageType Esr_status4_4e3::can_tx_sidelobe_blockage() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_sidelobe_blockage)
return static_cast< ::apollo::drivers::Esr_status4_4e3_Can_tx_sidelobe_blockageType >(can_tx_sidelobe_blockage_);
}
void Esr_status4_4e3::set_can_tx_sidelobe_blockage(::apollo::drivers::Esr_status4_4e3_Can_tx_sidelobe_blockageType value) {
assert(::apollo::drivers::Esr_status4_4e3_Can_tx_sidelobe_blockageType_IsValid(value));
set_has_can_tx_sidelobe_blockage();
can_tx_sidelobe_blockage_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_sidelobe_blockage)
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_partial_blockageType can_tx_partial_blockage = 4;
bool Esr_status4_4e3::has_can_tx_partial_blockage() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_partial_blockage() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_status4_4e3::clear_has_can_tx_partial_blockage() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_status4_4e3::clear_can_tx_partial_blockage() {
can_tx_partial_blockage_ = 0;
clear_has_can_tx_partial_blockage();
}
::apollo::drivers::Esr_status4_4e3_Can_tx_partial_blockageType Esr_status4_4e3::can_tx_partial_blockage() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_partial_blockage)
return static_cast< ::apollo::drivers::Esr_status4_4e3_Can_tx_partial_blockageType >(can_tx_partial_blockage_);
}
void Esr_status4_4e3::set_can_tx_partial_blockage(::apollo::drivers::Esr_status4_4e3_Can_tx_partial_blockageType value) {
assert(::apollo::drivers::Esr_status4_4e3_Can_tx_partial_blockageType_IsValid(value));
set_has_can_tx_partial_blockage();
can_tx_partial_blockage_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_partial_blockage)
}
// optional int32 can_tx_path_id_acc_stat = 5;
bool Esr_status4_4e3::has_can_tx_path_id_acc_stat() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_path_id_acc_stat() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_status4_4e3::clear_has_can_tx_path_id_acc_stat() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_status4_4e3::clear_can_tx_path_id_acc_stat() {
can_tx_path_id_acc_stat_ = 0;
clear_has_can_tx_path_id_acc_stat();
}
::google::protobuf::int32 Esr_status4_4e3::can_tx_path_id_acc_stat() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_path_id_acc_stat)
return can_tx_path_id_acc_stat_;
}
void Esr_status4_4e3::set_can_tx_path_id_acc_stat(::google::protobuf::int32 value) {
set_has_can_tx_path_id_acc_stat();
can_tx_path_id_acc_stat_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_path_id_acc_stat)
}
// optional .apollo.drivers.Esr_status4_4e3.Can_tx_mr_lr_modeType can_tx_mr_lr_mode = 6;
bool Esr_status4_4e3::has_can_tx_mr_lr_mode() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_mr_lr_mode() {
_has_bits_[0] |= 0x00000020u;
}
void Esr_status4_4e3::clear_has_can_tx_mr_lr_mode() {
_has_bits_[0] &= ~0x00000020u;
}
void Esr_status4_4e3::clear_can_tx_mr_lr_mode() {
can_tx_mr_lr_mode_ = 0;
clear_has_can_tx_mr_lr_mode();
}
::apollo::drivers::Esr_status4_4e3_Can_tx_mr_lr_modeType Esr_status4_4e3::can_tx_mr_lr_mode() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_mr_lr_mode)
return static_cast< ::apollo::drivers::Esr_status4_4e3_Can_tx_mr_lr_modeType >(can_tx_mr_lr_mode_);
}
void Esr_status4_4e3::set_can_tx_mr_lr_mode(::apollo::drivers::Esr_status4_4e3_Can_tx_mr_lr_modeType value) {
assert(::apollo::drivers::Esr_status4_4e3_Can_tx_mr_lr_modeType_IsValid(value));
set_has_can_tx_mr_lr_mode();
can_tx_mr_lr_mode_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_mr_lr_mode)
}
// optional double can_tx_auto_align_angle = 7;
bool Esr_status4_4e3::has_can_tx_auto_align_angle() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_auto_align_angle() {
_has_bits_[0] |= 0x00000040u;
}
void Esr_status4_4e3::clear_has_can_tx_auto_align_angle() {
_has_bits_[0] &= ~0x00000040u;
}
void Esr_status4_4e3::clear_can_tx_auto_align_angle() {
can_tx_auto_align_angle_ = 0;
clear_has_can_tx_auto_align_angle();
}
double Esr_status4_4e3::can_tx_auto_align_angle() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_auto_align_angle)
return can_tx_auto_align_angle_;
}
void Esr_status4_4e3::set_can_tx_auto_align_angle(double value) {
set_has_can_tx_auto_align_angle();
can_tx_auto_align_angle_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_auto_align_angle)
}
// optional int32 can_tx_rolling_count_3 = 8;
bool Esr_status4_4e3::has_can_tx_rolling_count_3() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_rolling_count_3() {
_has_bits_[0] |= 0x00000080u;
}
void Esr_status4_4e3::clear_has_can_tx_rolling_count_3() {
_has_bits_[0] &= ~0x00000080u;
}
void Esr_status4_4e3::clear_can_tx_rolling_count_3() {
can_tx_rolling_count_3_ = 0;
clear_has_can_tx_rolling_count_3();
}
::google::protobuf::int32 Esr_status4_4e3::can_tx_rolling_count_3() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_rolling_count_3)
return can_tx_rolling_count_3_;
}
void Esr_status4_4e3::set_can_tx_rolling_count_3(::google::protobuf::int32 value) {
set_has_can_tx_rolling_count_3();
can_tx_rolling_count_3_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_rolling_count_3)
}
// optional int32 can_tx_path_id_fcw_stat = 9;
bool Esr_status4_4e3::has_can_tx_path_id_fcw_stat() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_path_id_fcw_stat() {
_has_bits_[0] |= 0x00000100u;
}
void Esr_status4_4e3::clear_has_can_tx_path_id_fcw_stat() {
_has_bits_[0] &= ~0x00000100u;
}
void Esr_status4_4e3::clear_can_tx_path_id_fcw_stat() {
can_tx_path_id_fcw_stat_ = 0;
clear_has_can_tx_path_id_fcw_stat();
}
::google::protobuf::int32 Esr_status4_4e3::can_tx_path_id_fcw_stat() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_path_id_fcw_stat)
return can_tx_path_id_fcw_stat_;
}
void Esr_status4_4e3::set_can_tx_path_id_fcw_stat(::google::protobuf::int32 value) {
set_has_can_tx_path_id_fcw_stat();
can_tx_path_id_fcw_stat_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_path_id_fcw_stat)
}
// optional int32 can_tx_path_id_fcw_move = 10;
bool Esr_status4_4e3::has_can_tx_path_id_fcw_move() const {
return (_has_bits_[0] & 0x00000200u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_path_id_fcw_move() {
_has_bits_[0] |= 0x00000200u;
}
void Esr_status4_4e3::clear_has_can_tx_path_id_fcw_move() {
_has_bits_[0] &= ~0x00000200u;
}
void Esr_status4_4e3::clear_can_tx_path_id_fcw_move() {
can_tx_path_id_fcw_move_ = 0;
clear_has_can_tx_path_id_fcw_move();
}
::google::protobuf::int32 Esr_status4_4e3::can_tx_path_id_fcw_move() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_path_id_fcw_move)
return can_tx_path_id_fcw_move_;
}
void Esr_status4_4e3::set_can_tx_path_id_fcw_move(::google::protobuf::int32 value) {
set_has_can_tx_path_id_fcw_move();
can_tx_path_id_fcw_move_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_path_id_fcw_move)
}
// optional int32 can_tx_path_id_cmbb_stat = 11;
bool Esr_status4_4e3::has_can_tx_path_id_cmbb_stat() const {
return (_has_bits_[0] & 0x00000400u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_path_id_cmbb_stat() {
_has_bits_[0] |= 0x00000400u;
}
void Esr_status4_4e3::clear_has_can_tx_path_id_cmbb_stat() {
_has_bits_[0] &= ~0x00000400u;
}
void Esr_status4_4e3::clear_can_tx_path_id_cmbb_stat() {
can_tx_path_id_cmbb_stat_ = 0;
clear_has_can_tx_path_id_cmbb_stat();
}
::google::protobuf::int32 Esr_status4_4e3::can_tx_path_id_cmbb_stat() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_path_id_cmbb_stat)
return can_tx_path_id_cmbb_stat_;
}
void Esr_status4_4e3::set_can_tx_path_id_cmbb_stat(::google::protobuf::int32 value) {
set_has_can_tx_path_id_cmbb_stat();
can_tx_path_id_cmbb_stat_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_path_id_cmbb_stat)
}
// optional int32 can_tx_path_id_cmbb_move = 12;
bool Esr_status4_4e3::has_can_tx_path_id_cmbb_move() const {
return (_has_bits_[0] & 0x00000800u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_path_id_cmbb_move() {
_has_bits_[0] |= 0x00000800u;
}
void Esr_status4_4e3::clear_has_can_tx_path_id_cmbb_move() {
_has_bits_[0] &= ~0x00000800u;
}
void Esr_status4_4e3::clear_can_tx_path_id_cmbb_move() {
can_tx_path_id_cmbb_move_ = 0;
clear_has_can_tx_path_id_cmbb_move();
}
::google::protobuf::int32 Esr_status4_4e3::can_tx_path_id_cmbb_move() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_path_id_cmbb_move)
return can_tx_path_id_cmbb_move_;
}
void Esr_status4_4e3::set_can_tx_path_id_cmbb_move(::google::protobuf::int32 value) {
set_has_can_tx_path_id_cmbb_move();
can_tx_path_id_cmbb_move_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_path_id_cmbb_move)
}
// optional int32 can_tx_path_id_acc = 13;
bool Esr_status4_4e3::has_can_tx_path_id_acc() const {
return (_has_bits_[0] & 0x00001000u) != 0;
}
void Esr_status4_4e3::set_has_can_tx_path_id_acc() {
_has_bits_[0] |= 0x00001000u;
}
void Esr_status4_4e3::clear_has_can_tx_path_id_acc() {
_has_bits_[0] &= ~0x00001000u;
}
void Esr_status4_4e3::clear_can_tx_path_id_acc() {
can_tx_path_id_acc_ = 0;
clear_has_can_tx_path_id_acc();
}
::google::protobuf::int32 Esr_status4_4e3::can_tx_path_id_acc() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status4_4e3.can_tx_path_id_acc)
return can_tx_path_id_acc_;
}
void Esr_status4_4e3::set_can_tx_path_id_acc(::google::protobuf::int32 value) {
set_has_can_tx_path_id_acc();
can_tx_path_id_acc_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status4_4e3.can_tx_path_id_acc)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_trackmotionpower_540_Motionpower::kCanTxTrackMovingFieldNumber;
const int Esr_trackmotionpower_540_Motionpower::kCanTxTrackMovingFastFieldNumber;
const int Esr_trackmotionpower_540_Motionpower::kCanTxTrackMovingSlowFieldNumber;
const int Esr_trackmotionpower_540_Motionpower::kCanTxTrackPowerFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_trackmotionpower_540_Motionpower::Esr_trackmotionpower_540_Motionpower()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
}
void Esr_trackmotionpower_540_Motionpower::InitAsDefaultInstance() {
}
Esr_trackmotionpower_540_Motionpower::Esr_trackmotionpower_540_Motionpower(const Esr_trackmotionpower_540_Motionpower& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
}
void Esr_trackmotionpower_540_Motionpower::SharedCtor() {
_cached_size_ = 0;
can_tx_track_moving_ = false;
can_tx_track_moving_fast_ = false;
can_tx_track_moving_slow_ = false;
can_tx_track_power_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_trackmotionpower_540_Motionpower::~Esr_trackmotionpower_540_Motionpower() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
SharedDtor();
}
void Esr_trackmotionpower_540_Motionpower::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_trackmotionpower_540_Motionpower::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_trackmotionpower_540_Motionpower::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_trackmotionpower_540_Motionpower_descriptor_;
}
const Esr_trackmotionpower_540_Motionpower& Esr_trackmotionpower_540_Motionpower::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_trackmotionpower_540_Motionpower* Esr_trackmotionpower_540_Motionpower::default_instance_ = NULL;
Esr_trackmotionpower_540_Motionpower* Esr_trackmotionpower_540_Motionpower::New(::google::protobuf::Arena* arena) const {
Esr_trackmotionpower_540_Motionpower* n = new Esr_trackmotionpower_540_Motionpower;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_trackmotionpower_540_Motionpower::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_trackmotionpower_540_Motionpower, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_trackmotionpower_540_Motionpower*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
ZR_(can_tx_track_moving_, can_tx_track_power_);
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_trackmotionpower_540_Motionpower::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional bool can_tx_track_moving = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &can_tx_track_moving_)));
set_has_can_tx_track_moving();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_track_moving_fast;
break;
}
// optional bool can_tx_track_moving_fast = 2;
case 2: {
if (tag == 16) {
parse_can_tx_track_moving_fast:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &can_tx_track_moving_fast_)));
set_has_can_tx_track_moving_fast();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_tx_track_moving_slow;
break;
}
// optional bool can_tx_track_moving_slow = 3;
case 3: {
if (tag == 24) {
parse_can_tx_track_moving_slow:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &can_tx_track_moving_slow_)));
set_has_can_tx_track_moving_slow();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_track_power;
break;
}
// optional int32 can_tx_track_power = 4;
case 4: {
if (tag == 32) {
parse_can_tx_track_power:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_track_power_)));
set_has_can_tx_track_power();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
return false;
#undef DO_
}
void Esr_trackmotionpower_540_Motionpower::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
// optional bool can_tx_track_moving = 1;
if (has_can_tx_track_moving()) {
::google::protobuf::internal::WireFormatLite::WriteBool(1, this->can_tx_track_moving(), output);
}
// optional bool can_tx_track_moving_fast = 2;
if (has_can_tx_track_moving_fast()) {
::google::protobuf::internal::WireFormatLite::WriteBool(2, this->can_tx_track_moving_fast(), output);
}
// optional bool can_tx_track_moving_slow = 3;
if (has_can_tx_track_moving_slow()) {
::google::protobuf::internal::WireFormatLite::WriteBool(3, this->can_tx_track_moving_slow(), output);
}
// optional int32 can_tx_track_power = 4;
if (has_can_tx_track_power()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_tx_track_power(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
}
::google::protobuf::uint8* Esr_trackmotionpower_540_Motionpower::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
// optional bool can_tx_track_moving = 1;
if (has_can_tx_track_moving()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->can_tx_track_moving(), target);
}
// optional bool can_tx_track_moving_fast = 2;
if (has_can_tx_track_moving_fast()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->can_tx_track_moving_fast(), target);
}
// optional bool can_tx_track_moving_slow = 3;
if (has_can_tx_track_moving_slow()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->can_tx_track_moving_slow(), target);
}
// optional int32 can_tx_track_power = 4;
if (has_can_tx_track_power()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_tx_track_power(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
return target;
}
int Esr_trackmotionpower_540_Motionpower::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
int total_size = 0;
if (_has_bits_[0 / 32] & 15u) {
// optional bool can_tx_track_moving = 1;
if (has_can_tx_track_moving()) {
total_size += 1 + 1;
}
// optional bool can_tx_track_moving_fast = 2;
if (has_can_tx_track_moving_fast()) {
total_size += 1 + 1;
}
// optional bool can_tx_track_moving_slow = 3;
if (has_can_tx_track_moving_slow()) {
total_size += 1 + 1;
}
// optional int32 can_tx_track_power = 4;
if (has_can_tx_track_power()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_track_power());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_trackmotionpower_540_Motionpower::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_trackmotionpower_540_Motionpower* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_trackmotionpower_540_Motionpower>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
MergeFrom(*source);
}
}
void Esr_trackmotionpower_540_Motionpower::MergeFrom(const Esr_trackmotionpower_540_Motionpower& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_track_moving()) {
set_can_tx_track_moving(from.can_tx_track_moving());
}
if (from.has_can_tx_track_moving_fast()) {
set_can_tx_track_moving_fast(from.can_tx_track_moving_fast());
}
if (from.has_can_tx_track_moving_slow()) {
set_can_tx_track_moving_slow(from.can_tx_track_moving_slow());
}
if (from.has_can_tx_track_power()) {
set_can_tx_track_power(from.can_tx_track_power());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_trackmotionpower_540_Motionpower::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_trackmotionpower_540_Motionpower::CopyFrom(const Esr_trackmotionpower_540_Motionpower& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_trackmotionpower_540.Motionpower)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_trackmotionpower_540_Motionpower::IsInitialized() const {
return true;
}
void Esr_trackmotionpower_540_Motionpower::Swap(Esr_trackmotionpower_540_Motionpower* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_trackmotionpower_540_Motionpower::InternalSwap(Esr_trackmotionpower_540_Motionpower* other) {
std::swap(can_tx_track_moving_, other->can_tx_track_moving_);
std::swap(can_tx_track_moving_fast_, other->can_tx_track_moving_fast_);
std::swap(can_tx_track_moving_slow_, other->can_tx_track_moving_slow_);
std::swap(can_tx_track_power_, other->can_tx_track_power_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_trackmotionpower_540_Motionpower::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_trackmotionpower_540_Motionpower_descriptor_;
metadata.reflection = Esr_trackmotionpower_540_Motionpower_reflection_;
return metadata;
}
// -------------------------------------------------------------------
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_trackmotionpower_540::kCanTxTrackRollingCount2FieldNumber;
const int Esr_trackmotionpower_540::kCanTxTrackCanIdGroupFieldNumber;
const int Esr_trackmotionpower_540::kCanTxTrackMotionPowerFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_trackmotionpower_540::Esr_trackmotionpower_540()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_trackmotionpower_540)
}
void Esr_trackmotionpower_540::InitAsDefaultInstance() {
}
Esr_trackmotionpower_540::Esr_trackmotionpower_540(const Esr_trackmotionpower_540& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_trackmotionpower_540)
}
void Esr_trackmotionpower_540::SharedCtor() {
_cached_size_ = 0;
can_tx_track_rolling_count_2_ = false;
can_tx_track_can_id_group_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_trackmotionpower_540::~Esr_trackmotionpower_540() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_trackmotionpower_540)
SharedDtor();
}
void Esr_trackmotionpower_540::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_trackmotionpower_540::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_trackmotionpower_540::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_trackmotionpower_540_descriptor_;
}
const Esr_trackmotionpower_540& Esr_trackmotionpower_540::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_trackmotionpower_540* Esr_trackmotionpower_540::default_instance_ = NULL;
Esr_trackmotionpower_540* Esr_trackmotionpower_540::New(::google::protobuf::Arena* arena) const {
Esr_trackmotionpower_540* n = new Esr_trackmotionpower_540;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_trackmotionpower_540::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_trackmotionpower_540)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_trackmotionpower_540, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_trackmotionpower_540*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
ZR_(can_tx_track_rolling_count_2_, can_tx_track_can_id_group_);
#undef ZR_HELPER_
#undef ZR_
can_tx_track_motion_power_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_trackmotionpower_540::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_trackmotionpower_540)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional bool can_tx_track_rolling_count_2 = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &can_tx_track_rolling_count_2_)));
set_has_can_tx_track_rolling_count_2();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_track_can_id_group;
break;
}
// optional int32 can_tx_track_can_id_group = 2;
case 2: {
if (tag == 16) {
parse_can_tx_track_can_id_group:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_track_can_id_group_)));
set_has_can_tx_track_can_id_group();
} else {
goto handle_unusual;
}
if (input->ExpectTag(26)) goto parse_can_tx_track_motion_power;
break;
}
// repeated .apollo.drivers.Esr_trackmotionpower_540.Motionpower can_tx_track_motion_power = 3;
case 3: {
if (tag == 26) {
parse_can_tx_track_motion_power:
DO_(input->IncrementRecursionDepth());
parse_loop_can_tx_track_motion_power:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_can_tx_track_motion_power()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(26)) goto parse_loop_can_tx_track_motion_power;
input->UnsafeDecrementRecursionDepth();
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_trackmotionpower_540)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_trackmotionpower_540)
return false;
#undef DO_
}
void Esr_trackmotionpower_540::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_trackmotionpower_540)
// optional bool can_tx_track_rolling_count_2 = 1;
if (has_can_tx_track_rolling_count_2()) {
::google::protobuf::internal::WireFormatLite::WriteBool(1, this->can_tx_track_rolling_count_2(), output);
}
// optional int32 can_tx_track_can_id_group = 2;
if (has_can_tx_track_can_id_group()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->can_tx_track_can_id_group(), output);
}
// repeated .apollo.drivers.Esr_trackmotionpower_540.Motionpower can_tx_track_motion_power = 3;
for (unsigned int i = 0, n = this->can_tx_track_motion_power_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, this->can_tx_track_motion_power(i), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_trackmotionpower_540)
}
::google::protobuf::uint8* Esr_trackmotionpower_540::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_trackmotionpower_540)
// optional bool can_tx_track_rolling_count_2 = 1;
if (has_can_tx_track_rolling_count_2()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->can_tx_track_rolling_count_2(), target);
}
// optional int32 can_tx_track_can_id_group = 2;
if (has_can_tx_track_can_id_group()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->can_tx_track_can_id_group(), target);
}
// repeated .apollo.drivers.Esr_trackmotionpower_540.Motionpower can_tx_track_motion_power = 3;
for (unsigned int i = 0, n = this->can_tx_track_motion_power_size(); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
3, this->can_tx_track_motion_power(i), false, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_trackmotionpower_540)
return target;
}
int Esr_trackmotionpower_540::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_trackmotionpower_540)
int total_size = 0;
if (_has_bits_[0 / 32] & 3u) {
// optional bool can_tx_track_rolling_count_2 = 1;
if (has_can_tx_track_rolling_count_2()) {
total_size += 1 + 1;
}
// optional int32 can_tx_track_can_id_group = 2;
if (has_can_tx_track_can_id_group()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_track_can_id_group());
}
}
// repeated .apollo.drivers.Esr_trackmotionpower_540.Motionpower can_tx_track_motion_power = 3;
total_size += 1 * this->can_tx_track_motion_power_size();
for (int i = 0; i < this->can_tx_track_motion_power_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->can_tx_track_motion_power(i));
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_trackmotionpower_540::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_trackmotionpower_540)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_trackmotionpower_540* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_trackmotionpower_540>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_trackmotionpower_540)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_trackmotionpower_540)
MergeFrom(*source);
}
}
void Esr_trackmotionpower_540::MergeFrom(const Esr_trackmotionpower_540& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_trackmotionpower_540)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
can_tx_track_motion_power_.MergeFrom(from.can_tx_track_motion_power_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_track_rolling_count_2()) {
set_can_tx_track_rolling_count_2(from.can_tx_track_rolling_count_2());
}
if (from.has_can_tx_track_can_id_group()) {
set_can_tx_track_can_id_group(from.can_tx_track_can_id_group());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_trackmotionpower_540::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_trackmotionpower_540)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_trackmotionpower_540::CopyFrom(const Esr_trackmotionpower_540& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_trackmotionpower_540)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_trackmotionpower_540::IsInitialized() const {
return true;
}
void Esr_trackmotionpower_540::Swap(Esr_trackmotionpower_540* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_trackmotionpower_540::InternalSwap(Esr_trackmotionpower_540* other) {
std::swap(can_tx_track_rolling_count_2_, other->can_tx_track_rolling_count_2_);
std::swap(can_tx_track_can_id_group_, other->can_tx_track_can_id_group_);
can_tx_track_motion_power_.UnsafeArenaSwap(&other->can_tx_track_motion_power_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_trackmotionpower_540::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_trackmotionpower_540_descriptor_;
metadata.reflection = Esr_trackmotionpower_540_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_trackmotionpower_540_Motionpower
// optional bool can_tx_track_moving = 1;
bool Esr_trackmotionpower_540_Motionpower::has_can_tx_track_moving() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_trackmotionpower_540_Motionpower::set_has_can_tx_track_moving() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_trackmotionpower_540_Motionpower::clear_has_can_tx_track_moving() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_trackmotionpower_540_Motionpower::clear_can_tx_track_moving() {
can_tx_track_moving_ = false;
clear_has_can_tx_track_moving();
}
bool Esr_trackmotionpower_540_Motionpower::can_tx_track_moving() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_trackmotionpower_540.Motionpower.can_tx_track_moving)
return can_tx_track_moving_;
}
void Esr_trackmotionpower_540_Motionpower::set_can_tx_track_moving(bool value) {
set_has_can_tx_track_moving();
can_tx_track_moving_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_trackmotionpower_540.Motionpower.can_tx_track_moving)
}
// optional bool can_tx_track_moving_fast = 2;
bool Esr_trackmotionpower_540_Motionpower::has_can_tx_track_moving_fast() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_trackmotionpower_540_Motionpower::set_has_can_tx_track_moving_fast() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_trackmotionpower_540_Motionpower::clear_has_can_tx_track_moving_fast() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_trackmotionpower_540_Motionpower::clear_can_tx_track_moving_fast() {
can_tx_track_moving_fast_ = false;
clear_has_can_tx_track_moving_fast();
}
bool Esr_trackmotionpower_540_Motionpower::can_tx_track_moving_fast() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_trackmotionpower_540.Motionpower.can_tx_track_moving_fast)
return can_tx_track_moving_fast_;
}
void Esr_trackmotionpower_540_Motionpower::set_can_tx_track_moving_fast(bool value) {
set_has_can_tx_track_moving_fast();
can_tx_track_moving_fast_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_trackmotionpower_540.Motionpower.can_tx_track_moving_fast)
}
// optional bool can_tx_track_moving_slow = 3;
bool Esr_trackmotionpower_540_Motionpower::has_can_tx_track_moving_slow() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_trackmotionpower_540_Motionpower::set_has_can_tx_track_moving_slow() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_trackmotionpower_540_Motionpower::clear_has_can_tx_track_moving_slow() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_trackmotionpower_540_Motionpower::clear_can_tx_track_moving_slow() {
can_tx_track_moving_slow_ = false;
clear_has_can_tx_track_moving_slow();
}
bool Esr_trackmotionpower_540_Motionpower::can_tx_track_moving_slow() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_trackmotionpower_540.Motionpower.can_tx_track_moving_slow)
return can_tx_track_moving_slow_;
}
void Esr_trackmotionpower_540_Motionpower::set_can_tx_track_moving_slow(bool value) {
set_has_can_tx_track_moving_slow();
can_tx_track_moving_slow_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_trackmotionpower_540.Motionpower.can_tx_track_moving_slow)
}
// optional int32 can_tx_track_power = 4;
bool Esr_trackmotionpower_540_Motionpower::has_can_tx_track_power() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_trackmotionpower_540_Motionpower::set_has_can_tx_track_power() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_trackmotionpower_540_Motionpower::clear_has_can_tx_track_power() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_trackmotionpower_540_Motionpower::clear_can_tx_track_power() {
can_tx_track_power_ = 0;
clear_has_can_tx_track_power();
}
::google::protobuf::int32 Esr_trackmotionpower_540_Motionpower::can_tx_track_power() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_trackmotionpower_540.Motionpower.can_tx_track_power)
return can_tx_track_power_;
}
void Esr_trackmotionpower_540_Motionpower::set_can_tx_track_power(::google::protobuf::int32 value) {
set_has_can_tx_track_power();
can_tx_track_power_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_trackmotionpower_540.Motionpower.can_tx_track_power)
}
// -------------------------------------------------------------------
// Esr_trackmotionpower_540
// optional bool can_tx_track_rolling_count_2 = 1;
bool Esr_trackmotionpower_540::has_can_tx_track_rolling_count_2() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_trackmotionpower_540::set_has_can_tx_track_rolling_count_2() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_trackmotionpower_540::clear_has_can_tx_track_rolling_count_2() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_trackmotionpower_540::clear_can_tx_track_rolling_count_2() {
can_tx_track_rolling_count_2_ = false;
clear_has_can_tx_track_rolling_count_2();
}
bool Esr_trackmotionpower_540::can_tx_track_rolling_count_2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_trackmotionpower_540.can_tx_track_rolling_count_2)
return can_tx_track_rolling_count_2_;
}
void Esr_trackmotionpower_540::set_can_tx_track_rolling_count_2(bool value) {
set_has_can_tx_track_rolling_count_2();
can_tx_track_rolling_count_2_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_trackmotionpower_540.can_tx_track_rolling_count_2)
}
// optional int32 can_tx_track_can_id_group = 2;
bool Esr_trackmotionpower_540::has_can_tx_track_can_id_group() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_trackmotionpower_540::set_has_can_tx_track_can_id_group() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_trackmotionpower_540::clear_has_can_tx_track_can_id_group() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_trackmotionpower_540::clear_can_tx_track_can_id_group() {
can_tx_track_can_id_group_ = 0;
clear_has_can_tx_track_can_id_group();
}
::google::protobuf::int32 Esr_trackmotionpower_540::can_tx_track_can_id_group() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_trackmotionpower_540.can_tx_track_can_id_group)
return can_tx_track_can_id_group_;
}
void Esr_trackmotionpower_540::set_can_tx_track_can_id_group(::google::protobuf::int32 value) {
set_has_can_tx_track_can_id_group();
can_tx_track_can_id_group_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_trackmotionpower_540.can_tx_track_can_id_group)
}
// repeated .apollo.drivers.Esr_trackmotionpower_540.Motionpower can_tx_track_motion_power = 3;
int Esr_trackmotionpower_540::can_tx_track_motion_power_size() const {
return can_tx_track_motion_power_.size();
}
void Esr_trackmotionpower_540::clear_can_tx_track_motion_power() {
can_tx_track_motion_power_.Clear();
}
const ::apollo::drivers::Esr_trackmotionpower_540_Motionpower& Esr_trackmotionpower_540::can_tx_track_motion_power(int index) const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_trackmotionpower_540.can_tx_track_motion_power)
return can_tx_track_motion_power_.Get(index);
}
::apollo::drivers::Esr_trackmotionpower_540_Motionpower* Esr_trackmotionpower_540::mutable_can_tx_track_motion_power(int index) {
// @@protoc_insertion_point(field_mutable:apollo.drivers.Esr_trackmotionpower_540.can_tx_track_motion_power)
return can_tx_track_motion_power_.Mutable(index);
}
::apollo::drivers::Esr_trackmotionpower_540_Motionpower* Esr_trackmotionpower_540::add_can_tx_track_motion_power() {
// @@protoc_insertion_point(field_add:apollo.drivers.Esr_trackmotionpower_540.can_tx_track_motion_power)
return can_tx_track_motion_power_.Add();
}
::google::protobuf::RepeatedPtrField< ::apollo::drivers::Esr_trackmotionpower_540_Motionpower >*
Esr_trackmotionpower_540::mutable_can_tx_track_motion_power() {
// @@protoc_insertion_point(field_mutable_list:apollo.drivers.Esr_trackmotionpower_540.can_tx_track_motion_power)
return &can_tx_track_motion_power_;
}
const ::google::protobuf::RepeatedPtrField< ::apollo::drivers::Esr_trackmotionpower_540_Motionpower >&
Esr_trackmotionpower_540::can_tx_track_motion_power() const {
// @@protoc_insertion_point(field_list:apollo.drivers.Esr_trackmotionpower_540.can_tx_track_motion_power)
return can_tx_track_motion_power_;
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Acm_inst_req_7e0::kCommandCtrFieldNumber;
const int Acm_inst_req_7e0::kCommandCodeFieldNumber;
const int Acm_inst_req_7e0::kCcWord2FieldNumber;
const int Acm_inst_req_7e0::kCcWord1FieldNumber;
const int Acm_inst_req_7e0::kCcByte2FieldNumber;
const int Acm_inst_req_7e0::kCcByte1FieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Acm_inst_req_7e0::Acm_inst_req_7e0()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Acm_inst_req_7e0)
}
void Acm_inst_req_7e0::InitAsDefaultInstance() {
}
Acm_inst_req_7e0::Acm_inst_req_7e0(const Acm_inst_req_7e0& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Acm_inst_req_7e0)
}
void Acm_inst_req_7e0::SharedCtor() {
_cached_size_ = 0;
command_ctr_ = 0;
command_code_ = 0;
cc_word_2_ = 0;
cc_word_1_ = 0;
cc_byte_2_ = 0;
cc_byte_1_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Acm_inst_req_7e0::~Acm_inst_req_7e0() {
// @@protoc_insertion_point(destructor:apollo.drivers.Acm_inst_req_7e0)
SharedDtor();
}
void Acm_inst_req_7e0::SharedDtor() {
if (this != default_instance_) {
}
}
void Acm_inst_req_7e0::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Acm_inst_req_7e0::descriptor() {
protobuf_AssignDescriptorsOnce();
return Acm_inst_req_7e0_descriptor_;
}
const Acm_inst_req_7e0& Acm_inst_req_7e0::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Acm_inst_req_7e0* Acm_inst_req_7e0::default_instance_ = NULL;
Acm_inst_req_7e0* Acm_inst_req_7e0::New(::google::protobuf::Arena* arena) const {
Acm_inst_req_7e0* n = new Acm_inst_req_7e0;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Acm_inst_req_7e0::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Acm_inst_req_7e0)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Acm_inst_req_7e0, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Acm_inst_req_7e0*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 63u) {
ZR_(command_ctr_, cc_byte_1_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Acm_inst_req_7e0::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Acm_inst_req_7e0)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 command_ctr = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &command_ctr_)));
set_has_command_ctr();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_command_code;
break;
}
// optional int32 command_code = 2;
case 2: {
if (tag == 16) {
parse_command_code:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &command_code_)));
set_has_command_code();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_cc_word_2;
break;
}
// optional int32 cc_word_2 = 3;
case 3: {
if (tag == 24) {
parse_cc_word_2:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &cc_word_2_)));
set_has_cc_word_2();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_cc_word_1;
break;
}
// optional int32 cc_word_1 = 4;
case 4: {
if (tag == 32) {
parse_cc_word_1:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &cc_word_1_)));
set_has_cc_word_1();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_cc_byte_2;
break;
}
// optional int32 cc_byte_2 = 5;
case 5: {
if (tag == 40) {
parse_cc_byte_2:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &cc_byte_2_)));
set_has_cc_byte_2();
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_cc_byte_1;
break;
}
// optional int32 cc_byte_1 = 6;
case 6: {
if (tag == 48) {
parse_cc_byte_1:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &cc_byte_1_)));
set_has_cc_byte_1();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Acm_inst_req_7e0)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Acm_inst_req_7e0)
return false;
#undef DO_
}
void Acm_inst_req_7e0::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Acm_inst_req_7e0)
// optional int32 command_ctr = 1;
if (has_command_ctr()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->command_ctr(), output);
}
// optional int32 command_code = 2;
if (has_command_code()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->command_code(), output);
}
// optional int32 cc_word_2 = 3;
if (has_cc_word_2()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->cc_word_2(), output);
}
// optional int32 cc_word_1 = 4;
if (has_cc_word_1()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->cc_word_1(), output);
}
// optional int32 cc_byte_2 = 5;
if (has_cc_byte_2()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->cc_byte_2(), output);
}
// optional int32 cc_byte_1 = 6;
if (has_cc_byte_1()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->cc_byte_1(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Acm_inst_req_7e0)
}
::google::protobuf::uint8* Acm_inst_req_7e0::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Acm_inst_req_7e0)
// optional int32 command_ctr = 1;
if (has_command_ctr()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->command_ctr(), target);
}
// optional int32 command_code = 2;
if (has_command_code()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->command_code(), target);
}
// optional int32 cc_word_2 = 3;
if (has_cc_word_2()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->cc_word_2(), target);
}
// optional int32 cc_word_1 = 4;
if (has_cc_word_1()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->cc_word_1(), target);
}
// optional int32 cc_byte_2 = 5;
if (has_cc_byte_2()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->cc_byte_2(), target);
}
// optional int32 cc_byte_1 = 6;
if (has_cc_byte_1()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->cc_byte_1(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Acm_inst_req_7e0)
return target;
}
int Acm_inst_req_7e0::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Acm_inst_req_7e0)
int total_size = 0;
if (_has_bits_[0 / 32] & 63u) {
// optional int32 command_ctr = 1;
if (has_command_ctr()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->command_ctr());
}
// optional int32 command_code = 2;
if (has_command_code()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->command_code());
}
// optional int32 cc_word_2 = 3;
if (has_cc_word_2()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->cc_word_2());
}
// optional int32 cc_word_1 = 4;
if (has_cc_word_1()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->cc_word_1());
}
// optional int32 cc_byte_2 = 5;
if (has_cc_byte_2()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->cc_byte_2());
}
// optional int32 cc_byte_1 = 6;
if (has_cc_byte_1()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->cc_byte_1());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Acm_inst_req_7e0::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Acm_inst_req_7e0)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Acm_inst_req_7e0* source =
::google::protobuf::internal::DynamicCastToGenerated<const Acm_inst_req_7e0>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Acm_inst_req_7e0)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Acm_inst_req_7e0)
MergeFrom(*source);
}
}
void Acm_inst_req_7e0::MergeFrom(const Acm_inst_req_7e0& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Acm_inst_req_7e0)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_command_ctr()) {
set_command_ctr(from.command_ctr());
}
if (from.has_command_code()) {
set_command_code(from.command_code());
}
if (from.has_cc_word_2()) {
set_cc_word_2(from.cc_word_2());
}
if (from.has_cc_word_1()) {
set_cc_word_1(from.cc_word_1());
}
if (from.has_cc_byte_2()) {
set_cc_byte_2(from.cc_byte_2());
}
if (from.has_cc_byte_1()) {
set_cc_byte_1(from.cc_byte_1());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Acm_inst_req_7e0::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Acm_inst_req_7e0)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Acm_inst_req_7e0::CopyFrom(const Acm_inst_req_7e0& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Acm_inst_req_7e0)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Acm_inst_req_7e0::IsInitialized() const {
return true;
}
void Acm_inst_req_7e0::Swap(Acm_inst_req_7e0* other) {
if (other == this) return;
InternalSwap(other);
}
void Acm_inst_req_7e0::InternalSwap(Acm_inst_req_7e0* other) {
std::swap(command_ctr_, other->command_ctr_);
std::swap(command_code_, other->command_code_);
std::swap(cc_word_2_, other->cc_word_2_);
std::swap(cc_word_1_, other->cc_word_1_);
std::swap(cc_byte_2_, other->cc_byte_2_);
std::swap(cc_byte_1_, other->cc_byte_1_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Acm_inst_req_7e0::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Acm_inst_req_7e0_descriptor_;
metadata.reflection = Acm_inst_req_7e0_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Acm_inst_req_7e0
// optional int32 command_ctr = 1;
bool Acm_inst_req_7e0::has_command_ctr() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Acm_inst_req_7e0::set_has_command_ctr() {
_has_bits_[0] |= 0x00000001u;
}
void Acm_inst_req_7e0::clear_has_command_ctr() {
_has_bits_[0] &= ~0x00000001u;
}
void Acm_inst_req_7e0::clear_command_ctr() {
command_ctr_ = 0;
clear_has_command_ctr();
}
::google::protobuf::int32 Acm_inst_req_7e0::command_ctr() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_req_7e0.command_ctr)
return command_ctr_;
}
void Acm_inst_req_7e0::set_command_ctr(::google::protobuf::int32 value) {
set_has_command_ctr();
command_ctr_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_req_7e0.command_ctr)
}
// optional int32 command_code = 2;
bool Acm_inst_req_7e0::has_command_code() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Acm_inst_req_7e0::set_has_command_code() {
_has_bits_[0] |= 0x00000002u;
}
void Acm_inst_req_7e0::clear_has_command_code() {
_has_bits_[0] &= ~0x00000002u;
}
void Acm_inst_req_7e0::clear_command_code() {
command_code_ = 0;
clear_has_command_code();
}
::google::protobuf::int32 Acm_inst_req_7e0::command_code() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_req_7e0.command_code)
return command_code_;
}
void Acm_inst_req_7e0::set_command_code(::google::protobuf::int32 value) {
set_has_command_code();
command_code_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_req_7e0.command_code)
}
// optional int32 cc_word_2 = 3;
bool Acm_inst_req_7e0::has_cc_word_2() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Acm_inst_req_7e0::set_has_cc_word_2() {
_has_bits_[0] |= 0x00000004u;
}
void Acm_inst_req_7e0::clear_has_cc_word_2() {
_has_bits_[0] &= ~0x00000004u;
}
void Acm_inst_req_7e0::clear_cc_word_2() {
cc_word_2_ = 0;
clear_has_cc_word_2();
}
::google::protobuf::int32 Acm_inst_req_7e0::cc_word_2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_req_7e0.cc_word_2)
return cc_word_2_;
}
void Acm_inst_req_7e0::set_cc_word_2(::google::protobuf::int32 value) {
set_has_cc_word_2();
cc_word_2_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_req_7e0.cc_word_2)
}
// optional int32 cc_word_1 = 4;
bool Acm_inst_req_7e0::has_cc_word_1() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Acm_inst_req_7e0::set_has_cc_word_1() {
_has_bits_[0] |= 0x00000008u;
}
void Acm_inst_req_7e0::clear_has_cc_word_1() {
_has_bits_[0] &= ~0x00000008u;
}
void Acm_inst_req_7e0::clear_cc_word_1() {
cc_word_1_ = 0;
clear_has_cc_word_1();
}
::google::protobuf::int32 Acm_inst_req_7e0::cc_word_1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_req_7e0.cc_word_1)
return cc_word_1_;
}
void Acm_inst_req_7e0::set_cc_word_1(::google::protobuf::int32 value) {
set_has_cc_word_1();
cc_word_1_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_req_7e0.cc_word_1)
}
// optional int32 cc_byte_2 = 5;
bool Acm_inst_req_7e0::has_cc_byte_2() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Acm_inst_req_7e0::set_has_cc_byte_2() {
_has_bits_[0] |= 0x00000010u;
}
void Acm_inst_req_7e0::clear_has_cc_byte_2() {
_has_bits_[0] &= ~0x00000010u;
}
void Acm_inst_req_7e0::clear_cc_byte_2() {
cc_byte_2_ = 0;
clear_has_cc_byte_2();
}
::google::protobuf::int32 Acm_inst_req_7e0::cc_byte_2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_req_7e0.cc_byte_2)
return cc_byte_2_;
}
void Acm_inst_req_7e0::set_cc_byte_2(::google::protobuf::int32 value) {
set_has_cc_byte_2();
cc_byte_2_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_req_7e0.cc_byte_2)
}
// optional int32 cc_byte_1 = 6;
bool Acm_inst_req_7e0::has_cc_byte_1() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Acm_inst_req_7e0::set_has_cc_byte_1() {
_has_bits_[0] |= 0x00000020u;
}
void Acm_inst_req_7e0::clear_has_cc_byte_1() {
_has_bits_[0] &= ~0x00000020u;
}
void Acm_inst_req_7e0::clear_cc_byte_1() {
cc_byte_1_ = 0;
clear_has_cc_byte_1();
}
::google::protobuf::int32 Acm_inst_req_7e0::cc_byte_1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_req_7e0.cc_byte_1)
return cc_byte_1_;
}
void Acm_inst_req_7e0::set_cc_byte_1(::google::protobuf::int32 value) {
set_has_cc_byte_1();
cc_byte_1_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_req_7e0.cc_byte_1)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
const ::google::protobuf::EnumDescriptor* Esr_track01_500_Can_tx_track_grouping_changedType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_track01_500_Can_tx_track_grouping_changedType_descriptor_;
}
bool Esr_track01_500_Can_tx_track_grouping_changedType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_track01_500_Can_tx_track_grouping_changedType Esr_track01_500::CAN_TX_TRACK_GROUPING_CHANGED_GROUPINGUNCHANGED;
const Esr_track01_500_Can_tx_track_grouping_changedType Esr_track01_500::CAN_TX_TRACK_GROUPING_CHANGED_GROUPINGCHANGED;
const Esr_track01_500_Can_tx_track_grouping_changedType Esr_track01_500::Can_tx_track_grouping_changedType_MIN;
const Esr_track01_500_Can_tx_track_grouping_changedType Esr_track01_500::Can_tx_track_grouping_changedType_MAX;
const int Esr_track01_500::Can_tx_track_grouping_changedType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_track01_500_Can_tx_track_oncomingType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_track01_500_Can_tx_track_oncomingType_descriptor_;
}
bool Esr_track01_500_Can_tx_track_oncomingType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_track01_500_Can_tx_track_oncomingType Esr_track01_500::CAN_TX_TRACK_ONCOMING_NOTONCOMING;
const Esr_track01_500_Can_tx_track_oncomingType Esr_track01_500::CAN_TX_TRACK_ONCOMING_ONCOMING;
const Esr_track01_500_Can_tx_track_oncomingType Esr_track01_500::Can_tx_track_oncomingType_MIN;
const Esr_track01_500_Can_tx_track_oncomingType Esr_track01_500::Can_tx_track_oncomingType_MAX;
const int Esr_track01_500::Can_tx_track_oncomingType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_track01_500_Can_tx_track_bridge_objectType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_track01_500_Can_tx_track_bridge_objectType_descriptor_;
}
bool Esr_track01_500_Can_tx_track_bridge_objectType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_track01_500_Can_tx_track_bridge_objectType Esr_track01_500::CAN_TX_TRACK_BRIDGE_OBJECT_NOT_BRIDGE;
const Esr_track01_500_Can_tx_track_bridge_objectType Esr_track01_500::CAN_TX_TRACK_BRIDGE_OBJECT_BRIDGE;
const Esr_track01_500_Can_tx_track_bridge_objectType Esr_track01_500::Can_tx_track_bridge_objectType_MIN;
const Esr_track01_500_Can_tx_track_bridge_objectType Esr_track01_500::Can_tx_track_bridge_objectType_MAX;
const int Esr_track01_500::Can_tx_track_bridge_objectType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_track01_500_Can_tx_track_statusType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_track01_500_Can_tx_track_statusType_descriptor_;
}
bool Esr_track01_500_Can_tx_track_statusType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_track01_500_Can_tx_track_statusType Esr_track01_500::CAN_TX_TRACK_STATUS_NO_TARGET;
const Esr_track01_500_Can_tx_track_statusType Esr_track01_500::CAN_TX_TRACK_STATUS_NEW_TARGET;
const Esr_track01_500_Can_tx_track_statusType Esr_track01_500::CAN_TX_TRACK_STATUS_NEW_UPDATED_TARGET;
const Esr_track01_500_Can_tx_track_statusType Esr_track01_500::CAN_TX_TRACK_STATUS_UPDATED_TARGET;
const Esr_track01_500_Can_tx_track_statusType Esr_track01_500::CAN_TX_TRACK_STATUS_COASTED_TARGET;
const Esr_track01_500_Can_tx_track_statusType Esr_track01_500::CAN_TX_TRACK_STATUS_MERGED_TARGET;
const Esr_track01_500_Can_tx_track_statusType Esr_track01_500::CAN_TX_TRACK_STATUS_INVALID_COASTED_TARGET;
const Esr_track01_500_Can_tx_track_statusType Esr_track01_500::CAN_TX_TRACK_STATUS_NEW_COASTED_TARGET;
const Esr_track01_500_Can_tx_track_statusType Esr_track01_500::Can_tx_track_statusType_MIN;
const Esr_track01_500_Can_tx_track_statusType Esr_track01_500::Can_tx_track_statusType_MAX;
const int Esr_track01_500::Can_tx_track_statusType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_track01_500_Can_tx_track_med_range_modeType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_track01_500_Can_tx_track_med_range_modeType_descriptor_;
}
bool Esr_track01_500_Can_tx_track_med_range_modeType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_track01_500_Can_tx_track_med_range_modeType Esr_track01_500::CAN_TX_TRACK_MED_RANGE_MODE_NO_MR_LR_UPDATE;
const Esr_track01_500_Can_tx_track_med_range_modeType Esr_track01_500::CAN_TX_TRACK_MED_RANGE_MODE_MR_UPDATE_ONLY;
const Esr_track01_500_Can_tx_track_med_range_modeType Esr_track01_500::CAN_TX_TRACK_MED_RANGE_MODE_LR_UPDATE_ONLY;
const Esr_track01_500_Can_tx_track_med_range_modeType Esr_track01_500::CAN_TX_TRACK_MED_RANGE_MODE_BOTH_MR_LR_UPDATE;
const Esr_track01_500_Can_tx_track_med_range_modeType Esr_track01_500::Can_tx_track_med_range_modeType_MIN;
const Esr_track01_500_Can_tx_track_med_range_modeType Esr_track01_500::Can_tx_track_med_range_modeType_MAX;
const int Esr_track01_500::Can_tx_track_med_range_modeType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_track01_500::kCanTxTrackGroupingChangedFieldNumber;
const int Esr_track01_500::kCanTxTrackOncomingFieldNumber;
const int Esr_track01_500::kCanTxTrackLatRateFieldNumber;
const int Esr_track01_500::kCanTxTrackBridgeObjectFieldNumber;
const int Esr_track01_500::kCanTxTrackWidthFieldNumber;
const int Esr_track01_500::kCanTxTrackStatusFieldNumber;
const int Esr_track01_500::kCanTxTrackRollingCountFieldNumber;
const int Esr_track01_500::kCanTxTrackRangeRateFieldNumber;
const int Esr_track01_500::kCanTxTrackRangeAccelFieldNumber;
const int Esr_track01_500::kCanTxTrackRangeFieldNumber;
const int Esr_track01_500::kCanTxTrackMedRangeModeFieldNumber;
const int Esr_track01_500::kCanTxTrackAngleFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_track01_500::Esr_track01_500()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_track01_500)
}
void Esr_track01_500::InitAsDefaultInstance() {
}
Esr_track01_500::Esr_track01_500(const Esr_track01_500& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_track01_500)
}
void Esr_track01_500::SharedCtor() {
_cached_size_ = 0;
can_tx_track_grouping_changed_ = 0;
can_tx_track_oncoming_ = 0;
can_tx_track_lat_rate_ = 0;
can_tx_track_bridge_object_ = 0;
can_tx_track_width_ = 0;
can_tx_track_status_ = 0;
can_tx_track_rolling_count_ = false;
can_tx_track_range_rate_ = 0;
can_tx_track_range_accel_ = 0;
can_tx_track_range_ = 0;
can_tx_track_med_range_mode_ = 0;
can_tx_track_angle_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_track01_500::~Esr_track01_500() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_track01_500)
SharedDtor();
}
void Esr_track01_500::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_track01_500::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_track01_500::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_track01_500_descriptor_;
}
const Esr_track01_500& Esr_track01_500::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_track01_500* Esr_track01_500::default_instance_ = NULL;
Esr_track01_500* Esr_track01_500::New(::google::protobuf::Arena* arena) const {
Esr_track01_500* n = new Esr_track01_500;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_track01_500::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_track01_500)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_track01_500, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_track01_500*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_tx_track_grouping_changed_, can_tx_track_range_rate_);
can_tx_track_rolling_count_ = false;
}
if (_has_bits_[8 / 32] & 3840u) {
ZR_(can_tx_track_med_range_mode_, can_tx_track_angle_);
can_tx_track_range_accel_ = 0;
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_track01_500::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_track01_500)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_grouping_changedType can_tx_track_grouping_changed = 1;
case 1: {
if (tag == 8) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_track01_500_Can_tx_track_grouping_changedType_IsValid(value)) {
set_can_tx_track_grouping_changed(static_cast< ::apollo::drivers::Esr_track01_500_Can_tx_track_grouping_changedType >(value));
} else {
mutable_unknown_fields()->AddVarint(1, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_track_oncoming;
break;
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_oncomingType can_tx_track_oncoming = 2;
case 2: {
if (tag == 16) {
parse_can_tx_track_oncoming:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_track01_500_Can_tx_track_oncomingType_IsValid(value)) {
set_can_tx_track_oncoming(static_cast< ::apollo::drivers::Esr_track01_500_Can_tx_track_oncomingType >(value));
} else {
mutable_unknown_fields()->AddVarint(2, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(25)) goto parse_can_tx_track_lat_rate;
break;
}
// optional double can_tx_track_lat_rate = 3;
case 3: {
if (tag == 25) {
parse_can_tx_track_lat_rate:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_track_lat_rate_)));
set_has_can_tx_track_lat_rate();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_track_bridge_object;
break;
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_bridge_objectType can_tx_track_bridge_object = 4;
case 4: {
if (tag == 32) {
parse_can_tx_track_bridge_object:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_track01_500_Can_tx_track_bridge_objectType_IsValid(value)) {
set_can_tx_track_bridge_object(static_cast< ::apollo::drivers::Esr_track01_500_Can_tx_track_bridge_objectType >(value));
} else {
mutable_unknown_fields()->AddVarint(4, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(41)) goto parse_can_tx_track_width;
break;
}
// optional double can_tx_track_width = 5;
case 5: {
if (tag == 41) {
parse_can_tx_track_width:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_track_width_)));
set_has_can_tx_track_width();
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_tx_track_status;
break;
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_statusType can_tx_track_status = 6;
case 6: {
if (tag == 48) {
parse_can_tx_track_status:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_track01_500_Can_tx_track_statusType_IsValid(value)) {
set_can_tx_track_status(static_cast< ::apollo::drivers::Esr_track01_500_Can_tx_track_statusType >(value));
} else {
mutable_unknown_fields()->AddVarint(6, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_tx_track_rolling_count;
break;
}
// optional bool can_tx_track_rolling_count = 7;
case 7: {
if (tag == 56) {
parse_can_tx_track_rolling_count:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &can_tx_track_rolling_count_)));
set_has_can_tx_track_rolling_count();
} else {
goto handle_unusual;
}
if (input->ExpectTag(65)) goto parse_can_tx_track_range_rate;
break;
}
// optional double can_tx_track_range_rate = 8;
case 8: {
if (tag == 65) {
parse_can_tx_track_range_rate:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_track_range_rate_)));
set_has_can_tx_track_range_rate();
} else {
goto handle_unusual;
}
if (input->ExpectTag(73)) goto parse_can_tx_track_range_accel;
break;
}
// optional double can_tx_track_range_accel = 9;
case 9: {
if (tag == 73) {
parse_can_tx_track_range_accel:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_track_range_accel_)));
set_has_can_tx_track_range_accel();
} else {
goto handle_unusual;
}
if (input->ExpectTag(81)) goto parse_can_tx_track_range;
break;
}
// optional double can_tx_track_range = 10;
case 10: {
if (tag == 81) {
parse_can_tx_track_range:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_track_range_)));
set_has_can_tx_track_range();
} else {
goto handle_unusual;
}
if (input->ExpectTag(88)) goto parse_can_tx_track_med_range_mode;
break;
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_med_range_modeType can_tx_track_med_range_mode = 11;
case 11: {
if (tag == 88) {
parse_can_tx_track_med_range_mode:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_track01_500_Can_tx_track_med_range_modeType_IsValid(value)) {
set_can_tx_track_med_range_mode(static_cast< ::apollo::drivers::Esr_track01_500_Can_tx_track_med_range_modeType >(value));
} else {
mutable_unknown_fields()->AddVarint(11, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(97)) goto parse_can_tx_track_angle;
break;
}
// optional double can_tx_track_angle = 12;
case 12: {
if (tag == 97) {
parse_can_tx_track_angle:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_track_angle_)));
set_has_can_tx_track_angle();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_track01_500)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_track01_500)
return false;
#undef DO_
}
void Esr_track01_500::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_track01_500)
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_grouping_changedType can_tx_track_grouping_changed = 1;
if (has_can_tx_track_grouping_changed()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->can_tx_track_grouping_changed(), output);
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_oncomingType can_tx_track_oncoming = 2;
if (has_can_tx_track_oncoming()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
2, this->can_tx_track_oncoming(), output);
}
// optional double can_tx_track_lat_rate = 3;
if (has_can_tx_track_lat_rate()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->can_tx_track_lat_rate(), output);
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_bridge_objectType can_tx_track_bridge_object = 4;
if (has_can_tx_track_bridge_object()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
4, this->can_tx_track_bridge_object(), output);
}
// optional double can_tx_track_width = 5;
if (has_can_tx_track_width()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->can_tx_track_width(), output);
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_statusType can_tx_track_status = 6;
if (has_can_tx_track_status()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
6, this->can_tx_track_status(), output);
}
// optional bool can_tx_track_rolling_count = 7;
if (has_can_tx_track_rolling_count()) {
::google::protobuf::internal::WireFormatLite::WriteBool(7, this->can_tx_track_rolling_count(), output);
}
// optional double can_tx_track_range_rate = 8;
if (has_can_tx_track_range_rate()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(8, this->can_tx_track_range_rate(), output);
}
// optional double can_tx_track_range_accel = 9;
if (has_can_tx_track_range_accel()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(9, this->can_tx_track_range_accel(), output);
}
// optional double can_tx_track_range = 10;
if (has_can_tx_track_range()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(10, this->can_tx_track_range(), output);
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_med_range_modeType can_tx_track_med_range_mode = 11;
if (has_can_tx_track_med_range_mode()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
11, this->can_tx_track_med_range_mode(), output);
}
// optional double can_tx_track_angle = 12;
if (has_can_tx_track_angle()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(12, this->can_tx_track_angle(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_track01_500)
}
::google::protobuf::uint8* Esr_track01_500::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_track01_500)
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_grouping_changedType can_tx_track_grouping_changed = 1;
if (has_can_tx_track_grouping_changed()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->can_tx_track_grouping_changed(), target);
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_oncomingType can_tx_track_oncoming = 2;
if (has_can_tx_track_oncoming()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2, this->can_tx_track_oncoming(), target);
}
// optional double can_tx_track_lat_rate = 3;
if (has_can_tx_track_lat_rate()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->can_tx_track_lat_rate(), target);
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_bridge_objectType can_tx_track_bridge_object = 4;
if (has_can_tx_track_bridge_object()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4, this->can_tx_track_bridge_object(), target);
}
// optional double can_tx_track_width = 5;
if (has_can_tx_track_width()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(5, this->can_tx_track_width(), target);
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_statusType can_tx_track_status = 6;
if (has_can_tx_track_status()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
6, this->can_tx_track_status(), target);
}
// optional bool can_tx_track_rolling_count = 7;
if (has_can_tx_track_rolling_count()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->can_tx_track_rolling_count(), target);
}
// optional double can_tx_track_range_rate = 8;
if (has_can_tx_track_range_rate()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(8, this->can_tx_track_range_rate(), target);
}
// optional double can_tx_track_range_accel = 9;
if (has_can_tx_track_range_accel()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(9, this->can_tx_track_range_accel(), target);
}
// optional double can_tx_track_range = 10;
if (has_can_tx_track_range()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(10, this->can_tx_track_range(), target);
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_med_range_modeType can_tx_track_med_range_mode = 11;
if (has_can_tx_track_med_range_mode()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
11, this->can_tx_track_med_range_mode(), target);
}
// optional double can_tx_track_angle = 12;
if (has_can_tx_track_angle()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(12, this->can_tx_track_angle(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_track01_500)
return target;
}
int Esr_track01_500::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_track01_500)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_grouping_changedType can_tx_track_grouping_changed = 1;
if (has_can_tx_track_grouping_changed()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_track_grouping_changed());
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_oncomingType can_tx_track_oncoming = 2;
if (has_can_tx_track_oncoming()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_track_oncoming());
}
// optional double can_tx_track_lat_rate = 3;
if (has_can_tx_track_lat_rate()) {
total_size += 1 + 8;
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_bridge_objectType can_tx_track_bridge_object = 4;
if (has_can_tx_track_bridge_object()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_track_bridge_object());
}
// optional double can_tx_track_width = 5;
if (has_can_tx_track_width()) {
total_size += 1 + 8;
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_statusType can_tx_track_status = 6;
if (has_can_tx_track_status()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_track_status());
}
// optional bool can_tx_track_rolling_count = 7;
if (has_can_tx_track_rolling_count()) {
total_size += 1 + 1;
}
// optional double can_tx_track_range_rate = 8;
if (has_can_tx_track_range_rate()) {
total_size += 1 + 8;
}
}
if (_has_bits_[8 / 32] & 3840u) {
// optional double can_tx_track_range_accel = 9;
if (has_can_tx_track_range_accel()) {
total_size += 1 + 8;
}
// optional double can_tx_track_range = 10;
if (has_can_tx_track_range()) {
total_size += 1 + 8;
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_med_range_modeType can_tx_track_med_range_mode = 11;
if (has_can_tx_track_med_range_mode()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_track_med_range_mode());
}
// optional double can_tx_track_angle = 12;
if (has_can_tx_track_angle()) {
total_size += 1 + 8;
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_track01_500::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_track01_500)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_track01_500* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_track01_500>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_track01_500)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_track01_500)
MergeFrom(*source);
}
}
void Esr_track01_500::MergeFrom(const Esr_track01_500& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_track01_500)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_track_grouping_changed()) {
set_can_tx_track_grouping_changed(from.can_tx_track_grouping_changed());
}
if (from.has_can_tx_track_oncoming()) {
set_can_tx_track_oncoming(from.can_tx_track_oncoming());
}
if (from.has_can_tx_track_lat_rate()) {
set_can_tx_track_lat_rate(from.can_tx_track_lat_rate());
}
if (from.has_can_tx_track_bridge_object()) {
set_can_tx_track_bridge_object(from.can_tx_track_bridge_object());
}
if (from.has_can_tx_track_width()) {
set_can_tx_track_width(from.can_tx_track_width());
}
if (from.has_can_tx_track_status()) {
set_can_tx_track_status(from.can_tx_track_status());
}
if (from.has_can_tx_track_rolling_count()) {
set_can_tx_track_rolling_count(from.can_tx_track_rolling_count());
}
if (from.has_can_tx_track_range_rate()) {
set_can_tx_track_range_rate(from.can_tx_track_range_rate());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_can_tx_track_range_accel()) {
set_can_tx_track_range_accel(from.can_tx_track_range_accel());
}
if (from.has_can_tx_track_range()) {
set_can_tx_track_range(from.can_tx_track_range());
}
if (from.has_can_tx_track_med_range_mode()) {
set_can_tx_track_med_range_mode(from.can_tx_track_med_range_mode());
}
if (from.has_can_tx_track_angle()) {
set_can_tx_track_angle(from.can_tx_track_angle());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_track01_500::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_track01_500)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_track01_500::CopyFrom(const Esr_track01_500& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_track01_500)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_track01_500::IsInitialized() const {
return true;
}
void Esr_track01_500::Swap(Esr_track01_500* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_track01_500::InternalSwap(Esr_track01_500* other) {
std::swap(can_tx_track_grouping_changed_, other->can_tx_track_grouping_changed_);
std::swap(can_tx_track_oncoming_, other->can_tx_track_oncoming_);
std::swap(can_tx_track_lat_rate_, other->can_tx_track_lat_rate_);
std::swap(can_tx_track_bridge_object_, other->can_tx_track_bridge_object_);
std::swap(can_tx_track_width_, other->can_tx_track_width_);
std::swap(can_tx_track_status_, other->can_tx_track_status_);
std::swap(can_tx_track_rolling_count_, other->can_tx_track_rolling_count_);
std::swap(can_tx_track_range_rate_, other->can_tx_track_range_rate_);
std::swap(can_tx_track_range_accel_, other->can_tx_track_range_accel_);
std::swap(can_tx_track_range_, other->can_tx_track_range_);
std::swap(can_tx_track_med_range_mode_, other->can_tx_track_med_range_mode_);
std::swap(can_tx_track_angle_, other->can_tx_track_angle_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_track01_500::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_track01_500_descriptor_;
metadata.reflection = Esr_track01_500_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_track01_500
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_grouping_changedType can_tx_track_grouping_changed = 1;
bool Esr_track01_500::has_can_tx_track_grouping_changed() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_grouping_changed() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_track01_500::clear_has_can_tx_track_grouping_changed() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_track01_500::clear_can_tx_track_grouping_changed() {
can_tx_track_grouping_changed_ = 0;
clear_has_can_tx_track_grouping_changed();
}
::apollo::drivers::Esr_track01_500_Can_tx_track_grouping_changedType Esr_track01_500::can_tx_track_grouping_changed() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_grouping_changed)
return static_cast< ::apollo::drivers::Esr_track01_500_Can_tx_track_grouping_changedType >(can_tx_track_grouping_changed_);
}
void Esr_track01_500::set_can_tx_track_grouping_changed(::apollo::drivers::Esr_track01_500_Can_tx_track_grouping_changedType value) {
assert(::apollo::drivers::Esr_track01_500_Can_tx_track_grouping_changedType_IsValid(value));
set_has_can_tx_track_grouping_changed();
can_tx_track_grouping_changed_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_grouping_changed)
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_oncomingType can_tx_track_oncoming = 2;
bool Esr_track01_500::has_can_tx_track_oncoming() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_oncoming() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_track01_500::clear_has_can_tx_track_oncoming() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_track01_500::clear_can_tx_track_oncoming() {
can_tx_track_oncoming_ = 0;
clear_has_can_tx_track_oncoming();
}
::apollo::drivers::Esr_track01_500_Can_tx_track_oncomingType Esr_track01_500::can_tx_track_oncoming() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_oncoming)
return static_cast< ::apollo::drivers::Esr_track01_500_Can_tx_track_oncomingType >(can_tx_track_oncoming_);
}
void Esr_track01_500::set_can_tx_track_oncoming(::apollo::drivers::Esr_track01_500_Can_tx_track_oncomingType value) {
assert(::apollo::drivers::Esr_track01_500_Can_tx_track_oncomingType_IsValid(value));
set_has_can_tx_track_oncoming();
can_tx_track_oncoming_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_oncoming)
}
// optional double can_tx_track_lat_rate = 3;
bool Esr_track01_500::has_can_tx_track_lat_rate() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_lat_rate() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_track01_500::clear_has_can_tx_track_lat_rate() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_track01_500::clear_can_tx_track_lat_rate() {
can_tx_track_lat_rate_ = 0;
clear_has_can_tx_track_lat_rate();
}
double Esr_track01_500::can_tx_track_lat_rate() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_lat_rate)
return can_tx_track_lat_rate_;
}
void Esr_track01_500::set_can_tx_track_lat_rate(double value) {
set_has_can_tx_track_lat_rate();
can_tx_track_lat_rate_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_lat_rate)
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_bridge_objectType can_tx_track_bridge_object = 4;
bool Esr_track01_500::has_can_tx_track_bridge_object() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_bridge_object() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_track01_500::clear_has_can_tx_track_bridge_object() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_track01_500::clear_can_tx_track_bridge_object() {
can_tx_track_bridge_object_ = 0;
clear_has_can_tx_track_bridge_object();
}
::apollo::drivers::Esr_track01_500_Can_tx_track_bridge_objectType Esr_track01_500::can_tx_track_bridge_object() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_bridge_object)
return static_cast< ::apollo::drivers::Esr_track01_500_Can_tx_track_bridge_objectType >(can_tx_track_bridge_object_);
}
void Esr_track01_500::set_can_tx_track_bridge_object(::apollo::drivers::Esr_track01_500_Can_tx_track_bridge_objectType value) {
assert(::apollo::drivers::Esr_track01_500_Can_tx_track_bridge_objectType_IsValid(value));
set_has_can_tx_track_bridge_object();
can_tx_track_bridge_object_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_bridge_object)
}
// optional double can_tx_track_width = 5;
bool Esr_track01_500::has_can_tx_track_width() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_width() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_track01_500::clear_has_can_tx_track_width() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_track01_500::clear_can_tx_track_width() {
can_tx_track_width_ = 0;
clear_has_can_tx_track_width();
}
double Esr_track01_500::can_tx_track_width() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_width)
return can_tx_track_width_;
}
void Esr_track01_500::set_can_tx_track_width(double value) {
set_has_can_tx_track_width();
can_tx_track_width_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_width)
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_statusType can_tx_track_status = 6;
bool Esr_track01_500::has_can_tx_track_status() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_status() {
_has_bits_[0] |= 0x00000020u;
}
void Esr_track01_500::clear_has_can_tx_track_status() {
_has_bits_[0] &= ~0x00000020u;
}
void Esr_track01_500::clear_can_tx_track_status() {
can_tx_track_status_ = 0;
clear_has_can_tx_track_status();
}
::apollo::drivers::Esr_track01_500_Can_tx_track_statusType Esr_track01_500::can_tx_track_status() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_status)
return static_cast< ::apollo::drivers::Esr_track01_500_Can_tx_track_statusType >(can_tx_track_status_);
}
void Esr_track01_500::set_can_tx_track_status(::apollo::drivers::Esr_track01_500_Can_tx_track_statusType value) {
assert(::apollo::drivers::Esr_track01_500_Can_tx_track_statusType_IsValid(value));
set_has_can_tx_track_status();
can_tx_track_status_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_status)
}
// optional bool can_tx_track_rolling_count = 7;
bool Esr_track01_500::has_can_tx_track_rolling_count() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_rolling_count() {
_has_bits_[0] |= 0x00000040u;
}
void Esr_track01_500::clear_has_can_tx_track_rolling_count() {
_has_bits_[0] &= ~0x00000040u;
}
void Esr_track01_500::clear_can_tx_track_rolling_count() {
can_tx_track_rolling_count_ = false;
clear_has_can_tx_track_rolling_count();
}
bool Esr_track01_500::can_tx_track_rolling_count() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_rolling_count)
return can_tx_track_rolling_count_;
}
void Esr_track01_500::set_can_tx_track_rolling_count(bool value) {
set_has_can_tx_track_rolling_count();
can_tx_track_rolling_count_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_rolling_count)
}
// optional double can_tx_track_range_rate = 8;
bool Esr_track01_500::has_can_tx_track_range_rate() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_range_rate() {
_has_bits_[0] |= 0x00000080u;
}
void Esr_track01_500::clear_has_can_tx_track_range_rate() {
_has_bits_[0] &= ~0x00000080u;
}
void Esr_track01_500::clear_can_tx_track_range_rate() {
can_tx_track_range_rate_ = 0;
clear_has_can_tx_track_range_rate();
}
double Esr_track01_500::can_tx_track_range_rate() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_range_rate)
return can_tx_track_range_rate_;
}
void Esr_track01_500::set_can_tx_track_range_rate(double value) {
set_has_can_tx_track_range_rate();
can_tx_track_range_rate_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_range_rate)
}
// optional double can_tx_track_range_accel = 9;
bool Esr_track01_500::has_can_tx_track_range_accel() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_range_accel() {
_has_bits_[0] |= 0x00000100u;
}
void Esr_track01_500::clear_has_can_tx_track_range_accel() {
_has_bits_[0] &= ~0x00000100u;
}
void Esr_track01_500::clear_can_tx_track_range_accel() {
can_tx_track_range_accel_ = 0;
clear_has_can_tx_track_range_accel();
}
double Esr_track01_500::can_tx_track_range_accel() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_range_accel)
return can_tx_track_range_accel_;
}
void Esr_track01_500::set_can_tx_track_range_accel(double value) {
set_has_can_tx_track_range_accel();
can_tx_track_range_accel_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_range_accel)
}
// optional double can_tx_track_range = 10;
bool Esr_track01_500::has_can_tx_track_range() const {
return (_has_bits_[0] & 0x00000200u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_range() {
_has_bits_[0] |= 0x00000200u;
}
void Esr_track01_500::clear_has_can_tx_track_range() {
_has_bits_[0] &= ~0x00000200u;
}
void Esr_track01_500::clear_can_tx_track_range() {
can_tx_track_range_ = 0;
clear_has_can_tx_track_range();
}
double Esr_track01_500::can_tx_track_range() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_range)
return can_tx_track_range_;
}
void Esr_track01_500::set_can_tx_track_range(double value) {
set_has_can_tx_track_range();
can_tx_track_range_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_range)
}
// optional .apollo.drivers.Esr_track01_500.Can_tx_track_med_range_modeType can_tx_track_med_range_mode = 11;
bool Esr_track01_500::has_can_tx_track_med_range_mode() const {
return (_has_bits_[0] & 0x00000400u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_med_range_mode() {
_has_bits_[0] |= 0x00000400u;
}
void Esr_track01_500::clear_has_can_tx_track_med_range_mode() {
_has_bits_[0] &= ~0x00000400u;
}
void Esr_track01_500::clear_can_tx_track_med_range_mode() {
can_tx_track_med_range_mode_ = 0;
clear_has_can_tx_track_med_range_mode();
}
::apollo::drivers::Esr_track01_500_Can_tx_track_med_range_modeType Esr_track01_500::can_tx_track_med_range_mode() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_med_range_mode)
return static_cast< ::apollo::drivers::Esr_track01_500_Can_tx_track_med_range_modeType >(can_tx_track_med_range_mode_);
}
void Esr_track01_500::set_can_tx_track_med_range_mode(::apollo::drivers::Esr_track01_500_Can_tx_track_med_range_modeType value) {
assert(::apollo::drivers::Esr_track01_500_Can_tx_track_med_range_modeType_IsValid(value));
set_has_can_tx_track_med_range_mode();
can_tx_track_med_range_mode_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_med_range_mode)
}
// optional double can_tx_track_angle = 12;
bool Esr_track01_500::has_can_tx_track_angle() const {
return (_has_bits_[0] & 0x00000800u) != 0;
}
void Esr_track01_500::set_has_can_tx_track_angle() {
_has_bits_[0] |= 0x00000800u;
}
void Esr_track01_500::clear_has_can_tx_track_angle() {
_has_bits_[0] &= ~0x00000800u;
}
void Esr_track01_500::clear_can_tx_track_angle() {
can_tx_track_angle_ = 0;
clear_has_can_tx_track_angle();
}
double Esr_track01_500::can_tx_track_angle() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_track01_500.can_tx_track_angle)
return can_tx_track_angle_;
}
void Esr_track01_500::set_can_tx_track_angle(double value) {
set_has_can_tx_track_angle();
can_tx_track_angle_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_track01_500.can_tx_track_angle)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_valid1_5d0::kCanTxValidLrSnFieldNumber;
const int Esr_valid1_5d0::kCanTxValidLrRangeRateFieldNumber;
const int Esr_valid1_5d0::kCanTxValidLrRangeFieldNumber;
const int Esr_valid1_5d0::kCanTxValidLrPowerFieldNumber;
const int Esr_valid1_5d0::kCanTxValidLrAngleFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_valid1_5d0::Esr_valid1_5d0()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_valid1_5d0)
}
void Esr_valid1_5d0::InitAsDefaultInstance() {
}
Esr_valid1_5d0::Esr_valid1_5d0(const Esr_valid1_5d0& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_valid1_5d0)
}
void Esr_valid1_5d0::SharedCtor() {
_cached_size_ = 0;
can_tx_valid_lr_sn_ = 0;
can_tx_valid_lr_range_rate_ = 0;
can_tx_valid_lr_range_ = 0;
can_tx_valid_lr_power_ = 0;
can_tx_valid_lr_angle_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_valid1_5d0::~Esr_valid1_5d0() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_valid1_5d0)
SharedDtor();
}
void Esr_valid1_5d0::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_valid1_5d0::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_valid1_5d0::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_valid1_5d0_descriptor_;
}
const Esr_valid1_5d0& Esr_valid1_5d0::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_valid1_5d0* Esr_valid1_5d0::default_instance_ = NULL;
Esr_valid1_5d0* Esr_valid1_5d0::New(::google::protobuf::Arena* arena) const {
Esr_valid1_5d0* n = new Esr_valid1_5d0;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_valid1_5d0::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_valid1_5d0)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_valid1_5d0, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_valid1_5d0*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 31u) {
ZR_(can_tx_valid_lr_range_rate_, can_tx_valid_lr_angle_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_valid1_5d0::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_valid1_5d0)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 can_tx_valid_lr_sn = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_valid_lr_sn_)));
set_has_can_tx_valid_lr_sn();
} else {
goto handle_unusual;
}
if (input->ExpectTag(17)) goto parse_can_tx_valid_lr_range_rate;
break;
}
// optional double can_tx_valid_lr_range_rate = 2;
case 2: {
if (tag == 17) {
parse_can_tx_valid_lr_range_rate:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_valid_lr_range_rate_)));
set_has_can_tx_valid_lr_range_rate();
} else {
goto handle_unusual;
}
if (input->ExpectTag(25)) goto parse_can_tx_valid_lr_range;
break;
}
// optional double can_tx_valid_lr_range = 3;
case 3: {
if (tag == 25) {
parse_can_tx_valid_lr_range:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_valid_lr_range_)));
set_has_can_tx_valid_lr_range();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_valid_lr_power;
break;
}
// optional int32 can_tx_valid_lr_power = 4;
case 4: {
if (tag == 32) {
parse_can_tx_valid_lr_power:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_valid_lr_power_)));
set_has_can_tx_valid_lr_power();
} else {
goto handle_unusual;
}
if (input->ExpectTag(41)) goto parse_can_tx_valid_lr_angle;
break;
}
// optional double can_tx_valid_lr_angle = 5;
case 5: {
if (tag == 41) {
parse_can_tx_valid_lr_angle:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_valid_lr_angle_)));
set_has_can_tx_valid_lr_angle();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_valid1_5d0)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_valid1_5d0)
return false;
#undef DO_
}
void Esr_valid1_5d0::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_valid1_5d0)
// optional int32 can_tx_valid_lr_sn = 1;
if (has_can_tx_valid_lr_sn()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->can_tx_valid_lr_sn(), output);
}
// optional double can_tx_valid_lr_range_rate = 2;
if (has_can_tx_valid_lr_range_rate()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->can_tx_valid_lr_range_rate(), output);
}
// optional double can_tx_valid_lr_range = 3;
if (has_can_tx_valid_lr_range()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->can_tx_valid_lr_range(), output);
}
// optional int32 can_tx_valid_lr_power = 4;
if (has_can_tx_valid_lr_power()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_tx_valid_lr_power(), output);
}
// optional double can_tx_valid_lr_angle = 5;
if (has_can_tx_valid_lr_angle()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->can_tx_valid_lr_angle(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_valid1_5d0)
}
::google::protobuf::uint8* Esr_valid1_5d0::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_valid1_5d0)
// optional int32 can_tx_valid_lr_sn = 1;
if (has_can_tx_valid_lr_sn()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->can_tx_valid_lr_sn(), target);
}
// optional double can_tx_valid_lr_range_rate = 2;
if (has_can_tx_valid_lr_range_rate()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->can_tx_valid_lr_range_rate(), target);
}
// optional double can_tx_valid_lr_range = 3;
if (has_can_tx_valid_lr_range()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->can_tx_valid_lr_range(), target);
}
// optional int32 can_tx_valid_lr_power = 4;
if (has_can_tx_valid_lr_power()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_tx_valid_lr_power(), target);
}
// optional double can_tx_valid_lr_angle = 5;
if (has_can_tx_valid_lr_angle()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(5, this->can_tx_valid_lr_angle(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_valid1_5d0)
return target;
}
int Esr_valid1_5d0::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_valid1_5d0)
int total_size = 0;
if (_has_bits_[0 / 32] & 31u) {
// optional int32 can_tx_valid_lr_sn = 1;
if (has_can_tx_valid_lr_sn()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_valid_lr_sn());
}
// optional double can_tx_valid_lr_range_rate = 2;
if (has_can_tx_valid_lr_range_rate()) {
total_size += 1 + 8;
}
// optional double can_tx_valid_lr_range = 3;
if (has_can_tx_valid_lr_range()) {
total_size += 1 + 8;
}
// optional int32 can_tx_valid_lr_power = 4;
if (has_can_tx_valid_lr_power()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_valid_lr_power());
}
// optional double can_tx_valid_lr_angle = 5;
if (has_can_tx_valid_lr_angle()) {
total_size += 1 + 8;
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_valid1_5d0::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_valid1_5d0)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_valid1_5d0* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_valid1_5d0>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_valid1_5d0)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_valid1_5d0)
MergeFrom(*source);
}
}
void Esr_valid1_5d0::MergeFrom(const Esr_valid1_5d0& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_valid1_5d0)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_valid_lr_sn()) {
set_can_tx_valid_lr_sn(from.can_tx_valid_lr_sn());
}
if (from.has_can_tx_valid_lr_range_rate()) {
set_can_tx_valid_lr_range_rate(from.can_tx_valid_lr_range_rate());
}
if (from.has_can_tx_valid_lr_range()) {
set_can_tx_valid_lr_range(from.can_tx_valid_lr_range());
}
if (from.has_can_tx_valid_lr_power()) {
set_can_tx_valid_lr_power(from.can_tx_valid_lr_power());
}
if (from.has_can_tx_valid_lr_angle()) {
set_can_tx_valid_lr_angle(from.can_tx_valid_lr_angle());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_valid1_5d0::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_valid1_5d0)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_valid1_5d0::CopyFrom(const Esr_valid1_5d0& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_valid1_5d0)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_valid1_5d0::IsInitialized() const {
return true;
}
void Esr_valid1_5d0::Swap(Esr_valid1_5d0* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_valid1_5d0::InternalSwap(Esr_valid1_5d0* other) {
std::swap(can_tx_valid_lr_sn_, other->can_tx_valid_lr_sn_);
std::swap(can_tx_valid_lr_range_rate_, other->can_tx_valid_lr_range_rate_);
std::swap(can_tx_valid_lr_range_, other->can_tx_valid_lr_range_);
std::swap(can_tx_valid_lr_power_, other->can_tx_valid_lr_power_);
std::swap(can_tx_valid_lr_angle_, other->can_tx_valid_lr_angle_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_valid1_5d0::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_valid1_5d0_descriptor_;
metadata.reflection = Esr_valid1_5d0_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_valid1_5d0
// optional int32 can_tx_valid_lr_sn = 1;
bool Esr_valid1_5d0::has_can_tx_valid_lr_sn() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_valid1_5d0::set_has_can_tx_valid_lr_sn() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_valid1_5d0::clear_has_can_tx_valid_lr_sn() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_valid1_5d0::clear_can_tx_valid_lr_sn() {
can_tx_valid_lr_sn_ = 0;
clear_has_can_tx_valid_lr_sn();
}
::google::protobuf::int32 Esr_valid1_5d0::can_tx_valid_lr_sn() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_valid1_5d0.can_tx_valid_lr_sn)
return can_tx_valid_lr_sn_;
}
void Esr_valid1_5d0::set_can_tx_valid_lr_sn(::google::protobuf::int32 value) {
set_has_can_tx_valid_lr_sn();
can_tx_valid_lr_sn_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_valid1_5d0.can_tx_valid_lr_sn)
}
// optional double can_tx_valid_lr_range_rate = 2;
bool Esr_valid1_5d0::has_can_tx_valid_lr_range_rate() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_valid1_5d0::set_has_can_tx_valid_lr_range_rate() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_valid1_5d0::clear_has_can_tx_valid_lr_range_rate() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_valid1_5d0::clear_can_tx_valid_lr_range_rate() {
can_tx_valid_lr_range_rate_ = 0;
clear_has_can_tx_valid_lr_range_rate();
}
double Esr_valid1_5d0::can_tx_valid_lr_range_rate() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_valid1_5d0.can_tx_valid_lr_range_rate)
return can_tx_valid_lr_range_rate_;
}
void Esr_valid1_5d0::set_can_tx_valid_lr_range_rate(double value) {
set_has_can_tx_valid_lr_range_rate();
can_tx_valid_lr_range_rate_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_valid1_5d0.can_tx_valid_lr_range_rate)
}
// optional double can_tx_valid_lr_range = 3;
bool Esr_valid1_5d0::has_can_tx_valid_lr_range() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_valid1_5d0::set_has_can_tx_valid_lr_range() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_valid1_5d0::clear_has_can_tx_valid_lr_range() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_valid1_5d0::clear_can_tx_valid_lr_range() {
can_tx_valid_lr_range_ = 0;
clear_has_can_tx_valid_lr_range();
}
double Esr_valid1_5d0::can_tx_valid_lr_range() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_valid1_5d0.can_tx_valid_lr_range)
return can_tx_valid_lr_range_;
}
void Esr_valid1_5d0::set_can_tx_valid_lr_range(double value) {
set_has_can_tx_valid_lr_range();
can_tx_valid_lr_range_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_valid1_5d0.can_tx_valid_lr_range)
}
// optional int32 can_tx_valid_lr_power = 4;
bool Esr_valid1_5d0::has_can_tx_valid_lr_power() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_valid1_5d0::set_has_can_tx_valid_lr_power() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_valid1_5d0::clear_has_can_tx_valid_lr_power() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_valid1_5d0::clear_can_tx_valid_lr_power() {
can_tx_valid_lr_power_ = 0;
clear_has_can_tx_valid_lr_power();
}
::google::protobuf::int32 Esr_valid1_5d0::can_tx_valid_lr_power() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_valid1_5d0.can_tx_valid_lr_power)
return can_tx_valid_lr_power_;
}
void Esr_valid1_5d0::set_can_tx_valid_lr_power(::google::protobuf::int32 value) {
set_has_can_tx_valid_lr_power();
can_tx_valid_lr_power_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_valid1_5d0.can_tx_valid_lr_power)
}
// optional double can_tx_valid_lr_angle = 5;
bool Esr_valid1_5d0::has_can_tx_valid_lr_angle() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_valid1_5d0::set_has_can_tx_valid_lr_angle() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_valid1_5d0::clear_has_can_tx_valid_lr_angle() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_valid1_5d0::clear_can_tx_valid_lr_angle() {
can_tx_valid_lr_angle_ = 0;
clear_has_can_tx_valid_lr_angle();
}
double Esr_valid1_5d0::can_tx_valid_lr_angle() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_valid1_5d0.can_tx_valid_lr_angle)
return can_tx_valid_lr_angle_;
}
void Esr_valid1_5d0::set_can_tx_valid_lr_angle(double value) {
set_has_can_tx_valid_lr_angle();
can_tx_valid_lr_angle_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_valid1_5d0.can_tx_valid_lr_angle)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_valid2_5d1::kCanTxValidMrSnFieldNumber;
const int Esr_valid2_5d1::kCanTxValidMrRangeRateFieldNumber;
const int Esr_valid2_5d1::kCanTxValidMrRangeFieldNumber;
const int Esr_valid2_5d1::kCanTxValidMrPowerFieldNumber;
const int Esr_valid2_5d1::kCanTxValidMrAngleFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_valid2_5d1::Esr_valid2_5d1()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_valid2_5d1)
}
void Esr_valid2_5d1::InitAsDefaultInstance() {
}
Esr_valid2_5d1::Esr_valid2_5d1(const Esr_valid2_5d1& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_valid2_5d1)
}
void Esr_valid2_5d1::SharedCtor() {
_cached_size_ = 0;
can_tx_valid_mr_sn_ = 0;
can_tx_valid_mr_range_rate_ = 0;
can_tx_valid_mr_range_ = 0;
can_tx_valid_mr_power_ = 0;
can_tx_valid_mr_angle_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_valid2_5d1::~Esr_valid2_5d1() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_valid2_5d1)
SharedDtor();
}
void Esr_valid2_5d1::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_valid2_5d1::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_valid2_5d1::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_valid2_5d1_descriptor_;
}
const Esr_valid2_5d1& Esr_valid2_5d1::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_valid2_5d1* Esr_valid2_5d1::default_instance_ = NULL;
Esr_valid2_5d1* Esr_valid2_5d1::New(::google::protobuf::Arena* arena) const {
Esr_valid2_5d1* n = new Esr_valid2_5d1;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_valid2_5d1::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_valid2_5d1)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_valid2_5d1, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_valid2_5d1*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 31u) {
ZR_(can_tx_valid_mr_range_rate_, can_tx_valid_mr_angle_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_valid2_5d1::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_valid2_5d1)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 can_tx_valid_mr_sn = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_valid_mr_sn_)));
set_has_can_tx_valid_mr_sn();
} else {
goto handle_unusual;
}
if (input->ExpectTag(17)) goto parse_can_tx_valid_mr_range_rate;
break;
}
// optional double can_tx_valid_mr_range_rate = 2;
case 2: {
if (tag == 17) {
parse_can_tx_valid_mr_range_rate:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_valid_mr_range_rate_)));
set_has_can_tx_valid_mr_range_rate();
} else {
goto handle_unusual;
}
if (input->ExpectTag(25)) goto parse_can_tx_valid_mr_range;
break;
}
// optional double can_tx_valid_mr_range = 3;
case 3: {
if (tag == 25) {
parse_can_tx_valid_mr_range:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_valid_mr_range_)));
set_has_can_tx_valid_mr_range();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_valid_mr_power;
break;
}
// optional int32 can_tx_valid_mr_power = 4;
case 4: {
if (tag == 32) {
parse_can_tx_valid_mr_power:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_valid_mr_power_)));
set_has_can_tx_valid_mr_power();
} else {
goto handle_unusual;
}
if (input->ExpectTag(41)) goto parse_can_tx_valid_mr_angle;
break;
}
// optional double can_tx_valid_mr_angle = 5;
case 5: {
if (tag == 41) {
parse_can_tx_valid_mr_angle:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_valid_mr_angle_)));
set_has_can_tx_valid_mr_angle();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_valid2_5d1)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_valid2_5d1)
return false;
#undef DO_
}
void Esr_valid2_5d1::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_valid2_5d1)
// optional int32 can_tx_valid_mr_sn = 1;
if (has_can_tx_valid_mr_sn()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->can_tx_valid_mr_sn(), output);
}
// optional double can_tx_valid_mr_range_rate = 2;
if (has_can_tx_valid_mr_range_rate()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->can_tx_valid_mr_range_rate(), output);
}
// optional double can_tx_valid_mr_range = 3;
if (has_can_tx_valid_mr_range()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->can_tx_valid_mr_range(), output);
}
// optional int32 can_tx_valid_mr_power = 4;
if (has_can_tx_valid_mr_power()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_tx_valid_mr_power(), output);
}
// optional double can_tx_valid_mr_angle = 5;
if (has_can_tx_valid_mr_angle()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->can_tx_valid_mr_angle(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_valid2_5d1)
}
::google::protobuf::uint8* Esr_valid2_5d1::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_valid2_5d1)
// optional int32 can_tx_valid_mr_sn = 1;
if (has_can_tx_valid_mr_sn()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->can_tx_valid_mr_sn(), target);
}
// optional double can_tx_valid_mr_range_rate = 2;
if (has_can_tx_valid_mr_range_rate()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->can_tx_valid_mr_range_rate(), target);
}
// optional double can_tx_valid_mr_range = 3;
if (has_can_tx_valid_mr_range()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->can_tx_valid_mr_range(), target);
}
// optional int32 can_tx_valid_mr_power = 4;
if (has_can_tx_valid_mr_power()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_tx_valid_mr_power(), target);
}
// optional double can_tx_valid_mr_angle = 5;
if (has_can_tx_valid_mr_angle()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(5, this->can_tx_valid_mr_angle(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_valid2_5d1)
return target;
}
int Esr_valid2_5d1::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_valid2_5d1)
int total_size = 0;
if (_has_bits_[0 / 32] & 31u) {
// optional int32 can_tx_valid_mr_sn = 1;
if (has_can_tx_valid_mr_sn()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_valid_mr_sn());
}
// optional double can_tx_valid_mr_range_rate = 2;
if (has_can_tx_valid_mr_range_rate()) {
total_size += 1 + 8;
}
// optional double can_tx_valid_mr_range = 3;
if (has_can_tx_valid_mr_range()) {
total_size += 1 + 8;
}
// optional int32 can_tx_valid_mr_power = 4;
if (has_can_tx_valid_mr_power()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_valid_mr_power());
}
// optional double can_tx_valid_mr_angle = 5;
if (has_can_tx_valid_mr_angle()) {
total_size += 1 + 8;
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_valid2_5d1::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_valid2_5d1)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_valid2_5d1* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_valid2_5d1>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_valid2_5d1)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_valid2_5d1)
MergeFrom(*source);
}
}
void Esr_valid2_5d1::MergeFrom(const Esr_valid2_5d1& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_valid2_5d1)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_valid_mr_sn()) {
set_can_tx_valid_mr_sn(from.can_tx_valid_mr_sn());
}
if (from.has_can_tx_valid_mr_range_rate()) {
set_can_tx_valid_mr_range_rate(from.can_tx_valid_mr_range_rate());
}
if (from.has_can_tx_valid_mr_range()) {
set_can_tx_valid_mr_range(from.can_tx_valid_mr_range());
}
if (from.has_can_tx_valid_mr_power()) {
set_can_tx_valid_mr_power(from.can_tx_valid_mr_power());
}
if (from.has_can_tx_valid_mr_angle()) {
set_can_tx_valid_mr_angle(from.can_tx_valid_mr_angle());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_valid2_5d1::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_valid2_5d1)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_valid2_5d1::CopyFrom(const Esr_valid2_5d1& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_valid2_5d1)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_valid2_5d1::IsInitialized() const {
return true;
}
void Esr_valid2_5d1::Swap(Esr_valid2_5d1* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_valid2_5d1::InternalSwap(Esr_valid2_5d1* other) {
std::swap(can_tx_valid_mr_sn_, other->can_tx_valid_mr_sn_);
std::swap(can_tx_valid_mr_range_rate_, other->can_tx_valid_mr_range_rate_);
std::swap(can_tx_valid_mr_range_, other->can_tx_valid_mr_range_);
std::swap(can_tx_valid_mr_power_, other->can_tx_valid_mr_power_);
std::swap(can_tx_valid_mr_angle_, other->can_tx_valid_mr_angle_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_valid2_5d1::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_valid2_5d1_descriptor_;
metadata.reflection = Esr_valid2_5d1_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_valid2_5d1
// optional int32 can_tx_valid_mr_sn = 1;
bool Esr_valid2_5d1::has_can_tx_valid_mr_sn() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_valid2_5d1::set_has_can_tx_valid_mr_sn() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_valid2_5d1::clear_has_can_tx_valid_mr_sn() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_valid2_5d1::clear_can_tx_valid_mr_sn() {
can_tx_valid_mr_sn_ = 0;
clear_has_can_tx_valid_mr_sn();
}
::google::protobuf::int32 Esr_valid2_5d1::can_tx_valid_mr_sn() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_valid2_5d1.can_tx_valid_mr_sn)
return can_tx_valid_mr_sn_;
}
void Esr_valid2_5d1::set_can_tx_valid_mr_sn(::google::protobuf::int32 value) {
set_has_can_tx_valid_mr_sn();
can_tx_valid_mr_sn_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_valid2_5d1.can_tx_valid_mr_sn)
}
// optional double can_tx_valid_mr_range_rate = 2;
bool Esr_valid2_5d1::has_can_tx_valid_mr_range_rate() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_valid2_5d1::set_has_can_tx_valid_mr_range_rate() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_valid2_5d1::clear_has_can_tx_valid_mr_range_rate() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_valid2_5d1::clear_can_tx_valid_mr_range_rate() {
can_tx_valid_mr_range_rate_ = 0;
clear_has_can_tx_valid_mr_range_rate();
}
double Esr_valid2_5d1::can_tx_valid_mr_range_rate() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_valid2_5d1.can_tx_valid_mr_range_rate)
return can_tx_valid_mr_range_rate_;
}
void Esr_valid2_5d1::set_can_tx_valid_mr_range_rate(double value) {
set_has_can_tx_valid_mr_range_rate();
can_tx_valid_mr_range_rate_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_valid2_5d1.can_tx_valid_mr_range_rate)
}
// optional double can_tx_valid_mr_range = 3;
bool Esr_valid2_5d1::has_can_tx_valid_mr_range() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_valid2_5d1::set_has_can_tx_valid_mr_range() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_valid2_5d1::clear_has_can_tx_valid_mr_range() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_valid2_5d1::clear_can_tx_valid_mr_range() {
can_tx_valid_mr_range_ = 0;
clear_has_can_tx_valid_mr_range();
}
double Esr_valid2_5d1::can_tx_valid_mr_range() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_valid2_5d1.can_tx_valid_mr_range)
return can_tx_valid_mr_range_;
}
void Esr_valid2_5d1::set_can_tx_valid_mr_range(double value) {
set_has_can_tx_valid_mr_range();
can_tx_valid_mr_range_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_valid2_5d1.can_tx_valid_mr_range)
}
// optional int32 can_tx_valid_mr_power = 4;
bool Esr_valid2_5d1::has_can_tx_valid_mr_power() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_valid2_5d1::set_has_can_tx_valid_mr_power() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_valid2_5d1::clear_has_can_tx_valid_mr_power() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_valid2_5d1::clear_can_tx_valid_mr_power() {
can_tx_valid_mr_power_ = 0;
clear_has_can_tx_valid_mr_power();
}
::google::protobuf::int32 Esr_valid2_5d1::can_tx_valid_mr_power() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_valid2_5d1.can_tx_valid_mr_power)
return can_tx_valid_mr_power_;
}
void Esr_valid2_5d1::set_can_tx_valid_mr_power(::google::protobuf::int32 value) {
set_has_can_tx_valid_mr_power();
can_tx_valid_mr_power_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_valid2_5d1.can_tx_valid_mr_power)
}
// optional double can_tx_valid_mr_angle = 5;
bool Esr_valid2_5d1::has_can_tx_valid_mr_angle() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_valid2_5d1::set_has_can_tx_valid_mr_angle() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_valid2_5d1::clear_has_can_tx_valid_mr_angle() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_valid2_5d1::clear_can_tx_valid_mr_angle() {
can_tx_valid_mr_angle_ = 0;
clear_has_can_tx_valid_mr_angle();
}
double Esr_valid2_5d1::can_tx_valid_mr_angle() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_valid2_5d1.can_tx_valid_mr_angle)
return can_tx_valid_mr_angle_;
}
void Esr_valid2_5d1::set_can_tx_valid_mr_angle(double value) {
set_has_can_tx_valid_mr_angle();
can_tx_valid_mr_angle_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_valid2_5d1.can_tx_valid_mr_angle)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Acm_inst_resp_7e4::kData7FieldNumber;
const int Acm_inst_resp_7e4::kData6FieldNumber;
const int Acm_inst_resp_7e4::kData5FieldNumber;
const int Acm_inst_resp_7e4::kData4FieldNumber;
const int Acm_inst_resp_7e4::kData3FieldNumber;
const int Acm_inst_resp_7e4::kRtnCmdCounterFieldNumber;
const int Acm_inst_resp_7e4::kCommandReturnCodeFieldNumber;
const int Acm_inst_resp_7e4::kPidFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Acm_inst_resp_7e4::Acm_inst_resp_7e4()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Acm_inst_resp_7e4)
}
void Acm_inst_resp_7e4::InitAsDefaultInstance() {
}
Acm_inst_resp_7e4::Acm_inst_resp_7e4(const Acm_inst_resp_7e4& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Acm_inst_resp_7e4)
}
void Acm_inst_resp_7e4::SharedCtor() {
_cached_size_ = 0;
data_7_ = 0;
data_6_ = 0;
data_5_ = 0;
data_4_ = 0;
data_3_ = 0;
rtn_cmd_counter_ = 0;
command_return_code_ = 0;
pid_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Acm_inst_resp_7e4::~Acm_inst_resp_7e4() {
// @@protoc_insertion_point(destructor:apollo.drivers.Acm_inst_resp_7e4)
SharedDtor();
}
void Acm_inst_resp_7e4::SharedDtor() {
if (this != default_instance_) {
}
}
void Acm_inst_resp_7e4::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Acm_inst_resp_7e4::descriptor() {
protobuf_AssignDescriptorsOnce();
return Acm_inst_resp_7e4_descriptor_;
}
const Acm_inst_resp_7e4& Acm_inst_resp_7e4::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Acm_inst_resp_7e4* Acm_inst_resp_7e4::default_instance_ = NULL;
Acm_inst_resp_7e4* Acm_inst_resp_7e4::New(::google::protobuf::Arena* arena) const {
Acm_inst_resp_7e4* n = new Acm_inst_resp_7e4;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Acm_inst_resp_7e4::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Acm_inst_resp_7e4)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Acm_inst_resp_7e4, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Acm_inst_resp_7e4*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(data_7_, pid_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Acm_inst_resp_7e4::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Acm_inst_resp_7e4)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 data_7 = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &data_7_)));
set_has_data_7();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_data_6;
break;
}
// optional int32 data_6 = 2;
case 2: {
if (tag == 16) {
parse_data_6:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &data_6_)));
set_has_data_6();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_data_5;
break;
}
// optional int32 data_5 = 3;
case 3: {
if (tag == 24) {
parse_data_5:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &data_5_)));
set_has_data_5();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_data_4;
break;
}
// optional int32 data_4 = 4;
case 4: {
if (tag == 32) {
parse_data_4:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &data_4_)));
set_has_data_4();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_data_3;
break;
}
// optional int32 data_3 = 5;
case 5: {
if (tag == 40) {
parse_data_3:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &data_3_)));
set_has_data_3();
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_rtn_cmd_counter;
break;
}
// optional int32 rtn_cmd_counter = 6;
case 6: {
if (tag == 48) {
parse_rtn_cmd_counter:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &rtn_cmd_counter_)));
set_has_rtn_cmd_counter();
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_command_return_code;
break;
}
// optional int32 command_return_code = 7;
case 7: {
if (tag == 56) {
parse_command_return_code:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &command_return_code_)));
set_has_command_return_code();
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_pid;
break;
}
// optional int32 pid = 8;
case 8: {
if (tag == 64) {
parse_pid:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &pid_)));
set_has_pid();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Acm_inst_resp_7e4)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Acm_inst_resp_7e4)
return false;
#undef DO_
}
void Acm_inst_resp_7e4::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Acm_inst_resp_7e4)
// optional int32 data_7 = 1;
if (has_data_7()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->data_7(), output);
}
// optional int32 data_6 = 2;
if (has_data_6()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->data_6(), output);
}
// optional int32 data_5 = 3;
if (has_data_5()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->data_5(), output);
}
// optional int32 data_4 = 4;
if (has_data_4()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->data_4(), output);
}
// optional int32 data_3 = 5;
if (has_data_3()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->data_3(), output);
}
// optional int32 rtn_cmd_counter = 6;
if (has_rtn_cmd_counter()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->rtn_cmd_counter(), output);
}
// optional int32 command_return_code = 7;
if (has_command_return_code()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->command_return_code(), output);
}
// optional int32 pid = 8;
if (has_pid()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->pid(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Acm_inst_resp_7e4)
}
::google::protobuf::uint8* Acm_inst_resp_7e4::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Acm_inst_resp_7e4)
// optional int32 data_7 = 1;
if (has_data_7()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->data_7(), target);
}
// optional int32 data_6 = 2;
if (has_data_6()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->data_6(), target);
}
// optional int32 data_5 = 3;
if (has_data_5()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->data_5(), target);
}
// optional int32 data_4 = 4;
if (has_data_4()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->data_4(), target);
}
// optional int32 data_3 = 5;
if (has_data_3()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->data_3(), target);
}
// optional int32 rtn_cmd_counter = 6;
if (has_rtn_cmd_counter()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->rtn_cmd_counter(), target);
}
// optional int32 command_return_code = 7;
if (has_command_return_code()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->command_return_code(), target);
}
// optional int32 pid = 8;
if (has_pid()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->pid(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Acm_inst_resp_7e4)
return target;
}
int Acm_inst_resp_7e4::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Acm_inst_resp_7e4)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional int32 data_7 = 1;
if (has_data_7()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->data_7());
}
// optional int32 data_6 = 2;
if (has_data_6()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->data_6());
}
// optional int32 data_5 = 3;
if (has_data_5()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->data_5());
}
// optional int32 data_4 = 4;
if (has_data_4()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->data_4());
}
// optional int32 data_3 = 5;
if (has_data_3()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->data_3());
}
// optional int32 rtn_cmd_counter = 6;
if (has_rtn_cmd_counter()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->rtn_cmd_counter());
}
// optional int32 command_return_code = 7;
if (has_command_return_code()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->command_return_code());
}
// optional int32 pid = 8;
if (has_pid()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->pid());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Acm_inst_resp_7e4::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Acm_inst_resp_7e4)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Acm_inst_resp_7e4* source =
::google::protobuf::internal::DynamicCastToGenerated<const Acm_inst_resp_7e4>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Acm_inst_resp_7e4)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Acm_inst_resp_7e4)
MergeFrom(*source);
}
}
void Acm_inst_resp_7e4::MergeFrom(const Acm_inst_resp_7e4& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Acm_inst_resp_7e4)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_data_7()) {
set_data_7(from.data_7());
}
if (from.has_data_6()) {
set_data_6(from.data_6());
}
if (from.has_data_5()) {
set_data_5(from.data_5());
}
if (from.has_data_4()) {
set_data_4(from.data_4());
}
if (from.has_data_3()) {
set_data_3(from.data_3());
}
if (from.has_rtn_cmd_counter()) {
set_rtn_cmd_counter(from.rtn_cmd_counter());
}
if (from.has_command_return_code()) {
set_command_return_code(from.command_return_code());
}
if (from.has_pid()) {
set_pid(from.pid());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Acm_inst_resp_7e4::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Acm_inst_resp_7e4)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Acm_inst_resp_7e4::CopyFrom(const Acm_inst_resp_7e4& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Acm_inst_resp_7e4)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Acm_inst_resp_7e4::IsInitialized() const {
return true;
}
void Acm_inst_resp_7e4::Swap(Acm_inst_resp_7e4* other) {
if (other == this) return;
InternalSwap(other);
}
void Acm_inst_resp_7e4::InternalSwap(Acm_inst_resp_7e4* other) {
std::swap(data_7_, other->data_7_);
std::swap(data_6_, other->data_6_);
std::swap(data_5_, other->data_5_);
std::swap(data_4_, other->data_4_);
std::swap(data_3_, other->data_3_);
std::swap(rtn_cmd_counter_, other->rtn_cmd_counter_);
std::swap(command_return_code_, other->command_return_code_);
std::swap(pid_, other->pid_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Acm_inst_resp_7e4::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Acm_inst_resp_7e4_descriptor_;
metadata.reflection = Acm_inst_resp_7e4_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Acm_inst_resp_7e4
// optional int32 data_7 = 1;
bool Acm_inst_resp_7e4::has_data_7() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Acm_inst_resp_7e4::set_has_data_7() {
_has_bits_[0] |= 0x00000001u;
}
void Acm_inst_resp_7e4::clear_has_data_7() {
_has_bits_[0] &= ~0x00000001u;
}
void Acm_inst_resp_7e4::clear_data_7() {
data_7_ = 0;
clear_has_data_7();
}
::google::protobuf::int32 Acm_inst_resp_7e4::data_7() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_resp_7e4.data_7)
return data_7_;
}
void Acm_inst_resp_7e4::set_data_7(::google::protobuf::int32 value) {
set_has_data_7();
data_7_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_resp_7e4.data_7)
}
// optional int32 data_6 = 2;
bool Acm_inst_resp_7e4::has_data_6() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Acm_inst_resp_7e4::set_has_data_6() {
_has_bits_[0] |= 0x00000002u;
}
void Acm_inst_resp_7e4::clear_has_data_6() {
_has_bits_[0] &= ~0x00000002u;
}
void Acm_inst_resp_7e4::clear_data_6() {
data_6_ = 0;
clear_has_data_6();
}
::google::protobuf::int32 Acm_inst_resp_7e4::data_6() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_resp_7e4.data_6)
return data_6_;
}
void Acm_inst_resp_7e4::set_data_6(::google::protobuf::int32 value) {
set_has_data_6();
data_6_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_resp_7e4.data_6)
}
// optional int32 data_5 = 3;
bool Acm_inst_resp_7e4::has_data_5() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Acm_inst_resp_7e4::set_has_data_5() {
_has_bits_[0] |= 0x00000004u;
}
void Acm_inst_resp_7e4::clear_has_data_5() {
_has_bits_[0] &= ~0x00000004u;
}
void Acm_inst_resp_7e4::clear_data_5() {
data_5_ = 0;
clear_has_data_5();
}
::google::protobuf::int32 Acm_inst_resp_7e4::data_5() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_resp_7e4.data_5)
return data_5_;
}
void Acm_inst_resp_7e4::set_data_5(::google::protobuf::int32 value) {
set_has_data_5();
data_5_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_resp_7e4.data_5)
}
// optional int32 data_4 = 4;
bool Acm_inst_resp_7e4::has_data_4() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Acm_inst_resp_7e4::set_has_data_4() {
_has_bits_[0] |= 0x00000008u;
}
void Acm_inst_resp_7e4::clear_has_data_4() {
_has_bits_[0] &= ~0x00000008u;
}
void Acm_inst_resp_7e4::clear_data_4() {
data_4_ = 0;
clear_has_data_4();
}
::google::protobuf::int32 Acm_inst_resp_7e4::data_4() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_resp_7e4.data_4)
return data_4_;
}
void Acm_inst_resp_7e4::set_data_4(::google::protobuf::int32 value) {
set_has_data_4();
data_4_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_resp_7e4.data_4)
}
// optional int32 data_3 = 5;
bool Acm_inst_resp_7e4::has_data_3() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Acm_inst_resp_7e4::set_has_data_3() {
_has_bits_[0] |= 0x00000010u;
}
void Acm_inst_resp_7e4::clear_has_data_3() {
_has_bits_[0] &= ~0x00000010u;
}
void Acm_inst_resp_7e4::clear_data_3() {
data_3_ = 0;
clear_has_data_3();
}
::google::protobuf::int32 Acm_inst_resp_7e4::data_3() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_resp_7e4.data_3)
return data_3_;
}
void Acm_inst_resp_7e4::set_data_3(::google::protobuf::int32 value) {
set_has_data_3();
data_3_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_resp_7e4.data_3)
}
// optional int32 rtn_cmd_counter = 6;
bool Acm_inst_resp_7e4::has_rtn_cmd_counter() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Acm_inst_resp_7e4::set_has_rtn_cmd_counter() {
_has_bits_[0] |= 0x00000020u;
}
void Acm_inst_resp_7e4::clear_has_rtn_cmd_counter() {
_has_bits_[0] &= ~0x00000020u;
}
void Acm_inst_resp_7e4::clear_rtn_cmd_counter() {
rtn_cmd_counter_ = 0;
clear_has_rtn_cmd_counter();
}
::google::protobuf::int32 Acm_inst_resp_7e4::rtn_cmd_counter() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_resp_7e4.rtn_cmd_counter)
return rtn_cmd_counter_;
}
void Acm_inst_resp_7e4::set_rtn_cmd_counter(::google::protobuf::int32 value) {
set_has_rtn_cmd_counter();
rtn_cmd_counter_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_resp_7e4.rtn_cmd_counter)
}
// optional int32 command_return_code = 7;
bool Acm_inst_resp_7e4::has_command_return_code() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Acm_inst_resp_7e4::set_has_command_return_code() {
_has_bits_[0] |= 0x00000040u;
}
void Acm_inst_resp_7e4::clear_has_command_return_code() {
_has_bits_[0] &= ~0x00000040u;
}
void Acm_inst_resp_7e4::clear_command_return_code() {
command_return_code_ = 0;
clear_has_command_return_code();
}
::google::protobuf::int32 Acm_inst_resp_7e4::command_return_code() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_resp_7e4.command_return_code)
return command_return_code_;
}
void Acm_inst_resp_7e4::set_command_return_code(::google::protobuf::int32 value) {
set_has_command_return_code();
command_return_code_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_resp_7e4.command_return_code)
}
// optional int32 pid = 8;
bool Acm_inst_resp_7e4::has_pid() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Acm_inst_resp_7e4::set_has_pid() {
_has_bits_[0] |= 0x00000080u;
}
void Acm_inst_resp_7e4::clear_has_pid() {
_has_bits_[0] &= ~0x00000080u;
}
void Acm_inst_resp_7e4::clear_pid() {
pid_ = 0;
clear_has_pid();
}
::google::protobuf::int32 Acm_inst_resp_7e4::pid() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Acm_inst_resp_7e4.pid)
return pid_;
}
void Acm_inst_resp_7e4::set_pid(::google::protobuf::int32 value) {
set_has_pid();
pid_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Acm_inst_resp_7e4.pid)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_mr_only_transmitType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_mr_only_transmitType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_mr_only_transmitType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_mr_only_transmitType Vehicle2_4f1::CAN_RX_MR_ONLY_TRANSMIT_OFF;
const Vehicle2_4f1_Can_rx_mr_only_transmitType Vehicle2_4f1::CAN_RX_MR_ONLY_TRANSMIT_ON;
const Vehicle2_4f1_Can_rx_mr_only_transmitType Vehicle2_4f1::Can_rx_mr_only_transmitType_MIN;
const Vehicle2_4f1_Can_rx_mr_only_transmitType Vehicle2_4f1::Can_rx_mr_only_transmitType_MAX;
const int Vehicle2_4f1::Can_rx_mr_only_transmitType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_lr_only_transmitType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_lr_only_transmitType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_lr_only_transmitType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_lr_only_transmitType Vehicle2_4f1::CAN_RX_LR_ONLY_TRANSMIT_OFF;
const Vehicle2_4f1_Can_rx_lr_only_transmitType Vehicle2_4f1::CAN_RX_LR_ONLY_TRANSMIT_ON;
const Vehicle2_4f1_Can_rx_lr_only_transmitType Vehicle2_4f1::Can_rx_lr_only_transmitType_MIN;
const Vehicle2_4f1_Can_rx_lr_only_transmitType Vehicle2_4f1::Can_rx_lr_only_transmitType_MAX;
const int Vehicle2_4f1::Can_rx_lr_only_transmitType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_clear_faultsType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_clear_faultsType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_clear_faultsType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_clear_faultsType Vehicle2_4f1::CAN_RX_CLEAR_FAULTS_OFF;
const Vehicle2_4f1_Can_rx_clear_faultsType Vehicle2_4f1::CAN_RX_CLEAR_FAULTS_ON;
const Vehicle2_4f1_Can_rx_clear_faultsType Vehicle2_4f1::Can_rx_clear_faultsType_MIN;
const Vehicle2_4f1_Can_rx_clear_faultsType Vehicle2_4f1::Can_rx_clear_faultsType_MAX;
const int Vehicle2_4f1::Can_rx_clear_faultsType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_use_angle_misalignmentType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_use_angle_misalignmentType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_use_angle_misalignmentType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_use_angle_misalignmentType Vehicle2_4f1::CAN_RX_USE_ANGLE_MISALIGNMENT_OFF;
const Vehicle2_4f1_Can_rx_use_angle_misalignmentType Vehicle2_4f1::CAN_RX_USE_ANGLE_MISALIGNMENT_ON;
const Vehicle2_4f1_Can_rx_use_angle_misalignmentType Vehicle2_4f1::Can_rx_use_angle_misalignmentType_MIN;
const Vehicle2_4f1_Can_rx_use_angle_misalignmentType Vehicle2_4f1::Can_rx_use_angle_misalignmentType_MAX;
const int Vehicle2_4f1::Can_rx_use_angle_misalignmentType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_turn_signal_statusType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_turn_signal_statusType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_turn_signal_statusType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_turn_signal_statusType Vehicle2_4f1::CAN_RX_TURN_SIGNAL_STATUS_OFF;
const Vehicle2_4f1_Can_rx_turn_signal_statusType Vehicle2_4f1::CAN_RX_TURN_SIGNAL_STATUS_LEFT;
const Vehicle2_4f1_Can_rx_turn_signal_statusType Vehicle2_4f1::CAN_RX_TURN_SIGNAL_STATUS_RIGHT;
const Vehicle2_4f1_Can_rx_turn_signal_statusType Vehicle2_4f1::CAN_RX_TURN_SIGNAL_STATUS_INVALID_3;
const Vehicle2_4f1_Can_rx_turn_signal_statusType Vehicle2_4f1::Can_rx_turn_signal_statusType_MIN;
const Vehicle2_4f1_Can_rx_turn_signal_statusType Vehicle2_4f1::Can_rx_turn_signal_statusType_MAX;
const int Vehicle2_4f1::Can_rx_turn_signal_statusType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_blockage_disableType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_blockage_disableType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_blockage_disableType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_blockage_disableType Vehicle2_4f1::CAN_RX_BLOCKAGE_DISABLE_ENABLED;
const Vehicle2_4f1_Can_rx_blockage_disableType Vehicle2_4f1::CAN_RX_BLOCKAGE_DISABLE_DISABLED;
const Vehicle2_4f1_Can_rx_blockage_disableType Vehicle2_4f1::Can_rx_blockage_disableType_MIN;
const Vehicle2_4f1_Can_rx_blockage_disableType Vehicle2_4f1::Can_rx_blockage_disableType_MAX;
const int Vehicle2_4f1::Can_rx_blockage_disableType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_vehicle_speed_validityType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_vehicle_speed_validityType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_vehicle_speed_validityType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_vehicle_speed_validityType Vehicle2_4f1::CAN_RX_VEHICLE_SPEED_VALIDITY_INVALID;
const Vehicle2_4f1_Can_rx_vehicle_speed_validityType Vehicle2_4f1::CAN_RX_VEHICLE_SPEED_VALIDITY_VALID;
const Vehicle2_4f1_Can_rx_vehicle_speed_validityType Vehicle2_4f1::Can_rx_vehicle_speed_validityType_MIN;
const Vehicle2_4f1_Can_rx_vehicle_speed_validityType Vehicle2_4f1::Can_rx_vehicle_speed_validityType_MAX;
const int Vehicle2_4f1::Can_rx_vehicle_speed_validityType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_mmr_upside_downType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_mmr_upside_downType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_mmr_upside_downType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_mmr_upside_downType Vehicle2_4f1::CAN_RX_MMR_UPSIDE_DOWN_RIGHT_SIDE_UP;
const Vehicle2_4f1_Can_rx_mmr_upside_downType Vehicle2_4f1::CAN_RX_MMR_UPSIDE_DOWN_UPSIDE_DOWN;
const Vehicle2_4f1_Can_rx_mmr_upside_downType Vehicle2_4f1::Can_rx_mmr_upside_downType_MIN;
const Vehicle2_4f1_Can_rx_mmr_upside_downType Vehicle2_4f1::Can_rx_mmr_upside_downType_MAX;
const int Vehicle2_4f1::Can_rx_mmr_upside_downType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_wiper_statusType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_wiper_statusType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_wiper_statusType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_wiper_statusType Vehicle2_4f1::CAN_RX_WIPER_STATUS_OFF;
const Vehicle2_4f1_Can_rx_wiper_statusType Vehicle2_4f1::CAN_RX_WIPER_STATUS_ON;
const Vehicle2_4f1_Can_rx_wiper_statusType Vehicle2_4f1::Can_rx_wiper_statusType_MIN;
const Vehicle2_4f1_Can_rx_wiper_statusType Vehicle2_4f1::Can_rx_wiper_statusType_MAX;
const int Vehicle2_4f1::Can_rx_wiper_statusType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_raw_data_enableType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_raw_data_enableType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_raw_data_enableType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_raw_data_enableType Vehicle2_4f1::CAN_RX_RAW_DATA_ENABLE_FILTERED;
const Vehicle2_4f1_Can_rx_raw_data_enableType Vehicle2_4f1::CAN_RX_RAW_DATA_ENABLE_RAW;
const Vehicle2_4f1_Can_rx_raw_data_enableType Vehicle2_4f1::Can_rx_raw_data_enableType_MIN;
const Vehicle2_4f1_Can_rx_raw_data_enableType Vehicle2_4f1::Can_rx_raw_data_enableType_MAX;
const int Vehicle2_4f1::Can_rx_raw_data_enableType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_radar_cmd_radiateType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_radar_cmd_radiateType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_radar_cmd_radiateType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_radar_cmd_radiateType Vehicle2_4f1::CAN_RX_RADAR_CMD_RADIATE_OFF;
const Vehicle2_4f1_Can_rx_radar_cmd_radiateType Vehicle2_4f1::CAN_RX_RADAR_CMD_RADIATE_ON;
const Vehicle2_4f1_Can_rx_radar_cmd_radiateType Vehicle2_4f1::Can_rx_radar_cmd_radiateType_MIN;
const Vehicle2_4f1_Can_rx_radar_cmd_radiateType Vehicle2_4f1::Can_rx_radar_cmd_radiateType_MAX;
const int Vehicle2_4f1::Can_rx_radar_cmd_radiateType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle2_4f1_Can_rx_grouping_modeType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_Can_rx_grouping_modeType_descriptor_;
}
bool Vehicle2_4f1_Can_rx_grouping_modeType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle2_4f1_Can_rx_grouping_modeType Vehicle2_4f1::CAN_RX_GROUPING_MODE_NO_GROUPING;
const Vehicle2_4f1_Can_rx_grouping_modeType Vehicle2_4f1::CAN_RX_GROUPING_MODE_GROUP_MOVING_ONLY;
const Vehicle2_4f1_Can_rx_grouping_modeType Vehicle2_4f1::CAN_RX_GROUPING_MODE_GROUP_STATIONARY_ONLY;
const Vehicle2_4f1_Can_rx_grouping_modeType Vehicle2_4f1::CAN_RX_GROUPING_MODE_GROUP_MOVING_STATIONARY;
const Vehicle2_4f1_Can_rx_grouping_modeType Vehicle2_4f1::Can_rx_grouping_modeType_MIN;
const Vehicle2_4f1_Can_rx_grouping_modeType Vehicle2_4f1::Can_rx_grouping_modeType_MAX;
const int Vehicle2_4f1::Can_rx_grouping_modeType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Vehicle2_4f1::kCanRxVolvoShortTrackRocFieldNumber;
const int Vehicle2_4f1::kCanRxMrOnlyTransmitFieldNumber;
const int Vehicle2_4f1::kCanRxLrOnlyTransmitFieldNumber;
const int Vehicle2_4f1::kCanRxHighYawAngleFieldNumber;
const int Vehicle2_4f1::kCanRxClearFaultsFieldNumber;
const int Vehicle2_4f1::kCanRxUseAngleMisalignmentFieldNumber;
const int Vehicle2_4f1::kCanRxTurnSignalStatusFieldNumber;
const int Vehicle2_4f1::kCanRxBlockageDisableFieldNumber;
const int Vehicle2_4f1::kCanRxVehicleSpeedValidityFieldNumber;
const int Vehicle2_4f1::kCanRxMmrUpsideDownFieldNumber;
const int Vehicle2_4f1::kCanRxWiperStatusFieldNumber;
const int Vehicle2_4f1::kCanRxRawDataEnableFieldNumber;
const int Vehicle2_4f1::kCanRxRadarCmdRadiateFieldNumber;
const int Vehicle2_4f1::kCanRxGroupingModeFieldNumber;
const int Vehicle2_4f1::kCanRxMaximumTracksFieldNumber;
const int Vehicle2_4f1::kCanRxLateralMountingOffsetFieldNumber;
const int Vehicle2_4f1::kCanRxAngleMisalignmentFieldNumber;
const int Vehicle2_4f1::kCanRxScanIndexAckFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Vehicle2_4f1::Vehicle2_4f1()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Vehicle2_4f1)
}
void Vehicle2_4f1::InitAsDefaultInstance() {
}
Vehicle2_4f1::Vehicle2_4f1(const Vehicle2_4f1& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Vehicle2_4f1)
}
void Vehicle2_4f1::SharedCtor() {
_cached_size_ = 0;
can_rx_volvo_short_track_roc_ = 0;
can_rx_mr_only_transmit_ = 0;
can_rx_lr_only_transmit_ = 0;
can_rx_high_yaw_angle_ = 0;
can_rx_clear_faults_ = 0;
can_rx_use_angle_misalignment_ = 0;
can_rx_turn_signal_status_ = 0;
can_rx_blockage_disable_ = 0;
can_rx_vehicle_speed_validity_ = 0;
can_rx_mmr_upside_down_ = 0;
can_rx_wiper_status_ = 0;
can_rx_raw_data_enable_ = 0;
can_rx_radar_cmd_radiate_ = 0;
can_rx_grouping_mode_ = 0;
can_rx_maximum_tracks_ = 0;
can_rx_lateral_mounting_offset_ = 0;
can_rx_angle_misalignment_ = 0;
can_rx_scan_index_ack_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Vehicle2_4f1::~Vehicle2_4f1() {
// @@protoc_insertion_point(destructor:apollo.drivers.Vehicle2_4f1)
SharedDtor();
}
void Vehicle2_4f1::SharedDtor() {
if (this != default_instance_) {
}
}
void Vehicle2_4f1::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Vehicle2_4f1::descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle2_4f1_descriptor_;
}
const Vehicle2_4f1& Vehicle2_4f1::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Vehicle2_4f1* Vehicle2_4f1::default_instance_ = NULL;
Vehicle2_4f1* Vehicle2_4f1::New(::google::protobuf::Arena* arena) const {
Vehicle2_4f1* n = new Vehicle2_4f1;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Vehicle2_4f1::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Vehicle2_4f1)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Vehicle2_4f1, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Vehicle2_4f1*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_rx_volvo_short_track_roc_, can_rx_blockage_disable_);
}
if (_has_bits_[8 / 32] & 65280u) {
ZR_(can_rx_vehicle_speed_validity_, can_rx_lateral_mounting_offset_);
}
ZR_(can_rx_angle_misalignment_, can_rx_scan_index_ack_);
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Vehicle2_4f1::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Vehicle2_4f1)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional double can_rx_volvo_short_track_roc = 1;
case 1: {
if (tag == 9) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_volvo_short_track_roc_)));
set_has_can_rx_volvo_short_track_roc();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_rx_mr_only_transmit;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_mr_only_transmitType can_rx_mr_only_transmit = 2;
case 2: {
if (tag == 16) {
parse_can_rx_mr_only_transmit:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_mr_only_transmitType_IsValid(value)) {
set_can_rx_mr_only_transmit(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_mr_only_transmitType >(value));
} else {
mutable_unknown_fields()->AddVarint(2, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_rx_lr_only_transmit;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_lr_only_transmitType can_rx_lr_only_transmit = 3;
case 3: {
if (tag == 24) {
parse_can_rx_lr_only_transmit:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_lr_only_transmitType_IsValid(value)) {
set_can_rx_lr_only_transmit(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_lr_only_transmitType >(value));
} else {
mutable_unknown_fields()->AddVarint(3, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_rx_high_yaw_angle;
break;
}
// optional int32 can_rx_high_yaw_angle = 4;
case 4: {
if (tag == 32) {
parse_can_rx_high_yaw_angle:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_high_yaw_angle_)));
set_has_can_rx_high_yaw_angle();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_rx_clear_faults;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_clear_faultsType can_rx_clear_faults = 5;
case 5: {
if (tag == 40) {
parse_can_rx_clear_faults:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_clear_faultsType_IsValid(value)) {
set_can_rx_clear_faults(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_clear_faultsType >(value));
} else {
mutable_unknown_fields()->AddVarint(5, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_rx_use_angle_misalignment;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_use_angle_misalignmentType can_rx_use_angle_misalignment = 6;
case 6: {
if (tag == 48) {
parse_can_rx_use_angle_misalignment:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_use_angle_misalignmentType_IsValid(value)) {
set_can_rx_use_angle_misalignment(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_use_angle_misalignmentType >(value));
} else {
mutable_unknown_fields()->AddVarint(6, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_rx_turn_signal_status;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_turn_signal_statusType can_rx_turn_signal_status = 7;
case 7: {
if (tag == 56) {
parse_can_rx_turn_signal_status:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_turn_signal_statusType_IsValid(value)) {
set_can_rx_turn_signal_status(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_turn_signal_statusType >(value));
} else {
mutable_unknown_fields()->AddVarint(7, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_can_rx_blockage_disable;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_blockage_disableType can_rx_blockage_disable = 8;
case 8: {
if (tag == 64) {
parse_can_rx_blockage_disable:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_blockage_disableType_IsValid(value)) {
set_can_rx_blockage_disable(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_blockage_disableType >(value));
} else {
mutable_unknown_fields()->AddVarint(8, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(72)) goto parse_can_rx_vehicle_speed_validity;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_vehicle_speed_validityType can_rx_vehicle_speed_validity = 9;
case 9: {
if (tag == 72) {
parse_can_rx_vehicle_speed_validity:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_vehicle_speed_validityType_IsValid(value)) {
set_can_rx_vehicle_speed_validity(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_vehicle_speed_validityType >(value));
} else {
mutable_unknown_fields()->AddVarint(9, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(80)) goto parse_can_rx_mmr_upside_down;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_mmr_upside_downType can_rx_mmr_upside_down = 10;
case 10: {
if (tag == 80) {
parse_can_rx_mmr_upside_down:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_mmr_upside_downType_IsValid(value)) {
set_can_rx_mmr_upside_down(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_mmr_upside_downType >(value));
} else {
mutable_unknown_fields()->AddVarint(10, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(88)) goto parse_can_rx_wiper_status;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_wiper_statusType can_rx_wiper_status = 11;
case 11: {
if (tag == 88) {
parse_can_rx_wiper_status:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_wiper_statusType_IsValid(value)) {
set_can_rx_wiper_status(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_wiper_statusType >(value));
} else {
mutable_unknown_fields()->AddVarint(11, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(96)) goto parse_can_rx_raw_data_enable;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_raw_data_enableType can_rx_raw_data_enable = 12;
case 12: {
if (tag == 96) {
parse_can_rx_raw_data_enable:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_raw_data_enableType_IsValid(value)) {
set_can_rx_raw_data_enable(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_raw_data_enableType >(value));
} else {
mutable_unknown_fields()->AddVarint(12, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(104)) goto parse_can_rx_radar_cmd_radiate;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_radar_cmd_radiateType can_rx_radar_cmd_radiate = 13;
case 13: {
if (tag == 104) {
parse_can_rx_radar_cmd_radiate:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_radar_cmd_radiateType_IsValid(value)) {
set_can_rx_radar_cmd_radiate(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_radar_cmd_radiateType >(value));
} else {
mutable_unknown_fields()->AddVarint(13, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(112)) goto parse_can_rx_grouping_mode;
break;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_grouping_modeType can_rx_grouping_mode = 14;
case 14: {
if (tag == 112) {
parse_can_rx_grouping_mode:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle2_4f1_Can_rx_grouping_modeType_IsValid(value)) {
set_can_rx_grouping_mode(static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_grouping_modeType >(value));
} else {
mutable_unknown_fields()->AddVarint(14, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(120)) goto parse_can_rx_maximum_tracks;
break;
}
// optional int32 can_rx_maximum_tracks = 15;
case 15: {
if (tag == 120) {
parse_can_rx_maximum_tracks:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_maximum_tracks_)));
set_has_can_rx_maximum_tracks();
} else {
goto handle_unusual;
}
if (input->ExpectTag(129)) goto parse_can_rx_lateral_mounting_offset;
break;
}
// optional double can_rx_lateral_mounting_offset = 16;
case 16: {
if (tag == 129) {
parse_can_rx_lateral_mounting_offset:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_lateral_mounting_offset_)));
set_has_can_rx_lateral_mounting_offset();
} else {
goto handle_unusual;
}
if (input->ExpectTag(137)) goto parse_can_rx_angle_misalignment;
break;
}
// optional double can_rx_angle_misalignment = 17;
case 17: {
if (tag == 137) {
parse_can_rx_angle_misalignment:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_angle_misalignment_)));
set_has_can_rx_angle_misalignment();
} else {
goto handle_unusual;
}
if (input->ExpectTag(144)) goto parse_can_rx_scan_index_ack;
break;
}
// optional int32 can_rx_scan_index_ack = 18;
case 18: {
if (tag == 144) {
parse_can_rx_scan_index_ack:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_scan_index_ack_)));
set_has_can_rx_scan_index_ack();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Vehicle2_4f1)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Vehicle2_4f1)
return false;
#undef DO_
}
void Vehicle2_4f1::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Vehicle2_4f1)
// optional double can_rx_volvo_short_track_roc = 1;
if (has_can_rx_volvo_short_track_roc()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->can_rx_volvo_short_track_roc(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_mr_only_transmitType can_rx_mr_only_transmit = 2;
if (has_can_rx_mr_only_transmit()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
2, this->can_rx_mr_only_transmit(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_lr_only_transmitType can_rx_lr_only_transmit = 3;
if (has_can_rx_lr_only_transmit()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
3, this->can_rx_lr_only_transmit(), output);
}
// optional int32 can_rx_high_yaw_angle = 4;
if (has_can_rx_high_yaw_angle()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_rx_high_yaw_angle(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_clear_faultsType can_rx_clear_faults = 5;
if (has_can_rx_clear_faults()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
5, this->can_rx_clear_faults(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_use_angle_misalignmentType can_rx_use_angle_misalignment = 6;
if (has_can_rx_use_angle_misalignment()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
6, this->can_rx_use_angle_misalignment(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_turn_signal_statusType can_rx_turn_signal_status = 7;
if (has_can_rx_turn_signal_status()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
7, this->can_rx_turn_signal_status(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_blockage_disableType can_rx_blockage_disable = 8;
if (has_can_rx_blockage_disable()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
8, this->can_rx_blockage_disable(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_vehicle_speed_validityType can_rx_vehicle_speed_validity = 9;
if (has_can_rx_vehicle_speed_validity()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
9, this->can_rx_vehicle_speed_validity(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_mmr_upside_downType can_rx_mmr_upside_down = 10;
if (has_can_rx_mmr_upside_down()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
10, this->can_rx_mmr_upside_down(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_wiper_statusType can_rx_wiper_status = 11;
if (has_can_rx_wiper_status()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
11, this->can_rx_wiper_status(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_raw_data_enableType can_rx_raw_data_enable = 12;
if (has_can_rx_raw_data_enable()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
12, this->can_rx_raw_data_enable(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_radar_cmd_radiateType can_rx_radar_cmd_radiate = 13;
if (has_can_rx_radar_cmd_radiate()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
13, this->can_rx_radar_cmd_radiate(), output);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_grouping_modeType can_rx_grouping_mode = 14;
if (has_can_rx_grouping_mode()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
14, this->can_rx_grouping_mode(), output);
}
// optional int32 can_rx_maximum_tracks = 15;
if (has_can_rx_maximum_tracks()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(15, this->can_rx_maximum_tracks(), output);
}
// optional double can_rx_lateral_mounting_offset = 16;
if (has_can_rx_lateral_mounting_offset()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(16, this->can_rx_lateral_mounting_offset(), output);
}
// optional double can_rx_angle_misalignment = 17;
if (has_can_rx_angle_misalignment()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(17, this->can_rx_angle_misalignment(), output);
}
// optional int32 can_rx_scan_index_ack = 18;
if (has_can_rx_scan_index_ack()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(18, this->can_rx_scan_index_ack(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Vehicle2_4f1)
}
::google::protobuf::uint8* Vehicle2_4f1::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Vehicle2_4f1)
// optional double can_rx_volvo_short_track_roc = 1;
if (has_can_rx_volvo_short_track_roc()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->can_rx_volvo_short_track_roc(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_mr_only_transmitType can_rx_mr_only_transmit = 2;
if (has_can_rx_mr_only_transmit()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2, this->can_rx_mr_only_transmit(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_lr_only_transmitType can_rx_lr_only_transmit = 3;
if (has_can_rx_lr_only_transmit()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
3, this->can_rx_lr_only_transmit(), target);
}
// optional int32 can_rx_high_yaw_angle = 4;
if (has_can_rx_high_yaw_angle()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_rx_high_yaw_angle(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_clear_faultsType can_rx_clear_faults = 5;
if (has_can_rx_clear_faults()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
5, this->can_rx_clear_faults(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_use_angle_misalignmentType can_rx_use_angle_misalignment = 6;
if (has_can_rx_use_angle_misalignment()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
6, this->can_rx_use_angle_misalignment(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_turn_signal_statusType can_rx_turn_signal_status = 7;
if (has_can_rx_turn_signal_status()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
7, this->can_rx_turn_signal_status(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_blockage_disableType can_rx_blockage_disable = 8;
if (has_can_rx_blockage_disable()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
8, this->can_rx_blockage_disable(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_vehicle_speed_validityType can_rx_vehicle_speed_validity = 9;
if (has_can_rx_vehicle_speed_validity()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
9, this->can_rx_vehicle_speed_validity(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_mmr_upside_downType can_rx_mmr_upside_down = 10;
if (has_can_rx_mmr_upside_down()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
10, this->can_rx_mmr_upside_down(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_wiper_statusType can_rx_wiper_status = 11;
if (has_can_rx_wiper_status()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
11, this->can_rx_wiper_status(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_raw_data_enableType can_rx_raw_data_enable = 12;
if (has_can_rx_raw_data_enable()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
12, this->can_rx_raw_data_enable(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_radar_cmd_radiateType can_rx_radar_cmd_radiate = 13;
if (has_can_rx_radar_cmd_radiate()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
13, this->can_rx_radar_cmd_radiate(), target);
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_grouping_modeType can_rx_grouping_mode = 14;
if (has_can_rx_grouping_mode()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
14, this->can_rx_grouping_mode(), target);
}
// optional int32 can_rx_maximum_tracks = 15;
if (has_can_rx_maximum_tracks()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(15, this->can_rx_maximum_tracks(), target);
}
// optional double can_rx_lateral_mounting_offset = 16;
if (has_can_rx_lateral_mounting_offset()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(16, this->can_rx_lateral_mounting_offset(), target);
}
// optional double can_rx_angle_misalignment = 17;
if (has_can_rx_angle_misalignment()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(17, this->can_rx_angle_misalignment(), target);
}
// optional int32 can_rx_scan_index_ack = 18;
if (has_can_rx_scan_index_ack()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(18, this->can_rx_scan_index_ack(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Vehicle2_4f1)
return target;
}
int Vehicle2_4f1::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Vehicle2_4f1)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional double can_rx_volvo_short_track_roc = 1;
if (has_can_rx_volvo_short_track_roc()) {
total_size += 1 + 8;
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_mr_only_transmitType can_rx_mr_only_transmit = 2;
if (has_can_rx_mr_only_transmit()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_mr_only_transmit());
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_lr_only_transmitType can_rx_lr_only_transmit = 3;
if (has_can_rx_lr_only_transmit()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_lr_only_transmit());
}
// optional int32 can_rx_high_yaw_angle = 4;
if (has_can_rx_high_yaw_angle()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_high_yaw_angle());
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_clear_faultsType can_rx_clear_faults = 5;
if (has_can_rx_clear_faults()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_clear_faults());
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_use_angle_misalignmentType can_rx_use_angle_misalignment = 6;
if (has_can_rx_use_angle_misalignment()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_use_angle_misalignment());
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_turn_signal_statusType can_rx_turn_signal_status = 7;
if (has_can_rx_turn_signal_status()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_turn_signal_status());
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_blockage_disableType can_rx_blockage_disable = 8;
if (has_can_rx_blockage_disable()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_blockage_disable());
}
}
if (_has_bits_[8 / 32] & 65280u) {
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_vehicle_speed_validityType can_rx_vehicle_speed_validity = 9;
if (has_can_rx_vehicle_speed_validity()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_vehicle_speed_validity());
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_mmr_upside_downType can_rx_mmr_upside_down = 10;
if (has_can_rx_mmr_upside_down()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_mmr_upside_down());
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_wiper_statusType can_rx_wiper_status = 11;
if (has_can_rx_wiper_status()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_wiper_status());
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_raw_data_enableType can_rx_raw_data_enable = 12;
if (has_can_rx_raw_data_enable()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_raw_data_enable());
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_radar_cmd_radiateType can_rx_radar_cmd_radiate = 13;
if (has_can_rx_radar_cmd_radiate()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_radar_cmd_radiate());
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_grouping_modeType can_rx_grouping_mode = 14;
if (has_can_rx_grouping_mode()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_grouping_mode());
}
// optional int32 can_rx_maximum_tracks = 15;
if (has_can_rx_maximum_tracks()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_maximum_tracks());
}
// optional double can_rx_lateral_mounting_offset = 16;
if (has_can_rx_lateral_mounting_offset()) {
total_size += 2 + 8;
}
}
if (_has_bits_[16 / 32] & 196608u) {
// optional double can_rx_angle_misalignment = 17;
if (has_can_rx_angle_misalignment()) {
total_size += 2 + 8;
}
// optional int32 can_rx_scan_index_ack = 18;
if (has_can_rx_scan_index_ack()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_scan_index_ack());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Vehicle2_4f1::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Vehicle2_4f1)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Vehicle2_4f1* source =
::google::protobuf::internal::DynamicCastToGenerated<const Vehicle2_4f1>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Vehicle2_4f1)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Vehicle2_4f1)
MergeFrom(*source);
}
}
void Vehicle2_4f1::MergeFrom(const Vehicle2_4f1& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Vehicle2_4f1)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_rx_volvo_short_track_roc()) {
set_can_rx_volvo_short_track_roc(from.can_rx_volvo_short_track_roc());
}
if (from.has_can_rx_mr_only_transmit()) {
set_can_rx_mr_only_transmit(from.can_rx_mr_only_transmit());
}
if (from.has_can_rx_lr_only_transmit()) {
set_can_rx_lr_only_transmit(from.can_rx_lr_only_transmit());
}
if (from.has_can_rx_high_yaw_angle()) {
set_can_rx_high_yaw_angle(from.can_rx_high_yaw_angle());
}
if (from.has_can_rx_clear_faults()) {
set_can_rx_clear_faults(from.can_rx_clear_faults());
}
if (from.has_can_rx_use_angle_misalignment()) {
set_can_rx_use_angle_misalignment(from.can_rx_use_angle_misalignment());
}
if (from.has_can_rx_turn_signal_status()) {
set_can_rx_turn_signal_status(from.can_rx_turn_signal_status());
}
if (from.has_can_rx_blockage_disable()) {
set_can_rx_blockage_disable(from.can_rx_blockage_disable());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_can_rx_vehicle_speed_validity()) {
set_can_rx_vehicle_speed_validity(from.can_rx_vehicle_speed_validity());
}
if (from.has_can_rx_mmr_upside_down()) {
set_can_rx_mmr_upside_down(from.can_rx_mmr_upside_down());
}
if (from.has_can_rx_wiper_status()) {
set_can_rx_wiper_status(from.can_rx_wiper_status());
}
if (from.has_can_rx_raw_data_enable()) {
set_can_rx_raw_data_enable(from.can_rx_raw_data_enable());
}
if (from.has_can_rx_radar_cmd_radiate()) {
set_can_rx_radar_cmd_radiate(from.can_rx_radar_cmd_radiate());
}
if (from.has_can_rx_grouping_mode()) {
set_can_rx_grouping_mode(from.can_rx_grouping_mode());
}
if (from.has_can_rx_maximum_tracks()) {
set_can_rx_maximum_tracks(from.can_rx_maximum_tracks());
}
if (from.has_can_rx_lateral_mounting_offset()) {
set_can_rx_lateral_mounting_offset(from.can_rx_lateral_mounting_offset());
}
}
if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
if (from.has_can_rx_angle_misalignment()) {
set_can_rx_angle_misalignment(from.can_rx_angle_misalignment());
}
if (from.has_can_rx_scan_index_ack()) {
set_can_rx_scan_index_ack(from.can_rx_scan_index_ack());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Vehicle2_4f1::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Vehicle2_4f1)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Vehicle2_4f1::CopyFrom(const Vehicle2_4f1& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Vehicle2_4f1)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Vehicle2_4f1::IsInitialized() const {
return true;
}
void Vehicle2_4f1::Swap(Vehicle2_4f1* other) {
if (other == this) return;
InternalSwap(other);
}
void Vehicle2_4f1::InternalSwap(Vehicle2_4f1* other) {
std::swap(can_rx_volvo_short_track_roc_, other->can_rx_volvo_short_track_roc_);
std::swap(can_rx_mr_only_transmit_, other->can_rx_mr_only_transmit_);
std::swap(can_rx_lr_only_transmit_, other->can_rx_lr_only_transmit_);
std::swap(can_rx_high_yaw_angle_, other->can_rx_high_yaw_angle_);
std::swap(can_rx_clear_faults_, other->can_rx_clear_faults_);
std::swap(can_rx_use_angle_misalignment_, other->can_rx_use_angle_misalignment_);
std::swap(can_rx_turn_signal_status_, other->can_rx_turn_signal_status_);
std::swap(can_rx_blockage_disable_, other->can_rx_blockage_disable_);
std::swap(can_rx_vehicle_speed_validity_, other->can_rx_vehicle_speed_validity_);
std::swap(can_rx_mmr_upside_down_, other->can_rx_mmr_upside_down_);
std::swap(can_rx_wiper_status_, other->can_rx_wiper_status_);
std::swap(can_rx_raw_data_enable_, other->can_rx_raw_data_enable_);
std::swap(can_rx_radar_cmd_radiate_, other->can_rx_radar_cmd_radiate_);
std::swap(can_rx_grouping_mode_, other->can_rx_grouping_mode_);
std::swap(can_rx_maximum_tracks_, other->can_rx_maximum_tracks_);
std::swap(can_rx_lateral_mounting_offset_, other->can_rx_lateral_mounting_offset_);
std::swap(can_rx_angle_misalignment_, other->can_rx_angle_misalignment_);
std::swap(can_rx_scan_index_ack_, other->can_rx_scan_index_ack_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Vehicle2_4f1::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Vehicle2_4f1_descriptor_;
metadata.reflection = Vehicle2_4f1_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Vehicle2_4f1
// optional double can_rx_volvo_short_track_roc = 1;
bool Vehicle2_4f1::has_can_rx_volvo_short_track_roc() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_volvo_short_track_roc() {
_has_bits_[0] |= 0x00000001u;
}
void Vehicle2_4f1::clear_has_can_rx_volvo_short_track_roc() {
_has_bits_[0] &= ~0x00000001u;
}
void Vehicle2_4f1::clear_can_rx_volvo_short_track_roc() {
can_rx_volvo_short_track_roc_ = 0;
clear_has_can_rx_volvo_short_track_roc();
}
double Vehicle2_4f1::can_rx_volvo_short_track_roc() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_volvo_short_track_roc)
return can_rx_volvo_short_track_roc_;
}
void Vehicle2_4f1::set_can_rx_volvo_short_track_roc(double value) {
set_has_can_rx_volvo_short_track_roc();
can_rx_volvo_short_track_roc_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_volvo_short_track_roc)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_mr_only_transmitType can_rx_mr_only_transmit = 2;
bool Vehicle2_4f1::has_can_rx_mr_only_transmit() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_mr_only_transmit() {
_has_bits_[0] |= 0x00000002u;
}
void Vehicle2_4f1::clear_has_can_rx_mr_only_transmit() {
_has_bits_[0] &= ~0x00000002u;
}
void Vehicle2_4f1::clear_can_rx_mr_only_transmit() {
can_rx_mr_only_transmit_ = 0;
clear_has_can_rx_mr_only_transmit();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_mr_only_transmitType Vehicle2_4f1::can_rx_mr_only_transmit() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_mr_only_transmit)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_mr_only_transmitType >(can_rx_mr_only_transmit_);
}
void Vehicle2_4f1::set_can_rx_mr_only_transmit(::apollo::drivers::Vehicle2_4f1_Can_rx_mr_only_transmitType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_mr_only_transmitType_IsValid(value));
set_has_can_rx_mr_only_transmit();
can_rx_mr_only_transmit_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_mr_only_transmit)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_lr_only_transmitType can_rx_lr_only_transmit = 3;
bool Vehicle2_4f1::has_can_rx_lr_only_transmit() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_lr_only_transmit() {
_has_bits_[0] |= 0x00000004u;
}
void Vehicle2_4f1::clear_has_can_rx_lr_only_transmit() {
_has_bits_[0] &= ~0x00000004u;
}
void Vehicle2_4f1::clear_can_rx_lr_only_transmit() {
can_rx_lr_only_transmit_ = 0;
clear_has_can_rx_lr_only_transmit();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_lr_only_transmitType Vehicle2_4f1::can_rx_lr_only_transmit() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_lr_only_transmit)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_lr_only_transmitType >(can_rx_lr_only_transmit_);
}
void Vehicle2_4f1::set_can_rx_lr_only_transmit(::apollo::drivers::Vehicle2_4f1_Can_rx_lr_only_transmitType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_lr_only_transmitType_IsValid(value));
set_has_can_rx_lr_only_transmit();
can_rx_lr_only_transmit_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_lr_only_transmit)
}
// optional int32 can_rx_high_yaw_angle = 4;
bool Vehicle2_4f1::has_can_rx_high_yaw_angle() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_high_yaw_angle() {
_has_bits_[0] |= 0x00000008u;
}
void Vehicle2_4f1::clear_has_can_rx_high_yaw_angle() {
_has_bits_[0] &= ~0x00000008u;
}
void Vehicle2_4f1::clear_can_rx_high_yaw_angle() {
can_rx_high_yaw_angle_ = 0;
clear_has_can_rx_high_yaw_angle();
}
::google::protobuf::int32 Vehicle2_4f1::can_rx_high_yaw_angle() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_high_yaw_angle)
return can_rx_high_yaw_angle_;
}
void Vehicle2_4f1::set_can_rx_high_yaw_angle(::google::protobuf::int32 value) {
set_has_can_rx_high_yaw_angle();
can_rx_high_yaw_angle_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_high_yaw_angle)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_clear_faultsType can_rx_clear_faults = 5;
bool Vehicle2_4f1::has_can_rx_clear_faults() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_clear_faults() {
_has_bits_[0] |= 0x00000010u;
}
void Vehicle2_4f1::clear_has_can_rx_clear_faults() {
_has_bits_[0] &= ~0x00000010u;
}
void Vehicle2_4f1::clear_can_rx_clear_faults() {
can_rx_clear_faults_ = 0;
clear_has_can_rx_clear_faults();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_clear_faultsType Vehicle2_4f1::can_rx_clear_faults() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_clear_faults)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_clear_faultsType >(can_rx_clear_faults_);
}
void Vehicle2_4f1::set_can_rx_clear_faults(::apollo::drivers::Vehicle2_4f1_Can_rx_clear_faultsType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_clear_faultsType_IsValid(value));
set_has_can_rx_clear_faults();
can_rx_clear_faults_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_clear_faults)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_use_angle_misalignmentType can_rx_use_angle_misalignment = 6;
bool Vehicle2_4f1::has_can_rx_use_angle_misalignment() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_use_angle_misalignment() {
_has_bits_[0] |= 0x00000020u;
}
void Vehicle2_4f1::clear_has_can_rx_use_angle_misalignment() {
_has_bits_[0] &= ~0x00000020u;
}
void Vehicle2_4f1::clear_can_rx_use_angle_misalignment() {
can_rx_use_angle_misalignment_ = 0;
clear_has_can_rx_use_angle_misalignment();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_use_angle_misalignmentType Vehicle2_4f1::can_rx_use_angle_misalignment() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_use_angle_misalignment)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_use_angle_misalignmentType >(can_rx_use_angle_misalignment_);
}
void Vehicle2_4f1::set_can_rx_use_angle_misalignment(::apollo::drivers::Vehicle2_4f1_Can_rx_use_angle_misalignmentType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_use_angle_misalignmentType_IsValid(value));
set_has_can_rx_use_angle_misalignment();
can_rx_use_angle_misalignment_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_use_angle_misalignment)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_turn_signal_statusType can_rx_turn_signal_status = 7;
bool Vehicle2_4f1::has_can_rx_turn_signal_status() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_turn_signal_status() {
_has_bits_[0] |= 0x00000040u;
}
void Vehicle2_4f1::clear_has_can_rx_turn_signal_status() {
_has_bits_[0] &= ~0x00000040u;
}
void Vehicle2_4f1::clear_can_rx_turn_signal_status() {
can_rx_turn_signal_status_ = 0;
clear_has_can_rx_turn_signal_status();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_turn_signal_statusType Vehicle2_4f1::can_rx_turn_signal_status() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_turn_signal_status)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_turn_signal_statusType >(can_rx_turn_signal_status_);
}
void Vehicle2_4f1::set_can_rx_turn_signal_status(::apollo::drivers::Vehicle2_4f1_Can_rx_turn_signal_statusType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_turn_signal_statusType_IsValid(value));
set_has_can_rx_turn_signal_status();
can_rx_turn_signal_status_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_turn_signal_status)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_blockage_disableType can_rx_blockage_disable = 8;
bool Vehicle2_4f1::has_can_rx_blockage_disable() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_blockage_disable() {
_has_bits_[0] |= 0x00000080u;
}
void Vehicle2_4f1::clear_has_can_rx_blockage_disable() {
_has_bits_[0] &= ~0x00000080u;
}
void Vehicle2_4f1::clear_can_rx_blockage_disable() {
can_rx_blockage_disable_ = 0;
clear_has_can_rx_blockage_disable();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_blockage_disableType Vehicle2_4f1::can_rx_blockage_disable() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_blockage_disable)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_blockage_disableType >(can_rx_blockage_disable_);
}
void Vehicle2_4f1::set_can_rx_blockage_disable(::apollo::drivers::Vehicle2_4f1_Can_rx_blockage_disableType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_blockage_disableType_IsValid(value));
set_has_can_rx_blockage_disable();
can_rx_blockage_disable_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_blockage_disable)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_vehicle_speed_validityType can_rx_vehicle_speed_validity = 9;
bool Vehicle2_4f1::has_can_rx_vehicle_speed_validity() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_vehicle_speed_validity() {
_has_bits_[0] |= 0x00000100u;
}
void Vehicle2_4f1::clear_has_can_rx_vehicle_speed_validity() {
_has_bits_[0] &= ~0x00000100u;
}
void Vehicle2_4f1::clear_can_rx_vehicle_speed_validity() {
can_rx_vehicle_speed_validity_ = 0;
clear_has_can_rx_vehicle_speed_validity();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_vehicle_speed_validityType Vehicle2_4f1::can_rx_vehicle_speed_validity() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_vehicle_speed_validity)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_vehicle_speed_validityType >(can_rx_vehicle_speed_validity_);
}
void Vehicle2_4f1::set_can_rx_vehicle_speed_validity(::apollo::drivers::Vehicle2_4f1_Can_rx_vehicle_speed_validityType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_vehicle_speed_validityType_IsValid(value));
set_has_can_rx_vehicle_speed_validity();
can_rx_vehicle_speed_validity_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_vehicle_speed_validity)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_mmr_upside_downType can_rx_mmr_upside_down = 10;
bool Vehicle2_4f1::has_can_rx_mmr_upside_down() const {
return (_has_bits_[0] & 0x00000200u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_mmr_upside_down() {
_has_bits_[0] |= 0x00000200u;
}
void Vehicle2_4f1::clear_has_can_rx_mmr_upside_down() {
_has_bits_[0] &= ~0x00000200u;
}
void Vehicle2_4f1::clear_can_rx_mmr_upside_down() {
can_rx_mmr_upside_down_ = 0;
clear_has_can_rx_mmr_upside_down();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_mmr_upside_downType Vehicle2_4f1::can_rx_mmr_upside_down() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_mmr_upside_down)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_mmr_upside_downType >(can_rx_mmr_upside_down_);
}
void Vehicle2_4f1::set_can_rx_mmr_upside_down(::apollo::drivers::Vehicle2_4f1_Can_rx_mmr_upside_downType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_mmr_upside_downType_IsValid(value));
set_has_can_rx_mmr_upside_down();
can_rx_mmr_upside_down_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_mmr_upside_down)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_wiper_statusType can_rx_wiper_status = 11;
bool Vehicle2_4f1::has_can_rx_wiper_status() const {
return (_has_bits_[0] & 0x00000400u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_wiper_status() {
_has_bits_[0] |= 0x00000400u;
}
void Vehicle2_4f1::clear_has_can_rx_wiper_status() {
_has_bits_[0] &= ~0x00000400u;
}
void Vehicle2_4f1::clear_can_rx_wiper_status() {
can_rx_wiper_status_ = 0;
clear_has_can_rx_wiper_status();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_wiper_statusType Vehicle2_4f1::can_rx_wiper_status() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_wiper_status)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_wiper_statusType >(can_rx_wiper_status_);
}
void Vehicle2_4f1::set_can_rx_wiper_status(::apollo::drivers::Vehicle2_4f1_Can_rx_wiper_statusType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_wiper_statusType_IsValid(value));
set_has_can_rx_wiper_status();
can_rx_wiper_status_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_wiper_status)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_raw_data_enableType can_rx_raw_data_enable = 12;
bool Vehicle2_4f1::has_can_rx_raw_data_enable() const {
return (_has_bits_[0] & 0x00000800u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_raw_data_enable() {
_has_bits_[0] |= 0x00000800u;
}
void Vehicle2_4f1::clear_has_can_rx_raw_data_enable() {
_has_bits_[0] &= ~0x00000800u;
}
void Vehicle2_4f1::clear_can_rx_raw_data_enable() {
can_rx_raw_data_enable_ = 0;
clear_has_can_rx_raw_data_enable();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_raw_data_enableType Vehicle2_4f1::can_rx_raw_data_enable() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_raw_data_enable)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_raw_data_enableType >(can_rx_raw_data_enable_);
}
void Vehicle2_4f1::set_can_rx_raw_data_enable(::apollo::drivers::Vehicle2_4f1_Can_rx_raw_data_enableType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_raw_data_enableType_IsValid(value));
set_has_can_rx_raw_data_enable();
can_rx_raw_data_enable_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_raw_data_enable)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_radar_cmd_radiateType can_rx_radar_cmd_radiate = 13;
bool Vehicle2_4f1::has_can_rx_radar_cmd_radiate() const {
return (_has_bits_[0] & 0x00001000u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_radar_cmd_radiate() {
_has_bits_[0] |= 0x00001000u;
}
void Vehicle2_4f1::clear_has_can_rx_radar_cmd_radiate() {
_has_bits_[0] &= ~0x00001000u;
}
void Vehicle2_4f1::clear_can_rx_radar_cmd_radiate() {
can_rx_radar_cmd_radiate_ = 0;
clear_has_can_rx_radar_cmd_radiate();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_radar_cmd_radiateType Vehicle2_4f1::can_rx_radar_cmd_radiate() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_radar_cmd_radiate)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_radar_cmd_radiateType >(can_rx_radar_cmd_radiate_);
}
void Vehicle2_4f1::set_can_rx_radar_cmd_radiate(::apollo::drivers::Vehicle2_4f1_Can_rx_radar_cmd_radiateType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_radar_cmd_radiateType_IsValid(value));
set_has_can_rx_radar_cmd_radiate();
can_rx_radar_cmd_radiate_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_radar_cmd_radiate)
}
// optional .apollo.drivers.Vehicle2_4f1.Can_rx_grouping_modeType can_rx_grouping_mode = 14;
bool Vehicle2_4f1::has_can_rx_grouping_mode() const {
return (_has_bits_[0] & 0x00002000u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_grouping_mode() {
_has_bits_[0] |= 0x00002000u;
}
void Vehicle2_4f1::clear_has_can_rx_grouping_mode() {
_has_bits_[0] &= ~0x00002000u;
}
void Vehicle2_4f1::clear_can_rx_grouping_mode() {
can_rx_grouping_mode_ = 0;
clear_has_can_rx_grouping_mode();
}
::apollo::drivers::Vehicle2_4f1_Can_rx_grouping_modeType Vehicle2_4f1::can_rx_grouping_mode() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_grouping_mode)
return static_cast< ::apollo::drivers::Vehicle2_4f1_Can_rx_grouping_modeType >(can_rx_grouping_mode_);
}
void Vehicle2_4f1::set_can_rx_grouping_mode(::apollo::drivers::Vehicle2_4f1_Can_rx_grouping_modeType value) {
assert(::apollo::drivers::Vehicle2_4f1_Can_rx_grouping_modeType_IsValid(value));
set_has_can_rx_grouping_mode();
can_rx_grouping_mode_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_grouping_mode)
}
// optional int32 can_rx_maximum_tracks = 15;
bool Vehicle2_4f1::has_can_rx_maximum_tracks() const {
return (_has_bits_[0] & 0x00004000u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_maximum_tracks() {
_has_bits_[0] |= 0x00004000u;
}
void Vehicle2_4f1::clear_has_can_rx_maximum_tracks() {
_has_bits_[0] &= ~0x00004000u;
}
void Vehicle2_4f1::clear_can_rx_maximum_tracks() {
can_rx_maximum_tracks_ = 0;
clear_has_can_rx_maximum_tracks();
}
::google::protobuf::int32 Vehicle2_4f1::can_rx_maximum_tracks() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_maximum_tracks)
return can_rx_maximum_tracks_;
}
void Vehicle2_4f1::set_can_rx_maximum_tracks(::google::protobuf::int32 value) {
set_has_can_rx_maximum_tracks();
can_rx_maximum_tracks_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_maximum_tracks)
}
// optional double can_rx_lateral_mounting_offset = 16;
bool Vehicle2_4f1::has_can_rx_lateral_mounting_offset() const {
return (_has_bits_[0] & 0x00008000u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_lateral_mounting_offset() {
_has_bits_[0] |= 0x00008000u;
}
void Vehicle2_4f1::clear_has_can_rx_lateral_mounting_offset() {
_has_bits_[0] &= ~0x00008000u;
}
void Vehicle2_4f1::clear_can_rx_lateral_mounting_offset() {
can_rx_lateral_mounting_offset_ = 0;
clear_has_can_rx_lateral_mounting_offset();
}
double Vehicle2_4f1::can_rx_lateral_mounting_offset() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_lateral_mounting_offset)
return can_rx_lateral_mounting_offset_;
}
void Vehicle2_4f1::set_can_rx_lateral_mounting_offset(double value) {
set_has_can_rx_lateral_mounting_offset();
can_rx_lateral_mounting_offset_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_lateral_mounting_offset)
}
// optional double can_rx_angle_misalignment = 17;
bool Vehicle2_4f1::has_can_rx_angle_misalignment() const {
return (_has_bits_[0] & 0x00010000u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_angle_misalignment() {
_has_bits_[0] |= 0x00010000u;
}
void Vehicle2_4f1::clear_has_can_rx_angle_misalignment() {
_has_bits_[0] &= ~0x00010000u;
}
void Vehicle2_4f1::clear_can_rx_angle_misalignment() {
can_rx_angle_misalignment_ = 0;
clear_has_can_rx_angle_misalignment();
}
double Vehicle2_4f1::can_rx_angle_misalignment() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_angle_misalignment)
return can_rx_angle_misalignment_;
}
void Vehicle2_4f1::set_can_rx_angle_misalignment(double value) {
set_has_can_rx_angle_misalignment();
can_rx_angle_misalignment_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_angle_misalignment)
}
// optional int32 can_rx_scan_index_ack = 18;
bool Vehicle2_4f1::has_can_rx_scan_index_ack() const {
return (_has_bits_[0] & 0x00020000u) != 0;
}
void Vehicle2_4f1::set_has_can_rx_scan_index_ack() {
_has_bits_[0] |= 0x00020000u;
}
void Vehicle2_4f1::clear_has_can_rx_scan_index_ack() {
_has_bits_[0] &= ~0x00020000u;
}
void Vehicle2_4f1::clear_can_rx_scan_index_ack() {
can_rx_scan_index_ack_ = 0;
clear_has_can_rx_scan_index_ack();
}
::google::protobuf::int32 Vehicle2_4f1::can_rx_scan_index_ack() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle2_4f1.can_rx_scan_index_ack)
return can_rx_scan_index_ack_;
}
void Vehicle2_4f1::set_can_rx_scan_index_ack(::google::protobuf::int32 value) {
set_has_can_rx_scan_index_ack();
can_rx_scan_index_ack_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle2_4f1.can_rx_scan_index_ack)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
const ::google::protobuf::EnumDescriptor* Vehicle1_4f0_Can_rx_steering_angle_validityType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle1_4f0_Can_rx_steering_angle_validityType_descriptor_;
}
bool Vehicle1_4f0_Can_rx_steering_angle_validityType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle1_4f0_Can_rx_steering_angle_validityType Vehicle1_4f0::CAN_RX_STEERING_ANGLE_VALIDITY_INVALID;
const Vehicle1_4f0_Can_rx_steering_angle_validityType Vehicle1_4f0::CAN_RX_STEERING_ANGLE_VALIDITY_VALID;
const Vehicle1_4f0_Can_rx_steering_angle_validityType Vehicle1_4f0::Can_rx_steering_angle_validityType_MIN;
const Vehicle1_4f0_Can_rx_steering_angle_validityType Vehicle1_4f0::Can_rx_steering_angle_validityType_MAX;
const int Vehicle1_4f0::Can_rx_steering_angle_validityType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle1_4f0_Can_rx_steering_angle_signType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle1_4f0_Can_rx_steering_angle_signType_descriptor_;
}
bool Vehicle1_4f0_Can_rx_steering_angle_signType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle1_4f0_Can_rx_steering_angle_signType Vehicle1_4f0::CAN_RX_STEERING_ANGLE_SIGN_COUNTERCLOCKWISE;
const Vehicle1_4f0_Can_rx_steering_angle_signType Vehicle1_4f0::CAN_RX_STEERING_ANGLE_SIGN_CLOCKWISE;
const Vehicle1_4f0_Can_rx_steering_angle_signType Vehicle1_4f0::Can_rx_steering_angle_signType_MIN;
const Vehicle1_4f0_Can_rx_steering_angle_signType Vehicle1_4f0::Can_rx_steering_angle_signType_MAX;
const int Vehicle1_4f0::Can_rx_steering_angle_signType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle1_4f0_Can_rx_steering_angle_rate_signType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle1_4f0_Can_rx_steering_angle_rate_signType_descriptor_;
}
bool Vehicle1_4f0_Can_rx_steering_angle_rate_signType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle1_4f0_Can_rx_steering_angle_rate_signType Vehicle1_4f0::CAN_RX_STEERING_ANGLE_RATE_SIGN_COUNTERCLOCKWISE;
const Vehicle1_4f0_Can_rx_steering_angle_rate_signType Vehicle1_4f0::CAN_RX_STEERING_ANGLE_RATE_SIGN_CLOCKWISE;
const Vehicle1_4f0_Can_rx_steering_angle_rate_signType Vehicle1_4f0::Can_rx_steering_angle_rate_signType_MIN;
const Vehicle1_4f0_Can_rx_steering_angle_rate_signType Vehicle1_4f0::Can_rx_steering_angle_rate_signType_MAX;
const int Vehicle1_4f0::Can_rx_steering_angle_rate_signType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle1_4f0_Can_rx_yaw_rate_validityType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle1_4f0_Can_rx_yaw_rate_validityType_descriptor_;
}
bool Vehicle1_4f0_Can_rx_yaw_rate_validityType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle1_4f0_Can_rx_yaw_rate_validityType Vehicle1_4f0::CAN_RX_YAW_RATE_VALIDITY_INVALID;
const Vehicle1_4f0_Can_rx_yaw_rate_validityType Vehicle1_4f0::CAN_RX_YAW_RATE_VALIDITY_VALID;
const Vehicle1_4f0_Can_rx_yaw_rate_validityType Vehicle1_4f0::Can_rx_yaw_rate_validityType_MIN;
const Vehicle1_4f0_Can_rx_yaw_rate_validityType Vehicle1_4f0::Can_rx_yaw_rate_validityType_MAX;
const int Vehicle1_4f0::Can_rx_yaw_rate_validityType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle1_4f0_Can_rx_vehicle_speed_directionType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle1_4f0_Can_rx_vehicle_speed_directionType_descriptor_;
}
bool Vehicle1_4f0_Can_rx_vehicle_speed_directionType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle1_4f0_Can_rx_vehicle_speed_directionType Vehicle1_4f0::CAN_RX_VEHICLE_SPEED_DIRECTION_FORWARD;
const Vehicle1_4f0_Can_rx_vehicle_speed_directionType Vehicle1_4f0::CAN_RX_VEHICLE_SPEED_DIRECTION_REVERSE;
const Vehicle1_4f0_Can_rx_vehicle_speed_directionType Vehicle1_4f0::Can_rx_vehicle_speed_directionType_MIN;
const Vehicle1_4f0_Can_rx_vehicle_speed_directionType Vehicle1_4f0::Can_rx_vehicle_speed_directionType_MAX;
const int Vehicle1_4f0::Can_rx_vehicle_speed_directionType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Vehicle1_4f0::kCanRxSteeringAngleValidityFieldNumber;
const int Vehicle1_4f0::kCanRxSteeringAngleRateFieldNumber;
const int Vehicle1_4f0::kCanRxSteeringAngleSignFieldNumber;
const int Vehicle1_4f0::kCanRxSteeringAngleRateSignFieldNumber;
const int Vehicle1_4f0::kCanRxSteeringAngleFieldNumber;
const int Vehicle1_4f0::kCanRxRadiusCurvatureFieldNumber;
const int Vehicle1_4f0::kCanRxYawRateValidityFieldNumber;
const int Vehicle1_4f0::kCanRxYawRateFieldNumber;
const int Vehicle1_4f0::kCanRxVehicleSpeedDirectionFieldNumber;
const int Vehicle1_4f0::kCanRxVehicleSpeedFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Vehicle1_4f0::Vehicle1_4f0()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Vehicle1_4f0)
}
void Vehicle1_4f0::InitAsDefaultInstance() {
}
Vehicle1_4f0::Vehicle1_4f0(const Vehicle1_4f0& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Vehicle1_4f0)
}
void Vehicle1_4f0::SharedCtor() {
_cached_size_ = 0;
can_rx_steering_angle_validity_ = 0;
can_rx_steering_angle_rate_ = 0;
can_rx_steering_angle_sign_ = 0;
can_rx_steering_angle_rate_sign_ = 0;
can_rx_steering_angle_ = 0;
can_rx_radius_curvature_ = 0;
can_rx_yaw_rate_validity_ = 0;
can_rx_yaw_rate_ = 0;
can_rx_vehicle_speed_direction_ = 0;
can_rx_vehicle_speed_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Vehicle1_4f0::~Vehicle1_4f0() {
// @@protoc_insertion_point(destructor:apollo.drivers.Vehicle1_4f0)
SharedDtor();
}
void Vehicle1_4f0::SharedDtor() {
if (this != default_instance_) {
}
}
void Vehicle1_4f0::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Vehicle1_4f0::descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle1_4f0_descriptor_;
}
const Vehicle1_4f0& Vehicle1_4f0::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Vehicle1_4f0* Vehicle1_4f0::default_instance_ = NULL;
Vehicle1_4f0* Vehicle1_4f0::New(::google::protobuf::Arena* arena) const {
Vehicle1_4f0* n = new Vehicle1_4f0;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Vehicle1_4f0::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Vehicle1_4f0)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Vehicle1_4f0, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Vehicle1_4f0*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_rx_steering_angle_validity_, can_rx_yaw_rate_validity_);
}
ZR_(can_rx_vehicle_speed_direction_, can_rx_vehicle_speed_);
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Vehicle1_4f0::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Vehicle1_4f0)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_validityType can_rx_steering_angle_validity = 1;
case 1: {
if (tag == 8) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_validityType_IsValid(value)) {
set_can_rx_steering_angle_validity(static_cast< ::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_validityType >(value));
} else {
mutable_unknown_fields()->AddVarint(1, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_rx_steering_angle_rate;
break;
}
// optional int32 can_rx_steering_angle_rate = 2;
case 2: {
if (tag == 16) {
parse_can_rx_steering_angle_rate:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_steering_angle_rate_)));
set_has_can_rx_steering_angle_rate();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_rx_steering_angle_sign;
break;
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_signType can_rx_steering_angle_sign = 3;
case 3: {
if (tag == 24) {
parse_can_rx_steering_angle_sign:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_signType_IsValid(value)) {
set_can_rx_steering_angle_sign(static_cast< ::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_signType >(value));
} else {
mutable_unknown_fields()->AddVarint(3, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_rx_steering_angle_rate_sign;
break;
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_rate_signType can_rx_steering_angle_rate_sign = 4;
case 4: {
if (tag == 32) {
parse_can_rx_steering_angle_rate_sign:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_rate_signType_IsValid(value)) {
set_can_rx_steering_angle_rate_sign(static_cast< ::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_rate_signType >(value));
} else {
mutable_unknown_fields()->AddVarint(4, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_rx_steering_angle;
break;
}
// optional int32 can_rx_steering_angle = 5;
case 5: {
if (tag == 40) {
parse_can_rx_steering_angle:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_steering_angle_)));
set_has_can_rx_steering_angle();
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_rx_radius_curvature;
break;
}
// optional int32 can_rx_radius_curvature = 6;
case 6: {
if (tag == 48) {
parse_can_rx_radius_curvature:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_radius_curvature_)));
set_has_can_rx_radius_curvature();
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_rx_yaw_rate_validity;
break;
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_yaw_rate_validityType can_rx_yaw_rate_validity = 7;
case 7: {
if (tag == 56) {
parse_can_rx_yaw_rate_validity:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle1_4f0_Can_rx_yaw_rate_validityType_IsValid(value)) {
set_can_rx_yaw_rate_validity(static_cast< ::apollo::drivers::Vehicle1_4f0_Can_rx_yaw_rate_validityType >(value));
} else {
mutable_unknown_fields()->AddVarint(7, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(65)) goto parse_can_rx_yaw_rate;
break;
}
// optional double can_rx_yaw_rate = 8;
case 8: {
if (tag == 65) {
parse_can_rx_yaw_rate:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_yaw_rate_)));
set_has_can_rx_yaw_rate();
} else {
goto handle_unusual;
}
if (input->ExpectTag(72)) goto parse_can_rx_vehicle_speed_direction;
break;
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_vehicle_speed_directionType can_rx_vehicle_speed_direction = 9;
case 9: {
if (tag == 72) {
parse_can_rx_vehicle_speed_direction:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle1_4f0_Can_rx_vehicle_speed_directionType_IsValid(value)) {
set_can_rx_vehicle_speed_direction(static_cast< ::apollo::drivers::Vehicle1_4f0_Can_rx_vehicle_speed_directionType >(value));
} else {
mutable_unknown_fields()->AddVarint(9, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(81)) goto parse_can_rx_vehicle_speed;
break;
}
// optional double can_rx_vehicle_speed = 10;
case 10: {
if (tag == 81) {
parse_can_rx_vehicle_speed:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_vehicle_speed_)));
set_has_can_rx_vehicle_speed();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Vehicle1_4f0)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Vehicle1_4f0)
return false;
#undef DO_
}
void Vehicle1_4f0::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Vehicle1_4f0)
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_validityType can_rx_steering_angle_validity = 1;
if (has_can_rx_steering_angle_validity()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->can_rx_steering_angle_validity(), output);
}
// optional int32 can_rx_steering_angle_rate = 2;
if (has_can_rx_steering_angle_rate()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->can_rx_steering_angle_rate(), output);
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_signType can_rx_steering_angle_sign = 3;
if (has_can_rx_steering_angle_sign()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
3, this->can_rx_steering_angle_sign(), output);
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_rate_signType can_rx_steering_angle_rate_sign = 4;
if (has_can_rx_steering_angle_rate_sign()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
4, this->can_rx_steering_angle_rate_sign(), output);
}
// optional int32 can_rx_steering_angle = 5;
if (has_can_rx_steering_angle()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->can_rx_steering_angle(), output);
}
// optional int32 can_rx_radius_curvature = 6;
if (has_can_rx_radius_curvature()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->can_rx_radius_curvature(), output);
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_yaw_rate_validityType can_rx_yaw_rate_validity = 7;
if (has_can_rx_yaw_rate_validity()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
7, this->can_rx_yaw_rate_validity(), output);
}
// optional double can_rx_yaw_rate = 8;
if (has_can_rx_yaw_rate()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(8, this->can_rx_yaw_rate(), output);
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_vehicle_speed_directionType can_rx_vehicle_speed_direction = 9;
if (has_can_rx_vehicle_speed_direction()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
9, this->can_rx_vehicle_speed_direction(), output);
}
// optional double can_rx_vehicle_speed = 10;
if (has_can_rx_vehicle_speed()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(10, this->can_rx_vehicle_speed(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Vehicle1_4f0)
}
::google::protobuf::uint8* Vehicle1_4f0::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Vehicle1_4f0)
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_validityType can_rx_steering_angle_validity = 1;
if (has_can_rx_steering_angle_validity()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->can_rx_steering_angle_validity(), target);
}
// optional int32 can_rx_steering_angle_rate = 2;
if (has_can_rx_steering_angle_rate()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->can_rx_steering_angle_rate(), target);
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_signType can_rx_steering_angle_sign = 3;
if (has_can_rx_steering_angle_sign()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
3, this->can_rx_steering_angle_sign(), target);
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_rate_signType can_rx_steering_angle_rate_sign = 4;
if (has_can_rx_steering_angle_rate_sign()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4, this->can_rx_steering_angle_rate_sign(), target);
}
// optional int32 can_rx_steering_angle = 5;
if (has_can_rx_steering_angle()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->can_rx_steering_angle(), target);
}
// optional int32 can_rx_radius_curvature = 6;
if (has_can_rx_radius_curvature()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->can_rx_radius_curvature(), target);
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_yaw_rate_validityType can_rx_yaw_rate_validity = 7;
if (has_can_rx_yaw_rate_validity()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
7, this->can_rx_yaw_rate_validity(), target);
}
// optional double can_rx_yaw_rate = 8;
if (has_can_rx_yaw_rate()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(8, this->can_rx_yaw_rate(), target);
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_vehicle_speed_directionType can_rx_vehicle_speed_direction = 9;
if (has_can_rx_vehicle_speed_direction()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
9, this->can_rx_vehicle_speed_direction(), target);
}
// optional double can_rx_vehicle_speed = 10;
if (has_can_rx_vehicle_speed()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(10, this->can_rx_vehicle_speed(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Vehicle1_4f0)
return target;
}
int Vehicle1_4f0::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Vehicle1_4f0)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_validityType can_rx_steering_angle_validity = 1;
if (has_can_rx_steering_angle_validity()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_steering_angle_validity());
}
// optional int32 can_rx_steering_angle_rate = 2;
if (has_can_rx_steering_angle_rate()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_steering_angle_rate());
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_signType can_rx_steering_angle_sign = 3;
if (has_can_rx_steering_angle_sign()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_steering_angle_sign());
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_rate_signType can_rx_steering_angle_rate_sign = 4;
if (has_can_rx_steering_angle_rate_sign()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_steering_angle_rate_sign());
}
// optional int32 can_rx_steering_angle = 5;
if (has_can_rx_steering_angle()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_steering_angle());
}
// optional int32 can_rx_radius_curvature = 6;
if (has_can_rx_radius_curvature()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_radius_curvature());
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_yaw_rate_validityType can_rx_yaw_rate_validity = 7;
if (has_can_rx_yaw_rate_validity()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_yaw_rate_validity());
}
// optional double can_rx_yaw_rate = 8;
if (has_can_rx_yaw_rate()) {
total_size += 1 + 8;
}
}
if (_has_bits_[8 / 32] & 768u) {
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_vehicle_speed_directionType can_rx_vehicle_speed_direction = 9;
if (has_can_rx_vehicle_speed_direction()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_vehicle_speed_direction());
}
// optional double can_rx_vehicle_speed = 10;
if (has_can_rx_vehicle_speed()) {
total_size += 1 + 8;
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Vehicle1_4f0::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Vehicle1_4f0)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Vehicle1_4f0* source =
::google::protobuf::internal::DynamicCastToGenerated<const Vehicle1_4f0>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Vehicle1_4f0)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Vehicle1_4f0)
MergeFrom(*source);
}
}
void Vehicle1_4f0::MergeFrom(const Vehicle1_4f0& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Vehicle1_4f0)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_rx_steering_angle_validity()) {
set_can_rx_steering_angle_validity(from.can_rx_steering_angle_validity());
}
if (from.has_can_rx_steering_angle_rate()) {
set_can_rx_steering_angle_rate(from.can_rx_steering_angle_rate());
}
if (from.has_can_rx_steering_angle_sign()) {
set_can_rx_steering_angle_sign(from.can_rx_steering_angle_sign());
}
if (from.has_can_rx_steering_angle_rate_sign()) {
set_can_rx_steering_angle_rate_sign(from.can_rx_steering_angle_rate_sign());
}
if (from.has_can_rx_steering_angle()) {
set_can_rx_steering_angle(from.can_rx_steering_angle());
}
if (from.has_can_rx_radius_curvature()) {
set_can_rx_radius_curvature(from.can_rx_radius_curvature());
}
if (from.has_can_rx_yaw_rate_validity()) {
set_can_rx_yaw_rate_validity(from.can_rx_yaw_rate_validity());
}
if (from.has_can_rx_yaw_rate()) {
set_can_rx_yaw_rate(from.can_rx_yaw_rate());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_can_rx_vehicle_speed_direction()) {
set_can_rx_vehicle_speed_direction(from.can_rx_vehicle_speed_direction());
}
if (from.has_can_rx_vehicle_speed()) {
set_can_rx_vehicle_speed(from.can_rx_vehicle_speed());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Vehicle1_4f0::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Vehicle1_4f0)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Vehicle1_4f0::CopyFrom(const Vehicle1_4f0& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Vehicle1_4f0)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Vehicle1_4f0::IsInitialized() const {
return true;
}
void Vehicle1_4f0::Swap(Vehicle1_4f0* other) {
if (other == this) return;
InternalSwap(other);
}
void Vehicle1_4f0::InternalSwap(Vehicle1_4f0* other) {
std::swap(can_rx_steering_angle_validity_, other->can_rx_steering_angle_validity_);
std::swap(can_rx_steering_angle_rate_, other->can_rx_steering_angle_rate_);
std::swap(can_rx_steering_angle_sign_, other->can_rx_steering_angle_sign_);
std::swap(can_rx_steering_angle_rate_sign_, other->can_rx_steering_angle_rate_sign_);
std::swap(can_rx_steering_angle_, other->can_rx_steering_angle_);
std::swap(can_rx_radius_curvature_, other->can_rx_radius_curvature_);
std::swap(can_rx_yaw_rate_validity_, other->can_rx_yaw_rate_validity_);
std::swap(can_rx_yaw_rate_, other->can_rx_yaw_rate_);
std::swap(can_rx_vehicle_speed_direction_, other->can_rx_vehicle_speed_direction_);
std::swap(can_rx_vehicle_speed_, other->can_rx_vehicle_speed_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Vehicle1_4f0::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Vehicle1_4f0_descriptor_;
metadata.reflection = Vehicle1_4f0_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Vehicle1_4f0
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_validityType can_rx_steering_angle_validity = 1;
bool Vehicle1_4f0::has_can_rx_steering_angle_validity() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Vehicle1_4f0::set_has_can_rx_steering_angle_validity() {
_has_bits_[0] |= 0x00000001u;
}
void Vehicle1_4f0::clear_has_can_rx_steering_angle_validity() {
_has_bits_[0] &= ~0x00000001u;
}
void Vehicle1_4f0::clear_can_rx_steering_angle_validity() {
can_rx_steering_angle_validity_ = 0;
clear_has_can_rx_steering_angle_validity();
}
::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_validityType Vehicle1_4f0::can_rx_steering_angle_validity() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle1_4f0.can_rx_steering_angle_validity)
return static_cast< ::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_validityType >(can_rx_steering_angle_validity_);
}
void Vehicle1_4f0::set_can_rx_steering_angle_validity(::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_validityType value) {
assert(::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_validityType_IsValid(value));
set_has_can_rx_steering_angle_validity();
can_rx_steering_angle_validity_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle1_4f0.can_rx_steering_angle_validity)
}
// optional int32 can_rx_steering_angle_rate = 2;
bool Vehicle1_4f0::has_can_rx_steering_angle_rate() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Vehicle1_4f0::set_has_can_rx_steering_angle_rate() {
_has_bits_[0] |= 0x00000002u;
}
void Vehicle1_4f0::clear_has_can_rx_steering_angle_rate() {
_has_bits_[0] &= ~0x00000002u;
}
void Vehicle1_4f0::clear_can_rx_steering_angle_rate() {
can_rx_steering_angle_rate_ = 0;
clear_has_can_rx_steering_angle_rate();
}
::google::protobuf::int32 Vehicle1_4f0::can_rx_steering_angle_rate() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle1_4f0.can_rx_steering_angle_rate)
return can_rx_steering_angle_rate_;
}
void Vehicle1_4f0::set_can_rx_steering_angle_rate(::google::protobuf::int32 value) {
set_has_can_rx_steering_angle_rate();
can_rx_steering_angle_rate_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle1_4f0.can_rx_steering_angle_rate)
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_signType can_rx_steering_angle_sign = 3;
bool Vehicle1_4f0::has_can_rx_steering_angle_sign() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Vehicle1_4f0::set_has_can_rx_steering_angle_sign() {
_has_bits_[0] |= 0x00000004u;
}
void Vehicle1_4f0::clear_has_can_rx_steering_angle_sign() {
_has_bits_[0] &= ~0x00000004u;
}
void Vehicle1_4f0::clear_can_rx_steering_angle_sign() {
can_rx_steering_angle_sign_ = 0;
clear_has_can_rx_steering_angle_sign();
}
::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_signType Vehicle1_4f0::can_rx_steering_angle_sign() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle1_4f0.can_rx_steering_angle_sign)
return static_cast< ::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_signType >(can_rx_steering_angle_sign_);
}
void Vehicle1_4f0::set_can_rx_steering_angle_sign(::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_signType value) {
assert(::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_signType_IsValid(value));
set_has_can_rx_steering_angle_sign();
can_rx_steering_angle_sign_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle1_4f0.can_rx_steering_angle_sign)
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_steering_angle_rate_signType can_rx_steering_angle_rate_sign = 4;
bool Vehicle1_4f0::has_can_rx_steering_angle_rate_sign() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Vehicle1_4f0::set_has_can_rx_steering_angle_rate_sign() {
_has_bits_[0] |= 0x00000008u;
}
void Vehicle1_4f0::clear_has_can_rx_steering_angle_rate_sign() {
_has_bits_[0] &= ~0x00000008u;
}
void Vehicle1_4f0::clear_can_rx_steering_angle_rate_sign() {
can_rx_steering_angle_rate_sign_ = 0;
clear_has_can_rx_steering_angle_rate_sign();
}
::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_rate_signType Vehicle1_4f0::can_rx_steering_angle_rate_sign() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle1_4f0.can_rx_steering_angle_rate_sign)
return static_cast< ::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_rate_signType >(can_rx_steering_angle_rate_sign_);
}
void Vehicle1_4f0::set_can_rx_steering_angle_rate_sign(::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_rate_signType value) {
assert(::apollo::drivers::Vehicle1_4f0_Can_rx_steering_angle_rate_signType_IsValid(value));
set_has_can_rx_steering_angle_rate_sign();
can_rx_steering_angle_rate_sign_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle1_4f0.can_rx_steering_angle_rate_sign)
}
// optional int32 can_rx_steering_angle = 5;
bool Vehicle1_4f0::has_can_rx_steering_angle() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Vehicle1_4f0::set_has_can_rx_steering_angle() {
_has_bits_[0] |= 0x00000010u;
}
void Vehicle1_4f0::clear_has_can_rx_steering_angle() {
_has_bits_[0] &= ~0x00000010u;
}
void Vehicle1_4f0::clear_can_rx_steering_angle() {
can_rx_steering_angle_ = 0;
clear_has_can_rx_steering_angle();
}
::google::protobuf::int32 Vehicle1_4f0::can_rx_steering_angle() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle1_4f0.can_rx_steering_angle)
return can_rx_steering_angle_;
}
void Vehicle1_4f0::set_can_rx_steering_angle(::google::protobuf::int32 value) {
set_has_can_rx_steering_angle();
can_rx_steering_angle_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle1_4f0.can_rx_steering_angle)
}
// optional int32 can_rx_radius_curvature = 6;
bool Vehicle1_4f0::has_can_rx_radius_curvature() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Vehicle1_4f0::set_has_can_rx_radius_curvature() {
_has_bits_[0] |= 0x00000020u;
}
void Vehicle1_4f0::clear_has_can_rx_radius_curvature() {
_has_bits_[0] &= ~0x00000020u;
}
void Vehicle1_4f0::clear_can_rx_radius_curvature() {
can_rx_radius_curvature_ = 0;
clear_has_can_rx_radius_curvature();
}
::google::protobuf::int32 Vehicle1_4f0::can_rx_radius_curvature() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle1_4f0.can_rx_radius_curvature)
return can_rx_radius_curvature_;
}
void Vehicle1_4f0::set_can_rx_radius_curvature(::google::protobuf::int32 value) {
set_has_can_rx_radius_curvature();
can_rx_radius_curvature_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle1_4f0.can_rx_radius_curvature)
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_yaw_rate_validityType can_rx_yaw_rate_validity = 7;
bool Vehicle1_4f0::has_can_rx_yaw_rate_validity() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Vehicle1_4f0::set_has_can_rx_yaw_rate_validity() {
_has_bits_[0] |= 0x00000040u;
}
void Vehicle1_4f0::clear_has_can_rx_yaw_rate_validity() {
_has_bits_[0] &= ~0x00000040u;
}
void Vehicle1_4f0::clear_can_rx_yaw_rate_validity() {
can_rx_yaw_rate_validity_ = 0;
clear_has_can_rx_yaw_rate_validity();
}
::apollo::drivers::Vehicle1_4f0_Can_rx_yaw_rate_validityType Vehicle1_4f0::can_rx_yaw_rate_validity() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle1_4f0.can_rx_yaw_rate_validity)
return static_cast< ::apollo::drivers::Vehicle1_4f0_Can_rx_yaw_rate_validityType >(can_rx_yaw_rate_validity_);
}
void Vehicle1_4f0::set_can_rx_yaw_rate_validity(::apollo::drivers::Vehicle1_4f0_Can_rx_yaw_rate_validityType value) {
assert(::apollo::drivers::Vehicle1_4f0_Can_rx_yaw_rate_validityType_IsValid(value));
set_has_can_rx_yaw_rate_validity();
can_rx_yaw_rate_validity_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle1_4f0.can_rx_yaw_rate_validity)
}
// optional double can_rx_yaw_rate = 8;
bool Vehicle1_4f0::has_can_rx_yaw_rate() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Vehicle1_4f0::set_has_can_rx_yaw_rate() {
_has_bits_[0] |= 0x00000080u;
}
void Vehicle1_4f0::clear_has_can_rx_yaw_rate() {
_has_bits_[0] &= ~0x00000080u;
}
void Vehicle1_4f0::clear_can_rx_yaw_rate() {
can_rx_yaw_rate_ = 0;
clear_has_can_rx_yaw_rate();
}
double Vehicle1_4f0::can_rx_yaw_rate() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle1_4f0.can_rx_yaw_rate)
return can_rx_yaw_rate_;
}
void Vehicle1_4f0::set_can_rx_yaw_rate(double value) {
set_has_can_rx_yaw_rate();
can_rx_yaw_rate_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle1_4f0.can_rx_yaw_rate)
}
// optional .apollo.drivers.Vehicle1_4f0.Can_rx_vehicle_speed_directionType can_rx_vehicle_speed_direction = 9;
bool Vehicle1_4f0::has_can_rx_vehicle_speed_direction() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
void Vehicle1_4f0::set_has_can_rx_vehicle_speed_direction() {
_has_bits_[0] |= 0x00000100u;
}
void Vehicle1_4f0::clear_has_can_rx_vehicle_speed_direction() {
_has_bits_[0] &= ~0x00000100u;
}
void Vehicle1_4f0::clear_can_rx_vehicle_speed_direction() {
can_rx_vehicle_speed_direction_ = 0;
clear_has_can_rx_vehicle_speed_direction();
}
::apollo::drivers::Vehicle1_4f0_Can_rx_vehicle_speed_directionType Vehicle1_4f0::can_rx_vehicle_speed_direction() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle1_4f0.can_rx_vehicle_speed_direction)
return static_cast< ::apollo::drivers::Vehicle1_4f0_Can_rx_vehicle_speed_directionType >(can_rx_vehicle_speed_direction_);
}
void Vehicle1_4f0::set_can_rx_vehicle_speed_direction(::apollo::drivers::Vehicle1_4f0_Can_rx_vehicle_speed_directionType value) {
assert(::apollo::drivers::Vehicle1_4f0_Can_rx_vehicle_speed_directionType_IsValid(value));
set_has_can_rx_vehicle_speed_direction();
can_rx_vehicle_speed_direction_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle1_4f0.can_rx_vehicle_speed_direction)
}
// optional double can_rx_vehicle_speed = 10;
bool Vehicle1_4f0::has_can_rx_vehicle_speed() const {
return (_has_bits_[0] & 0x00000200u) != 0;
}
void Vehicle1_4f0::set_has_can_rx_vehicle_speed() {
_has_bits_[0] |= 0x00000200u;
}
void Vehicle1_4f0::clear_has_can_rx_vehicle_speed() {
_has_bits_[0] &= ~0x00000200u;
}
void Vehicle1_4f0::clear_can_rx_vehicle_speed() {
can_rx_vehicle_speed_ = 0;
clear_has_can_rx_vehicle_speed();
}
double Vehicle1_4f0::can_rx_vehicle_speed() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle1_4f0.can_rx_vehicle_speed)
return can_rx_vehicle_speed_;
}
void Vehicle1_4f0::set_can_rx_vehicle_speed(double value) {
set_has_can_rx_vehicle_speed();
can_rx_vehicle_speed_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle1_4f0.can_rx_vehicle_speed)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
const ::google::protobuf::EnumDescriptor* Esr_sim1_5c0_Can_rx_sim_track_idType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_sim1_5c0_Can_rx_sim_track_idType_descriptor_;
}
bool Esr_sim1_5c0_Can_rx_sim_track_idType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_sim1_5c0_Can_rx_sim_track_idType Esr_sim1_5c0::CAN_RX_SIM_TRACK_ID_NO_TARGET;
const Esr_sim1_5c0_Can_rx_sim_track_idType Esr_sim1_5c0::CAN_RX_SIM_TRACK_ID_TARGET_1;
const Esr_sim1_5c0_Can_rx_sim_track_idType Esr_sim1_5c0::CAN_RX_SIM_TRACK_ID_TARGET_2;
const Esr_sim1_5c0_Can_rx_sim_track_idType Esr_sim1_5c0::Can_rx_sim_track_idType_MIN;
const Esr_sim1_5c0_Can_rx_sim_track_idType Esr_sim1_5c0::Can_rx_sim_track_idType_MAX;
const int Esr_sim1_5c0::Can_rx_sim_track_idType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_sim1_5c0_Can_rx_sim_statusType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_sim1_5c0_Can_rx_sim_statusType_descriptor_;
}
bool Esr_sim1_5c0_Can_rx_sim_statusType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_sim1_5c0_Can_rx_sim_statusType Esr_sim1_5c0::CAN_RX_SIM_STATUS_INVALID;
const Esr_sim1_5c0_Can_rx_sim_statusType Esr_sim1_5c0::CAN_RX_SIM_STATUS_NEW;
const Esr_sim1_5c0_Can_rx_sim_statusType Esr_sim1_5c0::CAN_RX_SIM_STATUS_UPDATED;
const Esr_sim1_5c0_Can_rx_sim_statusType Esr_sim1_5c0::CAN_RX_SIM_STATUS_COASTED;
const Esr_sim1_5c0_Can_rx_sim_statusType Esr_sim1_5c0::Can_rx_sim_statusType_MIN;
const Esr_sim1_5c0_Can_rx_sim_statusType Esr_sim1_5c0::Can_rx_sim_statusType_MAX;
const int Esr_sim1_5c0::Can_rx_sim_statusType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_sim1_5c0_Can_rx_sim_functionType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_sim1_5c0_Can_rx_sim_functionType_descriptor_;
}
bool Esr_sim1_5c0_Can_rx_sim_functionType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::CAN_RX_SIM_FUNCTION_ACC;
const Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::CAN_RX_SIM_FUNCTION_RI;
const Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::CAN_RX_SIM_FUNCTION_FCW_MOVE;
const Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::CAN_RX_SIM_FUNCTION_FCW_STAT;
const Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::CAN_RX_SIM_FUNCTION_CMBB_MOVE;
const Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::CAN_RX_SIM_FUNCTION_CMBB_STAT;
const Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::CAN_RX_SIM_FUNCTION_ALL_MOVING_ACC_FCW_CMBB;
const Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::CAN_RX_SIM_FUNCTION_ALL_STAT_RI_FCW_CMBB;
const Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::Can_rx_sim_functionType_MIN;
const Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::Can_rx_sim_functionType_MAX;
const int Esr_sim1_5c0::Can_rx_sim_functionType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_sim1_5c0::kCanRxSimTrackIdFieldNumber;
const int Esr_sim1_5c0::kCanRxSimStatusFieldNumber;
const int Esr_sim1_5c0::kCanRxSimRangeRateFieldNumber;
const int Esr_sim1_5c0::kCanRxSimRangeAccelFieldNumber;
const int Esr_sim1_5c0::kCanRxSimRangeFieldNumber;
const int Esr_sim1_5c0::kCanRxSimLatRateFieldNumber;
const int Esr_sim1_5c0::kCanRxSimLatPosFieldNumber;
const int Esr_sim1_5c0::kCanRxSimFunctionFieldNumber;
const int Esr_sim1_5c0::kCanRxSimAngleFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_sim1_5c0::Esr_sim1_5c0()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_sim1_5c0)
}
void Esr_sim1_5c0::InitAsDefaultInstance() {
}
Esr_sim1_5c0::Esr_sim1_5c0(const Esr_sim1_5c0& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_sim1_5c0)
}
void Esr_sim1_5c0::SharedCtor() {
_cached_size_ = 0;
can_rx_sim_track_id_ = 0;
can_rx_sim_status_ = 0;
can_rx_sim_range_rate_ = 0;
can_rx_sim_range_accel_ = 0;
can_rx_sim_range_ = 0;
can_rx_sim_lat_rate_ = 0;
can_rx_sim_lat_pos_ = 0;
can_rx_sim_function_ = 0;
can_rx_sim_angle_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_sim1_5c0::~Esr_sim1_5c0() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_sim1_5c0)
SharedDtor();
}
void Esr_sim1_5c0::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_sim1_5c0::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_sim1_5c0::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_sim1_5c0_descriptor_;
}
const Esr_sim1_5c0& Esr_sim1_5c0::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_sim1_5c0* Esr_sim1_5c0::default_instance_ = NULL;
Esr_sim1_5c0* Esr_sim1_5c0::New(::google::protobuf::Arena* arena) const {
Esr_sim1_5c0* n = new Esr_sim1_5c0;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_sim1_5c0::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_sim1_5c0)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_sim1_5c0, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_sim1_5c0*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_rx_sim_track_id_, can_rx_sim_lat_pos_);
}
can_rx_sim_angle_ = 0;
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_sim1_5c0::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_sim1_5c0)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_track_idType can_rx_sim_track_id = 1;
case 1: {
if (tag == 8) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_track_idType_IsValid(value)) {
set_can_rx_sim_track_id(static_cast< ::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_track_idType >(value));
} else {
mutable_unknown_fields()->AddVarint(1, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_rx_sim_status;
break;
}
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_statusType can_rx_sim_status = 2;
case 2: {
if (tag == 16) {
parse_can_rx_sim_status:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_statusType_IsValid(value)) {
set_can_rx_sim_status(static_cast< ::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_statusType >(value));
} else {
mutable_unknown_fields()->AddVarint(2, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(25)) goto parse_can_rx_sim_range_rate;
break;
}
// optional double can_rx_sim_range_rate = 3;
case 3: {
if (tag == 25) {
parse_can_rx_sim_range_rate:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_sim_range_rate_)));
set_has_can_rx_sim_range_rate();
} else {
goto handle_unusual;
}
if (input->ExpectTag(33)) goto parse_can_rx_sim_range_accel;
break;
}
// optional double can_rx_sim_range_accel = 4;
case 4: {
if (tag == 33) {
parse_can_rx_sim_range_accel:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_sim_range_accel_)));
set_has_can_rx_sim_range_accel();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_rx_sim_range;
break;
}
// optional int32 can_rx_sim_range = 5;
case 5: {
if (tag == 40) {
parse_can_rx_sim_range:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_sim_range_)));
set_has_can_rx_sim_range();
} else {
goto handle_unusual;
}
if (input->ExpectTag(49)) goto parse_can_rx_sim_lat_rate;
break;
}
// optional double can_rx_sim_lat_rate = 6;
case 6: {
if (tag == 49) {
parse_can_rx_sim_lat_rate:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_sim_lat_rate_)));
set_has_can_rx_sim_lat_rate();
} else {
goto handle_unusual;
}
if (input->ExpectTag(57)) goto parse_can_rx_sim_lat_pos;
break;
}
// optional double can_rx_sim_lat_pos = 7;
case 7: {
if (tag == 57) {
parse_can_rx_sim_lat_pos:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_sim_lat_pos_)));
set_has_can_rx_sim_lat_pos();
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_can_rx_sim_function;
break;
}
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_functionType can_rx_sim_function = 8;
case 8: {
if (tag == 64) {
parse_can_rx_sim_function:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_functionType_IsValid(value)) {
set_can_rx_sim_function(static_cast< ::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_functionType >(value));
} else {
mutable_unknown_fields()->AddVarint(8, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(73)) goto parse_can_rx_sim_angle;
break;
}
// optional double can_rx_sim_angle = 9;
case 9: {
if (tag == 73) {
parse_can_rx_sim_angle:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_sim_angle_)));
set_has_can_rx_sim_angle();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_sim1_5c0)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_sim1_5c0)
return false;
#undef DO_
}
void Esr_sim1_5c0::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_sim1_5c0)
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_track_idType can_rx_sim_track_id = 1;
if (has_can_rx_sim_track_id()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->can_rx_sim_track_id(), output);
}
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_statusType can_rx_sim_status = 2;
if (has_can_rx_sim_status()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
2, this->can_rx_sim_status(), output);
}
// optional double can_rx_sim_range_rate = 3;
if (has_can_rx_sim_range_rate()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->can_rx_sim_range_rate(), output);
}
// optional double can_rx_sim_range_accel = 4;
if (has_can_rx_sim_range_accel()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->can_rx_sim_range_accel(), output);
}
// optional int32 can_rx_sim_range = 5;
if (has_can_rx_sim_range()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->can_rx_sim_range(), output);
}
// optional double can_rx_sim_lat_rate = 6;
if (has_can_rx_sim_lat_rate()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->can_rx_sim_lat_rate(), output);
}
// optional double can_rx_sim_lat_pos = 7;
if (has_can_rx_sim_lat_pos()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(7, this->can_rx_sim_lat_pos(), output);
}
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_functionType can_rx_sim_function = 8;
if (has_can_rx_sim_function()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
8, this->can_rx_sim_function(), output);
}
// optional double can_rx_sim_angle = 9;
if (has_can_rx_sim_angle()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(9, this->can_rx_sim_angle(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_sim1_5c0)
}
::google::protobuf::uint8* Esr_sim1_5c0::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_sim1_5c0)
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_track_idType can_rx_sim_track_id = 1;
if (has_can_rx_sim_track_id()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->can_rx_sim_track_id(), target);
}
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_statusType can_rx_sim_status = 2;
if (has_can_rx_sim_status()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2, this->can_rx_sim_status(), target);
}
// optional double can_rx_sim_range_rate = 3;
if (has_can_rx_sim_range_rate()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->can_rx_sim_range_rate(), target);
}
// optional double can_rx_sim_range_accel = 4;
if (has_can_rx_sim_range_accel()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->can_rx_sim_range_accel(), target);
}
// optional int32 can_rx_sim_range = 5;
if (has_can_rx_sim_range()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->can_rx_sim_range(), target);
}
// optional double can_rx_sim_lat_rate = 6;
if (has_can_rx_sim_lat_rate()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->can_rx_sim_lat_rate(), target);
}
// optional double can_rx_sim_lat_pos = 7;
if (has_can_rx_sim_lat_pos()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(7, this->can_rx_sim_lat_pos(), target);
}
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_functionType can_rx_sim_function = 8;
if (has_can_rx_sim_function()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
8, this->can_rx_sim_function(), target);
}
// optional double can_rx_sim_angle = 9;
if (has_can_rx_sim_angle()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(9, this->can_rx_sim_angle(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_sim1_5c0)
return target;
}
int Esr_sim1_5c0::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_sim1_5c0)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_track_idType can_rx_sim_track_id = 1;
if (has_can_rx_sim_track_id()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_sim_track_id());
}
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_statusType can_rx_sim_status = 2;
if (has_can_rx_sim_status()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_sim_status());
}
// optional double can_rx_sim_range_rate = 3;
if (has_can_rx_sim_range_rate()) {
total_size += 1 + 8;
}
// optional double can_rx_sim_range_accel = 4;
if (has_can_rx_sim_range_accel()) {
total_size += 1 + 8;
}
// optional int32 can_rx_sim_range = 5;
if (has_can_rx_sim_range()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_sim_range());
}
// optional double can_rx_sim_lat_rate = 6;
if (has_can_rx_sim_lat_rate()) {
total_size += 1 + 8;
}
// optional double can_rx_sim_lat_pos = 7;
if (has_can_rx_sim_lat_pos()) {
total_size += 1 + 8;
}
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_functionType can_rx_sim_function = 8;
if (has_can_rx_sim_function()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_sim_function());
}
}
// optional double can_rx_sim_angle = 9;
if (has_can_rx_sim_angle()) {
total_size += 1 + 8;
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_sim1_5c0::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_sim1_5c0)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_sim1_5c0* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_sim1_5c0>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_sim1_5c0)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_sim1_5c0)
MergeFrom(*source);
}
}
void Esr_sim1_5c0::MergeFrom(const Esr_sim1_5c0& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_sim1_5c0)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_rx_sim_track_id()) {
set_can_rx_sim_track_id(from.can_rx_sim_track_id());
}
if (from.has_can_rx_sim_status()) {
set_can_rx_sim_status(from.can_rx_sim_status());
}
if (from.has_can_rx_sim_range_rate()) {
set_can_rx_sim_range_rate(from.can_rx_sim_range_rate());
}
if (from.has_can_rx_sim_range_accel()) {
set_can_rx_sim_range_accel(from.can_rx_sim_range_accel());
}
if (from.has_can_rx_sim_range()) {
set_can_rx_sim_range(from.can_rx_sim_range());
}
if (from.has_can_rx_sim_lat_rate()) {
set_can_rx_sim_lat_rate(from.can_rx_sim_lat_rate());
}
if (from.has_can_rx_sim_lat_pos()) {
set_can_rx_sim_lat_pos(from.can_rx_sim_lat_pos());
}
if (from.has_can_rx_sim_function()) {
set_can_rx_sim_function(from.can_rx_sim_function());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_can_rx_sim_angle()) {
set_can_rx_sim_angle(from.can_rx_sim_angle());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_sim1_5c0::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_sim1_5c0)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_sim1_5c0::CopyFrom(const Esr_sim1_5c0& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_sim1_5c0)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_sim1_5c0::IsInitialized() const {
return true;
}
void Esr_sim1_5c0::Swap(Esr_sim1_5c0* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_sim1_5c0::InternalSwap(Esr_sim1_5c0* other) {
std::swap(can_rx_sim_track_id_, other->can_rx_sim_track_id_);
std::swap(can_rx_sim_status_, other->can_rx_sim_status_);
std::swap(can_rx_sim_range_rate_, other->can_rx_sim_range_rate_);
std::swap(can_rx_sim_range_accel_, other->can_rx_sim_range_accel_);
std::swap(can_rx_sim_range_, other->can_rx_sim_range_);
std::swap(can_rx_sim_lat_rate_, other->can_rx_sim_lat_rate_);
std::swap(can_rx_sim_lat_pos_, other->can_rx_sim_lat_pos_);
std::swap(can_rx_sim_function_, other->can_rx_sim_function_);
std::swap(can_rx_sim_angle_, other->can_rx_sim_angle_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_sim1_5c0::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_sim1_5c0_descriptor_;
metadata.reflection = Esr_sim1_5c0_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_sim1_5c0
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_track_idType can_rx_sim_track_id = 1;
bool Esr_sim1_5c0::has_can_rx_sim_track_id() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_sim1_5c0::set_has_can_rx_sim_track_id() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_sim1_5c0::clear_has_can_rx_sim_track_id() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_sim1_5c0::clear_can_rx_sim_track_id() {
can_rx_sim_track_id_ = 0;
clear_has_can_rx_sim_track_id();
}
::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_track_idType Esr_sim1_5c0::can_rx_sim_track_id() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_sim1_5c0.can_rx_sim_track_id)
return static_cast< ::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_track_idType >(can_rx_sim_track_id_);
}
void Esr_sim1_5c0::set_can_rx_sim_track_id(::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_track_idType value) {
assert(::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_track_idType_IsValid(value));
set_has_can_rx_sim_track_id();
can_rx_sim_track_id_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_sim1_5c0.can_rx_sim_track_id)
}
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_statusType can_rx_sim_status = 2;
bool Esr_sim1_5c0::has_can_rx_sim_status() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_sim1_5c0::set_has_can_rx_sim_status() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_sim1_5c0::clear_has_can_rx_sim_status() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_sim1_5c0::clear_can_rx_sim_status() {
can_rx_sim_status_ = 0;
clear_has_can_rx_sim_status();
}
::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_statusType Esr_sim1_5c0::can_rx_sim_status() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_sim1_5c0.can_rx_sim_status)
return static_cast< ::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_statusType >(can_rx_sim_status_);
}
void Esr_sim1_5c0::set_can_rx_sim_status(::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_statusType value) {
assert(::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_statusType_IsValid(value));
set_has_can_rx_sim_status();
can_rx_sim_status_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_sim1_5c0.can_rx_sim_status)
}
// optional double can_rx_sim_range_rate = 3;
bool Esr_sim1_5c0::has_can_rx_sim_range_rate() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_sim1_5c0::set_has_can_rx_sim_range_rate() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_sim1_5c0::clear_has_can_rx_sim_range_rate() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_sim1_5c0::clear_can_rx_sim_range_rate() {
can_rx_sim_range_rate_ = 0;
clear_has_can_rx_sim_range_rate();
}
double Esr_sim1_5c0::can_rx_sim_range_rate() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_sim1_5c0.can_rx_sim_range_rate)
return can_rx_sim_range_rate_;
}
void Esr_sim1_5c0::set_can_rx_sim_range_rate(double value) {
set_has_can_rx_sim_range_rate();
can_rx_sim_range_rate_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_sim1_5c0.can_rx_sim_range_rate)
}
// optional double can_rx_sim_range_accel = 4;
bool Esr_sim1_5c0::has_can_rx_sim_range_accel() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_sim1_5c0::set_has_can_rx_sim_range_accel() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_sim1_5c0::clear_has_can_rx_sim_range_accel() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_sim1_5c0::clear_can_rx_sim_range_accel() {
can_rx_sim_range_accel_ = 0;
clear_has_can_rx_sim_range_accel();
}
double Esr_sim1_5c0::can_rx_sim_range_accel() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_sim1_5c0.can_rx_sim_range_accel)
return can_rx_sim_range_accel_;
}
void Esr_sim1_5c0::set_can_rx_sim_range_accel(double value) {
set_has_can_rx_sim_range_accel();
can_rx_sim_range_accel_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_sim1_5c0.can_rx_sim_range_accel)
}
// optional int32 can_rx_sim_range = 5;
bool Esr_sim1_5c0::has_can_rx_sim_range() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_sim1_5c0::set_has_can_rx_sim_range() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_sim1_5c0::clear_has_can_rx_sim_range() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_sim1_5c0::clear_can_rx_sim_range() {
can_rx_sim_range_ = 0;
clear_has_can_rx_sim_range();
}
::google::protobuf::int32 Esr_sim1_5c0::can_rx_sim_range() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_sim1_5c0.can_rx_sim_range)
return can_rx_sim_range_;
}
void Esr_sim1_5c0::set_can_rx_sim_range(::google::protobuf::int32 value) {
set_has_can_rx_sim_range();
can_rx_sim_range_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_sim1_5c0.can_rx_sim_range)
}
// optional double can_rx_sim_lat_rate = 6;
bool Esr_sim1_5c0::has_can_rx_sim_lat_rate() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Esr_sim1_5c0::set_has_can_rx_sim_lat_rate() {
_has_bits_[0] |= 0x00000020u;
}
void Esr_sim1_5c0::clear_has_can_rx_sim_lat_rate() {
_has_bits_[0] &= ~0x00000020u;
}
void Esr_sim1_5c0::clear_can_rx_sim_lat_rate() {
can_rx_sim_lat_rate_ = 0;
clear_has_can_rx_sim_lat_rate();
}
double Esr_sim1_5c0::can_rx_sim_lat_rate() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_sim1_5c0.can_rx_sim_lat_rate)
return can_rx_sim_lat_rate_;
}
void Esr_sim1_5c0::set_can_rx_sim_lat_rate(double value) {
set_has_can_rx_sim_lat_rate();
can_rx_sim_lat_rate_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_sim1_5c0.can_rx_sim_lat_rate)
}
// optional double can_rx_sim_lat_pos = 7;
bool Esr_sim1_5c0::has_can_rx_sim_lat_pos() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Esr_sim1_5c0::set_has_can_rx_sim_lat_pos() {
_has_bits_[0] |= 0x00000040u;
}
void Esr_sim1_5c0::clear_has_can_rx_sim_lat_pos() {
_has_bits_[0] &= ~0x00000040u;
}
void Esr_sim1_5c0::clear_can_rx_sim_lat_pos() {
can_rx_sim_lat_pos_ = 0;
clear_has_can_rx_sim_lat_pos();
}
double Esr_sim1_5c0::can_rx_sim_lat_pos() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_sim1_5c0.can_rx_sim_lat_pos)
return can_rx_sim_lat_pos_;
}
void Esr_sim1_5c0::set_can_rx_sim_lat_pos(double value) {
set_has_can_rx_sim_lat_pos();
can_rx_sim_lat_pos_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_sim1_5c0.can_rx_sim_lat_pos)
}
// optional .apollo.drivers.Esr_sim1_5c0.Can_rx_sim_functionType can_rx_sim_function = 8;
bool Esr_sim1_5c0::has_can_rx_sim_function() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Esr_sim1_5c0::set_has_can_rx_sim_function() {
_has_bits_[0] |= 0x00000080u;
}
void Esr_sim1_5c0::clear_has_can_rx_sim_function() {
_has_bits_[0] &= ~0x00000080u;
}
void Esr_sim1_5c0::clear_can_rx_sim_function() {
can_rx_sim_function_ = 0;
clear_has_can_rx_sim_function();
}
::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_functionType Esr_sim1_5c0::can_rx_sim_function() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_sim1_5c0.can_rx_sim_function)
return static_cast< ::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_functionType >(can_rx_sim_function_);
}
void Esr_sim1_5c0::set_can_rx_sim_function(::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_functionType value) {
assert(::apollo::drivers::Esr_sim1_5c0_Can_rx_sim_functionType_IsValid(value));
set_has_can_rx_sim_function();
can_rx_sim_function_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_sim1_5c0.can_rx_sim_function)
}
// optional double can_rx_sim_angle = 9;
bool Esr_sim1_5c0::has_can_rx_sim_angle() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
void Esr_sim1_5c0::set_has_can_rx_sim_angle() {
_has_bits_[0] |= 0x00000100u;
}
void Esr_sim1_5c0::clear_has_can_rx_sim_angle() {
_has_bits_[0] &= ~0x00000100u;
}
void Esr_sim1_5c0::clear_can_rx_sim_angle() {
can_rx_sim_angle_ = 0;
clear_has_can_rx_sim_angle();
}
double Esr_sim1_5c0::can_rx_sim_angle() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_sim1_5c0.can_rx_sim_angle)
return can_rx_sim_angle_;
}
void Esr_sim1_5c0::set_can_rx_sim_angle(double value) {
set_has_can_rx_sim_angle();
can_rx_sim_angle_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_sim1_5c0.can_rx_sim_angle)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_status1_4e0::kCanTxDspTimestampFieldNumber;
const int Esr_status1_4e0::kCanTxCommErrorFieldNumber;
const int Esr_status1_4e0::kCanTxYawRateCalcFieldNumber;
const int Esr_status1_4e0::kCanTxVehicleSpeedCalcFieldNumber;
const int Esr_status1_4e0::kCanTxScanIndexFieldNumber;
const int Esr_status1_4e0::kCanTxRollingCount1FieldNumber;
const int Esr_status1_4e0::kCanTxRadiusCurvatureCalcFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_status1_4e0::Esr_status1_4e0()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_status1_4e0)
}
void Esr_status1_4e0::InitAsDefaultInstance() {
}
Esr_status1_4e0::Esr_status1_4e0(const Esr_status1_4e0& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_status1_4e0)
}
void Esr_status1_4e0::SharedCtor() {
_cached_size_ = 0;
can_tx_dsp_timestamp_ = 0;
can_tx_comm_error_ = false;
can_tx_yaw_rate_calc_ = 0;
can_tx_vehicle_speed_calc_ = 0;
can_tx_scan_index_ = 0;
can_tx_rolling_count_1_ = 0;
can_tx_radius_curvature_calc_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_status1_4e0::~Esr_status1_4e0() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_status1_4e0)
SharedDtor();
}
void Esr_status1_4e0::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_status1_4e0::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_status1_4e0::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status1_4e0_descriptor_;
}
const Esr_status1_4e0& Esr_status1_4e0::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_status1_4e0* Esr_status1_4e0::default_instance_ = NULL;
Esr_status1_4e0* Esr_status1_4e0::New(::google::protobuf::Arena* arena) const {
Esr_status1_4e0* n = new Esr_status1_4e0;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_status1_4e0::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_status1_4e0)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_status1_4e0, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_status1_4e0*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 127u) {
ZR_(can_tx_dsp_timestamp_, can_tx_radius_curvature_calc_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_status1_4e0::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_status1_4e0)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional double can_tx_dsp_timestamp = 1;
case 1: {
if (tag == 9) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_dsp_timestamp_)));
set_has_can_tx_dsp_timestamp();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_comm_error;
break;
}
// optional bool can_tx_comm_error = 2;
case 2: {
if (tag == 16) {
parse_can_tx_comm_error:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &can_tx_comm_error_)));
set_has_can_tx_comm_error();
} else {
goto handle_unusual;
}
if (input->ExpectTag(25)) goto parse_can_tx_yaw_rate_calc;
break;
}
// optional double can_tx_yaw_rate_calc = 3;
case 3: {
if (tag == 25) {
parse_can_tx_yaw_rate_calc:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_yaw_rate_calc_)));
set_has_can_tx_yaw_rate_calc();
} else {
goto handle_unusual;
}
if (input->ExpectTag(33)) goto parse_can_tx_vehicle_speed_calc;
break;
}
// optional double can_tx_vehicle_speed_calc = 4;
case 4: {
if (tag == 33) {
parse_can_tx_vehicle_speed_calc:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_vehicle_speed_calc_)));
set_has_can_tx_vehicle_speed_calc();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_tx_scan_index;
break;
}
// optional int32 can_tx_scan_index = 5;
case 5: {
if (tag == 40) {
parse_can_tx_scan_index:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_scan_index_)));
set_has_can_tx_scan_index();
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_tx_rolling_count_1;
break;
}
// optional int32 can_tx_rolling_count_1 = 6;
case 6: {
if (tag == 48) {
parse_can_tx_rolling_count_1:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_rolling_count_1_)));
set_has_can_tx_rolling_count_1();
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_tx_radius_curvature_calc;
break;
}
// optional int32 can_tx_radius_curvature_calc = 7;
case 7: {
if (tag == 56) {
parse_can_tx_radius_curvature_calc:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_radius_curvature_calc_)));
set_has_can_tx_radius_curvature_calc();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_status1_4e0)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_status1_4e0)
return false;
#undef DO_
}
void Esr_status1_4e0::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_status1_4e0)
// optional double can_tx_dsp_timestamp = 1;
if (has_can_tx_dsp_timestamp()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->can_tx_dsp_timestamp(), output);
}
// optional bool can_tx_comm_error = 2;
if (has_can_tx_comm_error()) {
::google::protobuf::internal::WireFormatLite::WriteBool(2, this->can_tx_comm_error(), output);
}
// optional double can_tx_yaw_rate_calc = 3;
if (has_can_tx_yaw_rate_calc()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->can_tx_yaw_rate_calc(), output);
}
// optional double can_tx_vehicle_speed_calc = 4;
if (has_can_tx_vehicle_speed_calc()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->can_tx_vehicle_speed_calc(), output);
}
// optional int32 can_tx_scan_index = 5;
if (has_can_tx_scan_index()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->can_tx_scan_index(), output);
}
// optional int32 can_tx_rolling_count_1 = 6;
if (has_can_tx_rolling_count_1()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->can_tx_rolling_count_1(), output);
}
// optional int32 can_tx_radius_curvature_calc = 7;
if (has_can_tx_radius_curvature_calc()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->can_tx_radius_curvature_calc(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_status1_4e0)
}
::google::protobuf::uint8* Esr_status1_4e0::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_status1_4e0)
// optional double can_tx_dsp_timestamp = 1;
if (has_can_tx_dsp_timestamp()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->can_tx_dsp_timestamp(), target);
}
// optional bool can_tx_comm_error = 2;
if (has_can_tx_comm_error()) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->can_tx_comm_error(), target);
}
// optional double can_tx_yaw_rate_calc = 3;
if (has_can_tx_yaw_rate_calc()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->can_tx_yaw_rate_calc(), target);
}
// optional double can_tx_vehicle_speed_calc = 4;
if (has_can_tx_vehicle_speed_calc()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->can_tx_vehicle_speed_calc(), target);
}
// optional int32 can_tx_scan_index = 5;
if (has_can_tx_scan_index()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->can_tx_scan_index(), target);
}
// optional int32 can_tx_rolling_count_1 = 6;
if (has_can_tx_rolling_count_1()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->can_tx_rolling_count_1(), target);
}
// optional int32 can_tx_radius_curvature_calc = 7;
if (has_can_tx_radius_curvature_calc()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->can_tx_radius_curvature_calc(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_status1_4e0)
return target;
}
int Esr_status1_4e0::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_status1_4e0)
int total_size = 0;
if (_has_bits_[0 / 32] & 127u) {
// optional double can_tx_dsp_timestamp = 1;
if (has_can_tx_dsp_timestamp()) {
total_size += 1 + 8;
}
// optional bool can_tx_comm_error = 2;
if (has_can_tx_comm_error()) {
total_size += 1 + 1;
}
// optional double can_tx_yaw_rate_calc = 3;
if (has_can_tx_yaw_rate_calc()) {
total_size += 1 + 8;
}
// optional double can_tx_vehicle_speed_calc = 4;
if (has_can_tx_vehicle_speed_calc()) {
total_size += 1 + 8;
}
// optional int32 can_tx_scan_index = 5;
if (has_can_tx_scan_index()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_scan_index());
}
// optional int32 can_tx_rolling_count_1 = 6;
if (has_can_tx_rolling_count_1()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_rolling_count_1());
}
// optional int32 can_tx_radius_curvature_calc = 7;
if (has_can_tx_radius_curvature_calc()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_radius_curvature_calc());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_status1_4e0::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_status1_4e0)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_status1_4e0* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_status1_4e0>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_status1_4e0)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_status1_4e0)
MergeFrom(*source);
}
}
void Esr_status1_4e0::MergeFrom(const Esr_status1_4e0& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_status1_4e0)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_dsp_timestamp()) {
set_can_tx_dsp_timestamp(from.can_tx_dsp_timestamp());
}
if (from.has_can_tx_comm_error()) {
set_can_tx_comm_error(from.can_tx_comm_error());
}
if (from.has_can_tx_yaw_rate_calc()) {
set_can_tx_yaw_rate_calc(from.can_tx_yaw_rate_calc());
}
if (from.has_can_tx_vehicle_speed_calc()) {
set_can_tx_vehicle_speed_calc(from.can_tx_vehicle_speed_calc());
}
if (from.has_can_tx_scan_index()) {
set_can_tx_scan_index(from.can_tx_scan_index());
}
if (from.has_can_tx_rolling_count_1()) {
set_can_tx_rolling_count_1(from.can_tx_rolling_count_1());
}
if (from.has_can_tx_radius_curvature_calc()) {
set_can_tx_radius_curvature_calc(from.can_tx_radius_curvature_calc());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_status1_4e0::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_status1_4e0)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_status1_4e0::CopyFrom(const Esr_status1_4e0& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_status1_4e0)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_status1_4e0::IsInitialized() const {
return true;
}
void Esr_status1_4e0::Swap(Esr_status1_4e0* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_status1_4e0::InternalSwap(Esr_status1_4e0* other) {
std::swap(can_tx_dsp_timestamp_, other->can_tx_dsp_timestamp_);
std::swap(can_tx_comm_error_, other->can_tx_comm_error_);
std::swap(can_tx_yaw_rate_calc_, other->can_tx_yaw_rate_calc_);
std::swap(can_tx_vehicle_speed_calc_, other->can_tx_vehicle_speed_calc_);
std::swap(can_tx_scan_index_, other->can_tx_scan_index_);
std::swap(can_tx_rolling_count_1_, other->can_tx_rolling_count_1_);
std::swap(can_tx_radius_curvature_calc_, other->can_tx_radius_curvature_calc_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_status1_4e0::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_status1_4e0_descriptor_;
metadata.reflection = Esr_status1_4e0_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_status1_4e0
// optional double can_tx_dsp_timestamp = 1;
bool Esr_status1_4e0::has_can_tx_dsp_timestamp() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_status1_4e0::set_has_can_tx_dsp_timestamp() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_status1_4e0::clear_has_can_tx_dsp_timestamp() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_status1_4e0::clear_can_tx_dsp_timestamp() {
can_tx_dsp_timestamp_ = 0;
clear_has_can_tx_dsp_timestamp();
}
double Esr_status1_4e0::can_tx_dsp_timestamp() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status1_4e0.can_tx_dsp_timestamp)
return can_tx_dsp_timestamp_;
}
void Esr_status1_4e0::set_can_tx_dsp_timestamp(double value) {
set_has_can_tx_dsp_timestamp();
can_tx_dsp_timestamp_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status1_4e0.can_tx_dsp_timestamp)
}
// optional bool can_tx_comm_error = 2;
bool Esr_status1_4e0::has_can_tx_comm_error() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_status1_4e0::set_has_can_tx_comm_error() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_status1_4e0::clear_has_can_tx_comm_error() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_status1_4e0::clear_can_tx_comm_error() {
can_tx_comm_error_ = false;
clear_has_can_tx_comm_error();
}
bool Esr_status1_4e0::can_tx_comm_error() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status1_4e0.can_tx_comm_error)
return can_tx_comm_error_;
}
void Esr_status1_4e0::set_can_tx_comm_error(bool value) {
set_has_can_tx_comm_error();
can_tx_comm_error_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status1_4e0.can_tx_comm_error)
}
// optional double can_tx_yaw_rate_calc = 3;
bool Esr_status1_4e0::has_can_tx_yaw_rate_calc() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_status1_4e0::set_has_can_tx_yaw_rate_calc() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_status1_4e0::clear_has_can_tx_yaw_rate_calc() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_status1_4e0::clear_can_tx_yaw_rate_calc() {
can_tx_yaw_rate_calc_ = 0;
clear_has_can_tx_yaw_rate_calc();
}
double Esr_status1_4e0::can_tx_yaw_rate_calc() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status1_4e0.can_tx_yaw_rate_calc)
return can_tx_yaw_rate_calc_;
}
void Esr_status1_4e0::set_can_tx_yaw_rate_calc(double value) {
set_has_can_tx_yaw_rate_calc();
can_tx_yaw_rate_calc_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status1_4e0.can_tx_yaw_rate_calc)
}
// optional double can_tx_vehicle_speed_calc = 4;
bool Esr_status1_4e0::has_can_tx_vehicle_speed_calc() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_status1_4e0::set_has_can_tx_vehicle_speed_calc() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_status1_4e0::clear_has_can_tx_vehicle_speed_calc() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_status1_4e0::clear_can_tx_vehicle_speed_calc() {
can_tx_vehicle_speed_calc_ = 0;
clear_has_can_tx_vehicle_speed_calc();
}
double Esr_status1_4e0::can_tx_vehicle_speed_calc() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status1_4e0.can_tx_vehicle_speed_calc)
return can_tx_vehicle_speed_calc_;
}
void Esr_status1_4e0::set_can_tx_vehicle_speed_calc(double value) {
set_has_can_tx_vehicle_speed_calc();
can_tx_vehicle_speed_calc_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status1_4e0.can_tx_vehicle_speed_calc)
}
// optional int32 can_tx_scan_index = 5;
bool Esr_status1_4e0::has_can_tx_scan_index() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_status1_4e0::set_has_can_tx_scan_index() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_status1_4e0::clear_has_can_tx_scan_index() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_status1_4e0::clear_can_tx_scan_index() {
can_tx_scan_index_ = 0;
clear_has_can_tx_scan_index();
}
::google::protobuf::int32 Esr_status1_4e0::can_tx_scan_index() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status1_4e0.can_tx_scan_index)
return can_tx_scan_index_;
}
void Esr_status1_4e0::set_can_tx_scan_index(::google::protobuf::int32 value) {
set_has_can_tx_scan_index();
can_tx_scan_index_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status1_4e0.can_tx_scan_index)
}
// optional int32 can_tx_rolling_count_1 = 6;
bool Esr_status1_4e0::has_can_tx_rolling_count_1() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Esr_status1_4e0::set_has_can_tx_rolling_count_1() {
_has_bits_[0] |= 0x00000020u;
}
void Esr_status1_4e0::clear_has_can_tx_rolling_count_1() {
_has_bits_[0] &= ~0x00000020u;
}
void Esr_status1_4e0::clear_can_tx_rolling_count_1() {
can_tx_rolling_count_1_ = 0;
clear_has_can_tx_rolling_count_1();
}
::google::protobuf::int32 Esr_status1_4e0::can_tx_rolling_count_1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status1_4e0.can_tx_rolling_count_1)
return can_tx_rolling_count_1_;
}
void Esr_status1_4e0::set_can_tx_rolling_count_1(::google::protobuf::int32 value) {
set_has_can_tx_rolling_count_1();
can_tx_rolling_count_1_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status1_4e0.can_tx_rolling_count_1)
}
// optional int32 can_tx_radius_curvature_calc = 7;
bool Esr_status1_4e0::has_can_tx_radius_curvature_calc() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Esr_status1_4e0::set_has_can_tx_radius_curvature_calc() {
_has_bits_[0] |= 0x00000040u;
}
void Esr_status1_4e0::clear_has_can_tx_radius_curvature_calc() {
_has_bits_[0] &= ~0x00000040u;
}
void Esr_status1_4e0::clear_can_tx_radius_curvature_calc() {
can_tx_radius_curvature_calc_ = 0;
clear_has_can_tx_radius_curvature_calc();
}
::google::protobuf::int32 Esr_status1_4e0::can_tx_radius_curvature_calc() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status1_4e0.can_tx_radius_curvature_calc)
return can_tx_radius_curvature_calc_;
}
void Esr_status1_4e0::set_can_tx_radius_curvature_calc(::google::protobuf::int32 value) {
set_has_can_tx_radius_curvature_calc();
can_tx_radius_curvature_calc_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status1_4e0.can_tx_radius_curvature_calc)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_raw_data_modeType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status2_4e1_Can_tx_raw_data_modeType_descriptor_;
}
bool Esr_status2_4e1_Can_tx_raw_data_modeType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status2_4e1_Can_tx_raw_data_modeType Esr_status2_4e1::CAN_TX_RAW_DATA_MODE_FILTERED;
const Esr_status2_4e1_Can_tx_raw_data_modeType Esr_status2_4e1::CAN_TX_RAW_DATA_MODE_RAW;
const Esr_status2_4e1_Can_tx_raw_data_modeType Esr_status2_4e1::Can_tx_raw_data_modeType_MIN;
const Esr_status2_4e1_Can_tx_raw_data_modeType Esr_status2_4e1::Can_tx_raw_data_modeType_MAX;
const int Esr_status2_4e1::Can_tx_raw_data_modeType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_range_perf_errorType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status2_4e1_Can_tx_range_perf_errorType_descriptor_;
}
bool Esr_status2_4e1_Can_tx_range_perf_errorType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status2_4e1_Can_tx_range_perf_errorType Esr_status2_4e1::CAN_TX_RANGE_PERF_ERROR_NOT_BLOCKED;
const Esr_status2_4e1_Can_tx_range_perf_errorType Esr_status2_4e1::CAN_TX_RANGE_PERF_ERROR_BLOCKED;
const Esr_status2_4e1_Can_tx_range_perf_errorType Esr_status2_4e1::Can_tx_range_perf_errorType_MIN;
const Esr_status2_4e1_Can_tx_range_perf_errorType Esr_status2_4e1::Can_tx_range_perf_errorType_MAX;
const int Esr_status2_4e1::Can_tx_range_perf_errorType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_overheat_errorType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status2_4e1_Can_tx_overheat_errorType_descriptor_;
}
bool Esr_status2_4e1_Can_tx_overheat_errorType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status2_4e1_Can_tx_overheat_errorType Esr_status2_4e1::CAN_TX_OVERHEAT_ERROR_NOT_OVERTEMP;
const Esr_status2_4e1_Can_tx_overheat_errorType Esr_status2_4e1::CAN_TX_OVERHEAT_ERROR_OVERTEMP;
const Esr_status2_4e1_Can_tx_overheat_errorType Esr_status2_4e1::Can_tx_overheat_errorType_MIN;
const Esr_status2_4e1_Can_tx_overheat_errorType Esr_status2_4e1::Can_tx_overheat_errorType_MAX;
const int Esr_status2_4e1::Can_tx_overheat_errorType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_internal_errorType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status2_4e1_Can_tx_internal_errorType_descriptor_;
}
bool Esr_status2_4e1_Can_tx_internal_errorType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status2_4e1_Can_tx_internal_errorType Esr_status2_4e1::CAN_TX_INTERNAL_ERROR_NOT_FAILED;
const Esr_status2_4e1_Can_tx_internal_errorType Esr_status2_4e1::CAN_TX_INTERNAL_ERROR_FAILED;
const Esr_status2_4e1_Can_tx_internal_errorType Esr_status2_4e1::Can_tx_internal_errorType_MIN;
const Esr_status2_4e1_Can_tx_internal_errorType Esr_status2_4e1::Can_tx_internal_errorType_MAX;
const int Esr_status2_4e1::Can_tx_internal_errorType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_grouping_modeType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status2_4e1_Can_tx_grouping_modeType_descriptor_;
}
bool Esr_status2_4e1_Can_tx_grouping_modeType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status2_4e1_Can_tx_grouping_modeType Esr_status2_4e1::CAN_TX_GROUPING_MODE_NO_GROUPING;
const Esr_status2_4e1_Can_tx_grouping_modeType Esr_status2_4e1::CAN_TX_GROUPING_MODE_GROUP_MOVING_ONLY;
const Esr_status2_4e1_Can_tx_grouping_modeType Esr_status2_4e1::CAN_TX_GROUPING_MODE_GROUP_STATIONARY_ONLY;
const Esr_status2_4e1_Can_tx_grouping_modeType Esr_status2_4e1::CAN_TX_GROUPING_MODE_GROUP_MOVING_STATIONARY;
const Esr_status2_4e1_Can_tx_grouping_modeType Esr_status2_4e1::Can_tx_grouping_modeType_MIN;
const Esr_status2_4e1_Can_tx_grouping_modeType Esr_status2_4e1::Can_tx_grouping_modeType_MAX;
const int Esr_status2_4e1::Can_tx_grouping_modeType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Esr_status2_4e1_Can_tx_xcvr_operationalType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status2_4e1_Can_tx_xcvr_operationalType_descriptor_;
}
bool Esr_status2_4e1_Can_tx_xcvr_operationalType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Esr_status2_4e1_Can_tx_xcvr_operationalType Esr_status2_4e1::CAN_TX_XCVR_OPERATIONAL_OFF;
const Esr_status2_4e1_Can_tx_xcvr_operationalType Esr_status2_4e1::CAN_TX_XCVR_OPERATIONAL_ON;
const Esr_status2_4e1_Can_tx_xcvr_operationalType Esr_status2_4e1::Can_tx_xcvr_operationalType_MIN;
const Esr_status2_4e1_Can_tx_xcvr_operationalType Esr_status2_4e1::Can_tx_xcvr_operationalType_MAX;
const int Esr_status2_4e1::Can_tx_xcvr_operationalType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_status2_4e1::kCanTxYawRateBiasFieldNumber;
const int Esr_status2_4e1::kCanTxVehSpdCompFactorFieldNumber;
const int Esr_status2_4e1::kCanTxSwVersionDspFieldNumber;
const int Esr_status2_4e1::kCanTxTemperatureFieldNumber;
const int Esr_status2_4e1::kCanTxRawDataModeFieldNumber;
const int Esr_status2_4e1::kCanTxRangePerfErrorFieldNumber;
const int Esr_status2_4e1::kCanTxOverheatErrorFieldNumber;
const int Esr_status2_4e1::kCanTxMaximumTracksAckFieldNumber;
const int Esr_status2_4e1::kCanTxInternalErrorFieldNumber;
const int Esr_status2_4e1::kCanTxGroupingModeFieldNumber;
const int Esr_status2_4e1::kCanTxXcvrOperationalFieldNumber;
const int Esr_status2_4e1::kCanTxSteeringAngleAckFieldNumber;
const int Esr_status2_4e1::kCanTxRollingCount2FieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_status2_4e1::Esr_status2_4e1()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_status2_4e1)
}
void Esr_status2_4e1::InitAsDefaultInstance() {
}
Esr_status2_4e1::Esr_status2_4e1(const Esr_status2_4e1& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_status2_4e1)
}
void Esr_status2_4e1::SharedCtor() {
_cached_size_ = 0;
can_tx_yaw_rate_bias_ = 0;
can_tx_veh_spd_comp_factor_ = 0;
can_tx_sw_version_dsp_ = 0;
can_tx_temperature_ = 0;
can_tx_raw_data_mode_ = 0;
can_tx_range_perf_error_ = 0;
can_tx_overheat_error_ = 0;
can_tx_maximum_tracks_ack_ = 0;
can_tx_internal_error_ = 0;
can_tx_grouping_mode_ = 0;
can_tx_xcvr_operational_ = 0;
can_tx_steering_angle_ack_ = 0;
can_tx_rolling_count_2_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_status2_4e1::~Esr_status2_4e1() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_status2_4e1)
SharedDtor();
}
void Esr_status2_4e1::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_status2_4e1::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_status2_4e1::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status2_4e1_descriptor_;
}
const Esr_status2_4e1& Esr_status2_4e1::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_status2_4e1* Esr_status2_4e1::default_instance_ = NULL;
Esr_status2_4e1* Esr_status2_4e1::New(::google::protobuf::Arena* arena) const {
Esr_status2_4e1* n = new Esr_status2_4e1;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_status2_4e1::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_status2_4e1)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_status2_4e1, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_status2_4e1*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_tx_yaw_rate_bias_, can_tx_maximum_tracks_ack_);
}
if (_has_bits_[8 / 32] & 7936u) {
ZR_(can_tx_internal_error_, can_tx_rolling_count_2_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_status2_4e1::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_status2_4e1)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional double can_tx_yaw_rate_bias = 1;
case 1: {
if (tag == 9) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_yaw_rate_bias_)));
set_has_can_tx_yaw_rate_bias();
} else {
goto handle_unusual;
}
if (input->ExpectTag(17)) goto parse_can_tx_veh_spd_comp_factor;
break;
}
// optional double can_tx_veh_spd_comp_factor = 2;
case 2: {
if (tag == 17) {
parse_can_tx_veh_spd_comp_factor:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_tx_veh_spd_comp_factor_)));
set_has_can_tx_veh_spd_comp_factor();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_tx_sw_version_dsp;
break;
}
// optional int32 can_tx_sw_version_dsp = 3;
case 3: {
if (tag == 24) {
parse_can_tx_sw_version_dsp:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_sw_version_dsp_)));
set_has_can_tx_sw_version_dsp();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_temperature;
break;
}
// optional int32 can_tx_temperature = 4;
case 4: {
if (tag == 32) {
parse_can_tx_temperature:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_temperature_)));
set_has_can_tx_temperature();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_tx_raw_data_mode;
break;
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_raw_data_modeType can_tx_raw_data_mode = 5;
case 5: {
if (tag == 40) {
parse_can_tx_raw_data_mode:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status2_4e1_Can_tx_raw_data_modeType_IsValid(value)) {
set_can_tx_raw_data_mode(static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_raw_data_modeType >(value));
} else {
mutable_unknown_fields()->AddVarint(5, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_tx_range_perf_error;
break;
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_range_perf_errorType can_tx_range_perf_error = 6;
case 6: {
if (tag == 48) {
parse_can_tx_range_perf_error:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status2_4e1_Can_tx_range_perf_errorType_IsValid(value)) {
set_can_tx_range_perf_error(static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_range_perf_errorType >(value));
} else {
mutable_unknown_fields()->AddVarint(6, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_tx_overheat_error;
break;
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_overheat_errorType can_tx_overheat_error = 7;
case 7: {
if (tag == 56) {
parse_can_tx_overheat_error:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status2_4e1_Can_tx_overheat_errorType_IsValid(value)) {
set_can_tx_overheat_error(static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_overheat_errorType >(value));
} else {
mutable_unknown_fields()->AddVarint(7, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_can_tx_maximum_tracks_ack;
break;
}
// optional int32 can_tx_maximum_tracks_ack = 8;
case 8: {
if (tag == 64) {
parse_can_tx_maximum_tracks_ack:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_maximum_tracks_ack_)));
set_has_can_tx_maximum_tracks_ack();
} else {
goto handle_unusual;
}
if (input->ExpectTag(72)) goto parse_can_tx_internal_error;
break;
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_internal_errorType can_tx_internal_error = 9;
case 9: {
if (tag == 72) {
parse_can_tx_internal_error:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status2_4e1_Can_tx_internal_errorType_IsValid(value)) {
set_can_tx_internal_error(static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_internal_errorType >(value));
} else {
mutable_unknown_fields()->AddVarint(9, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(80)) goto parse_can_tx_grouping_mode;
break;
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_grouping_modeType can_tx_grouping_mode = 10;
case 10: {
if (tag == 80) {
parse_can_tx_grouping_mode:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status2_4e1_Can_tx_grouping_modeType_IsValid(value)) {
set_can_tx_grouping_mode(static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_grouping_modeType >(value));
} else {
mutable_unknown_fields()->AddVarint(10, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(88)) goto parse_can_tx_xcvr_operational;
break;
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_xcvr_operationalType can_tx_xcvr_operational = 11;
case 11: {
if (tag == 88) {
parse_can_tx_xcvr_operational:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Esr_status2_4e1_Can_tx_xcvr_operationalType_IsValid(value)) {
set_can_tx_xcvr_operational(static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_xcvr_operationalType >(value));
} else {
mutable_unknown_fields()->AddVarint(11, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(96)) goto parse_can_tx_steering_angle_ack;
break;
}
// optional int32 can_tx_steering_angle_ack = 12;
case 12: {
if (tag == 96) {
parse_can_tx_steering_angle_ack:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_steering_angle_ack_)));
set_has_can_tx_steering_angle_ack();
} else {
goto handle_unusual;
}
if (input->ExpectTag(104)) goto parse_can_tx_rolling_count_2;
break;
}
// optional int32 can_tx_rolling_count_2 = 13;
case 13: {
if (tag == 104) {
parse_can_tx_rolling_count_2:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_rolling_count_2_)));
set_has_can_tx_rolling_count_2();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_status2_4e1)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_status2_4e1)
return false;
#undef DO_
}
void Esr_status2_4e1::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_status2_4e1)
// optional double can_tx_yaw_rate_bias = 1;
if (has_can_tx_yaw_rate_bias()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->can_tx_yaw_rate_bias(), output);
}
// optional double can_tx_veh_spd_comp_factor = 2;
if (has_can_tx_veh_spd_comp_factor()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->can_tx_veh_spd_comp_factor(), output);
}
// optional int32 can_tx_sw_version_dsp = 3;
if (has_can_tx_sw_version_dsp()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->can_tx_sw_version_dsp(), output);
}
// optional int32 can_tx_temperature = 4;
if (has_can_tx_temperature()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_tx_temperature(), output);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_raw_data_modeType can_tx_raw_data_mode = 5;
if (has_can_tx_raw_data_mode()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
5, this->can_tx_raw_data_mode(), output);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_range_perf_errorType can_tx_range_perf_error = 6;
if (has_can_tx_range_perf_error()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
6, this->can_tx_range_perf_error(), output);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_overheat_errorType can_tx_overheat_error = 7;
if (has_can_tx_overheat_error()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
7, this->can_tx_overheat_error(), output);
}
// optional int32 can_tx_maximum_tracks_ack = 8;
if (has_can_tx_maximum_tracks_ack()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->can_tx_maximum_tracks_ack(), output);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_internal_errorType can_tx_internal_error = 9;
if (has_can_tx_internal_error()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
9, this->can_tx_internal_error(), output);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_grouping_modeType can_tx_grouping_mode = 10;
if (has_can_tx_grouping_mode()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
10, this->can_tx_grouping_mode(), output);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_xcvr_operationalType can_tx_xcvr_operational = 11;
if (has_can_tx_xcvr_operational()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
11, this->can_tx_xcvr_operational(), output);
}
// optional int32 can_tx_steering_angle_ack = 12;
if (has_can_tx_steering_angle_ack()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(12, this->can_tx_steering_angle_ack(), output);
}
// optional int32 can_tx_rolling_count_2 = 13;
if (has_can_tx_rolling_count_2()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(13, this->can_tx_rolling_count_2(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_status2_4e1)
}
::google::protobuf::uint8* Esr_status2_4e1::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_status2_4e1)
// optional double can_tx_yaw_rate_bias = 1;
if (has_can_tx_yaw_rate_bias()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->can_tx_yaw_rate_bias(), target);
}
// optional double can_tx_veh_spd_comp_factor = 2;
if (has_can_tx_veh_spd_comp_factor()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->can_tx_veh_spd_comp_factor(), target);
}
// optional int32 can_tx_sw_version_dsp = 3;
if (has_can_tx_sw_version_dsp()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->can_tx_sw_version_dsp(), target);
}
// optional int32 can_tx_temperature = 4;
if (has_can_tx_temperature()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_tx_temperature(), target);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_raw_data_modeType can_tx_raw_data_mode = 5;
if (has_can_tx_raw_data_mode()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
5, this->can_tx_raw_data_mode(), target);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_range_perf_errorType can_tx_range_perf_error = 6;
if (has_can_tx_range_perf_error()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
6, this->can_tx_range_perf_error(), target);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_overheat_errorType can_tx_overheat_error = 7;
if (has_can_tx_overheat_error()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
7, this->can_tx_overheat_error(), target);
}
// optional int32 can_tx_maximum_tracks_ack = 8;
if (has_can_tx_maximum_tracks_ack()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->can_tx_maximum_tracks_ack(), target);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_internal_errorType can_tx_internal_error = 9;
if (has_can_tx_internal_error()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
9, this->can_tx_internal_error(), target);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_grouping_modeType can_tx_grouping_mode = 10;
if (has_can_tx_grouping_mode()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
10, this->can_tx_grouping_mode(), target);
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_xcvr_operationalType can_tx_xcvr_operational = 11;
if (has_can_tx_xcvr_operational()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
11, this->can_tx_xcvr_operational(), target);
}
// optional int32 can_tx_steering_angle_ack = 12;
if (has_can_tx_steering_angle_ack()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(12, this->can_tx_steering_angle_ack(), target);
}
// optional int32 can_tx_rolling_count_2 = 13;
if (has_can_tx_rolling_count_2()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(13, this->can_tx_rolling_count_2(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_status2_4e1)
return target;
}
int Esr_status2_4e1::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_status2_4e1)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional double can_tx_yaw_rate_bias = 1;
if (has_can_tx_yaw_rate_bias()) {
total_size += 1 + 8;
}
// optional double can_tx_veh_spd_comp_factor = 2;
if (has_can_tx_veh_spd_comp_factor()) {
total_size += 1 + 8;
}
// optional int32 can_tx_sw_version_dsp = 3;
if (has_can_tx_sw_version_dsp()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_sw_version_dsp());
}
// optional int32 can_tx_temperature = 4;
if (has_can_tx_temperature()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_temperature());
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_raw_data_modeType can_tx_raw_data_mode = 5;
if (has_can_tx_raw_data_mode()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_raw_data_mode());
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_range_perf_errorType can_tx_range_perf_error = 6;
if (has_can_tx_range_perf_error()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_range_perf_error());
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_overheat_errorType can_tx_overheat_error = 7;
if (has_can_tx_overheat_error()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_overheat_error());
}
// optional int32 can_tx_maximum_tracks_ack = 8;
if (has_can_tx_maximum_tracks_ack()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_maximum_tracks_ack());
}
}
if (_has_bits_[8 / 32] & 7936u) {
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_internal_errorType can_tx_internal_error = 9;
if (has_can_tx_internal_error()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_internal_error());
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_grouping_modeType can_tx_grouping_mode = 10;
if (has_can_tx_grouping_mode()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_grouping_mode());
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_xcvr_operationalType can_tx_xcvr_operational = 11;
if (has_can_tx_xcvr_operational()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_tx_xcvr_operational());
}
// optional int32 can_tx_steering_angle_ack = 12;
if (has_can_tx_steering_angle_ack()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_steering_angle_ack());
}
// optional int32 can_tx_rolling_count_2 = 13;
if (has_can_tx_rolling_count_2()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_rolling_count_2());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_status2_4e1::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_status2_4e1)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_status2_4e1* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_status2_4e1>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_status2_4e1)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_status2_4e1)
MergeFrom(*source);
}
}
void Esr_status2_4e1::MergeFrom(const Esr_status2_4e1& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_status2_4e1)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_yaw_rate_bias()) {
set_can_tx_yaw_rate_bias(from.can_tx_yaw_rate_bias());
}
if (from.has_can_tx_veh_spd_comp_factor()) {
set_can_tx_veh_spd_comp_factor(from.can_tx_veh_spd_comp_factor());
}
if (from.has_can_tx_sw_version_dsp()) {
set_can_tx_sw_version_dsp(from.can_tx_sw_version_dsp());
}
if (from.has_can_tx_temperature()) {
set_can_tx_temperature(from.can_tx_temperature());
}
if (from.has_can_tx_raw_data_mode()) {
set_can_tx_raw_data_mode(from.can_tx_raw_data_mode());
}
if (from.has_can_tx_range_perf_error()) {
set_can_tx_range_perf_error(from.can_tx_range_perf_error());
}
if (from.has_can_tx_overheat_error()) {
set_can_tx_overheat_error(from.can_tx_overheat_error());
}
if (from.has_can_tx_maximum_tracks_ack()) {
set_can_tx_maximum_tracks_ack(from.can_tx_maximum_tracks_ack());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_can_tx_internal_error()) {
set_can_tx_internal_error(from.can_tx_internal_error());
}
if (from.has_can_tx_grouping_mode()) {
set_can_tx_grouping_mode(from.can_tx_grouping_mode());
}
if (from.has_can_tx_xcvr_operational()) {
set_can_tx_xcvr_operational(from.can_tx_xcvr_operational());
}
if (from.has_can_tx_steering_angle_ack()) {
set_can_tx_steering_angle_ack(from.can_tx_steering_angle_ack());
}
if (from.has_can_tx_rolling_count_2()) {
set_can_tx_rolling_count_2(from.can_tx_rolling_count_2());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_status2_4e1::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_status2_4e1)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_status2_4e1::CopyFrom(const Esr_status2_4e1& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_status2_4e1)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_status2_4e1::IsInitialized() const {
return true;
}
void Esr_status2_4e1::Swap(Esr_status2_4e1* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_status2_4e1::InternalSwap(Esr_status2_4e1* other) {
std::swap(can_tx_yaw_rate_bias_, other->can_tx_yaw_rate_bias_);
std::swap(can_tx_veh_spd_comp_factor_, other->can_tx_veh_spd_comp_factor_);
std::swap(can_tx_sw_version_dsp_, other->can_tx_sw_version_dsp_);
std::swap(can_tx_temperature_, other->can_tx_temperature_);
std::swap(can_tx_raw_data_mode_, other->can_tx_raw_data_mode_);
std::swap(can_tx_range_perf_error_, other->can_tx_range_perf_error_);
std::swap(can_tx_overheat_error_, other->can_tx_overheat_error_);
std::swap(can_tx_maximum_tracks_ack_, other->can_tx_maximum_tracks_ack_);
std::swap(can_tx_internal_error_, other->can_tx_internal_error_);
std::swap(can_tx_grouping_mode_, other->can_tx_grouping_mode_);
std::swap(can_tx_xcvr_operational_, other->can_tx_xcvr_operational_);
std::swap(can_tx_steering_angle_ack_, other->can_tx_steering_angle_ack_);
std::swap(can_tx_rolling_count_2_, other->can_tx_rolling_count_2_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_status2_4e1::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_status2_4e1_descriptor_;
metadata.reflection = Esr_status2_4e1_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_status2_4e1
// optional double can_tx_yaw_rate_bias = 1;
bool Esr_status2_4e1::has_can_tx_yaw_rate_bias() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_yaw_rate_bias() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_status2_4e1::clear_has_can_tx_yaw_rate_bias() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_status2_4e1::clear_can_tx_yaw_rate_bias() {
can_tx_yaw_rate_bias_ = 0;
clear_has_can_tx_yaw_rate_bias();
}
double Esr_status2_4e1::can_tx_yaw_rate_bias() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_yaw_rate_bias)
return can_tx_yaw_rate_bias_;
}
void Esr_status2_4e1::set_can_tx_yaw_rate_bias(double value) {
set_has_can_tx_yaw_rate_bias();
can_tx_yaw_rate_bias_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_yaw_rate_bias)
}
// optional double can_tx_veh_spd_comp_factor = 2;
bool Esr_status2_4e1::has_can_tx_veh_spd_comp_factor() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_veh_spd_comp_factor() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_status2_4e1::clear_has_can_tx_veh_spd_comp_factor() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_status2_4e1::clear_can_tx_veh_spd_comp_factor() {
can_tx_veh_spd_comp_factor_ = 0;
clear_has_can_tx_veh_spd_comp_factor();
}
double Esr_status2_4e1::can_tx_veh_spd_comp_factor() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_veh_spd_comp_factor)
return can_tx_veh_spd_comp_factor_;
}
void Esr_status2_4e1::set_can_tx_veh_spd_comp_factor(double value) {
set_has_can_tx_veh_spd_comp_factor();
can_tx_veh_spd_comp_factor_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_veh_spd_comp_factor)
}
// optional int32 can_tx_sw_version_dsp = 3;
bool Esr_status2_4e1::has_can_tx_sw_version_dsp() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_sw_version_dsp() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_status2_4e1::clear_has_can_tx_sw_version_dsp() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_status2_4e1::clear_can_tx_sw_version_dsp() {
can_tx_sw_version_dsp_ = 0;
clear_has_can_tx_sw_version_dsp();
}
::google::protobuf::int32 Esr_status2_4e1::can_tx_sw_version_dsp() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_sw_version_dsp)
return can_tx_sw_version_dsp_;
}
void Esr_status2_4e1::set_can_tx_sw_version_dsp(::google::protobuf::int32 value) {
set_has_can_tx_sw_version_dsp();
can_tx_sw_version_dsp_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_sw_version_dsp)
}
// optional int32 can_tx_temperature = 4;
bool Esr_status2_4e1::has_can_tx_temperature() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_temperature() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_status2_4e1::clear_has_can_tx_temperature() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_status2_4e1::clear_can_tx_temperature() {
can_tx_temperature_ = 0;
clear_has_can_tx_temperature();
}
::google::protobuf::int32 Esr_status2_4e1::can_tx_temperature() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_temperature)
return can_tx_temperature_;
}
void Esr_status2_4e1::set_can_tx_temperature(::google::protobuf::int32 value) {
set_has_can_tx_temperature();
can_tx_temperature_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_temperature)
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_raw_data_modeType can_tx_raw_data_mode = 5;
bool Esr_status2_4e1::has_can_tx_raw_data_mode() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_raw_data_mode() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_status2_4e1::clear_has_can_tx_raw_data_mode() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_status2_4e1::clear_can_tx_raw_data_mode() {
can_tx_raw_data_mode_ = 0;
clear_has_can_tx_raw_data_mode();
}
::apollo::drivers::Esr_status2_4e1_Can_tx_raw_data_modeType Esr_status2_4e1::can_tx_raw_data_mode() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_raw_data_mode)
return static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_raw_data_modeType >(can_tx_raw_data_mode_);
}
void Esr_status2_4e1::set_can_tx_raw_data_mode(::apollo::drivers::Esr_status2_4e1_Can_tx_raw_data_modeType value) {
assert(::apollo::drivers::Esr_status2_4e1_Can_tx_raw_data_modeType_IsValid(value));
set_has_can_tx_raw_data_mode();
can_tx_raw_data_mode_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_raw_data_mode)
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_range_perf_errorType can_tx_range_perf_error = 6;
bool Esr_status2_4e1::has_can_tx_range_perf_error() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_range_perf_error() {
_has_bits_[0] |= 0x00000020u;
}
void Esr_status2_4e1::clear_has_can_tx_range_perf_error() {
_has_bits_[0] &= ~0x00000020u;
}
void Esr_status2_4e1::clear_can_tx_range_perf_error() {
can_tx_range_perf_error_ = 0;
clear_has_can_tx_range_perf_error();
}
::apollo::drivers::Esr_status2_4e1_Can_tx_range_perf_errorType Esr_status2_4e1::can_tx_range_perf_error() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_range_perf_error)
return static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_range_perf_errorType >(can_tx_range_perf_error_);
}
void Esr_status2_4e1::set_can_tx_range_perf_error(::apollo::drivers::Esr_status2_4e1_Can_tx_range_perf_errorType value) {
assert(::apollo::drivers::Esr_status2_4e1_Can_tx_range_perf_errorType_IsValid(value));
set_has_can_tx_range_perf_error();
can_tx_range_perf_error_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_range_perf_error)
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_overheat_errorType can_tx_overheat_error = 7;
bool Esr_status2_4e1::has_can_tx_overheat_error() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_overheat_error() {
_has_bits_[0] |= 0x00000040u;
}
void Esr_status2_4e1::clear_has_can_tx_overheat_error() {
_has_bits_[0] &= ~0x00000040u;
}
void Esr_status2_4e1::clear_can_tx_overheat_error() {
can_tx_overheat_error_ = 0;
clear_has_can_tx_overheat_error();
}
::apollo::drivers::Esr_status2_4e1_Can_tx_overheat_errorType Esr_status2_4e1::can_tx_overheat_error() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_overheat_error)
return static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_overheat_errorType >(can_tx_overheat_error_);
}
void Esr_status2_4e1::set_can_tx_overheat_error(::apollo::drivers::Esr_status2_4e1_Can_tx_overheat_errorType value) {
assert(::apollo::drivers::Esr_status2_4e1_Can_tx_overheat_errorType_IsValid(value));
set_has_can_tx_overheat_error();
can_tx_overheat_error_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_overheat_error)
}
// optional int32 can_tx_maximum_tracks_ack = 8;
bool Esr_status2_4e1::has_can_tx_maximum_tracks_ack() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_maximum_tracks_ack() {
_has_bits_[0] |= 0x00000080u;
}
void Esr_status2_4e1::clear_has_can_tx_maximum_tracks_ack() {
_has_bits_[0] &= ~0x00000080u;
}
void Esr_status2_4e1::clear_can_tx_maximum_tracks_ack() {
can_tx_maximum_tracks_ack_ = 0;
clear_has_can_tx_maximum_tracks_ack();
}
::google::protobuf::int32 Esr_status2_4e1::can_tx_maximum_tracks_ack() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_maximum_tracks_ack)
return can_tx_maximum_tracks_ack_;
}
void Esr_status2_4e1::set_can_tx_maximum_tracks_ack(::google::protobuf::int32 value) {
set_has_can_tx_maximum_tracks_ack();
can_tx_maximum_tracks_ack_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_maximum_tracks_ack)
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_internal_errorType can_tx_internal_error = 9;
bool Esr_status2_4e1::has_can_tx_internal_error() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_internal_error() {
_has_bits_[0] |= 0x00000100u;
}
void Esr_status2_4e1::clear_has_can_tx_internal_error() {
_has_bits_[0] &= ~0x00000100u;
}
void Esr_status2_4e1::clear_can_tx_internal_error() {
can_tx_internal_error_ = 0;
clear_has_can_tx_internal_error();
}
::apollo::drivers::Esr_status2_4e1_Can_tx_internal_errorType Esr_status2_4e1::can_tx_internal_error() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_internal_error)
return static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_internal_errorType >(can_tx_internal_error_);
}
void Esr_status2_4e1::set_can_tx_internal_error(::apollo::drivers::Esr_status2_4e1_Can_tx_internal_errorType value) {
assert(::apollo::drivers::Esr_status2_4e1_Can_tx_internal_errorType_IsValid(value));
set_has_can_tx_internal_error();
can_tx_internal_error_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_internal_error)
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_grouping_modeType can_tx_grouping_mode = 10;
bool Esr_status2_4e1::has_can_tx_grouping_mode() const {
return (_has_bits_[0] & 0x00000200u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_grouping_mode() {
_has_bits_[0] |= 0x00000200u;
}
void Esr_status2_4e1::clear_has_can_tx_grouping_mode() {
_has_bits_[0] &= ~0x00000200u;
}
void Esr_status2_4e1::clear_can_tx_grouping_mode() {
can_tx_grouping_mode_ = 0;
clear_has_can_tx_grouping_mode();
}
::apollo::drivers::Esr_status2_4e1_Can_tx_grouping_modeType Esr_status2_4e1::can_tx_grouping_mode() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_grouping_mode)
return static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_grouping_modeType >(can_tx_grouping_mode_);
}
void Esr_status2_4e1::set_can_tx_grouping_mode(::apollo::drivers::Esr_status2_4e1_Can_tx_grouping_modeType value) {
assert(::apollo::drivers::Esr_status2_4e1_Can_tx_grouping_modeType_IsValid(value));
set_has_can_tx_grouping_mode();
can_tx_grouping_mode_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_grouping_mode)
}
// optional .apollo.drivers.Esr_status2_4e1.Can_tx_xcvr_operationalType can_tx_xcvr_operational = 11;
bool Esr_status2_4e1::has_can_tx_xcvr_operational() const {
return (_has_bits_[0] & 0x00000400u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_xcvr_operational() {
_has_bits_[0] |= 0x00000400u;
}
void Esr_status2_4e1::clear_has_can_tx_xcvr_operational() {
_has_bits_[0] &= ~0x00000400u;
}
void Esr_status2_4e1::clear_can_tx_xcvr_operational() {
can_tx_xcvr_operational_ = 0;
clear_has_can_tx_xcvr_operational();
}
::apollo::drivers::Esr_status2_4e1_Can_tx_xcvr_operationalType Esr_status2_4e1::can_tx_xcvr_operational() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_xcvr_operational)
return static_cast< ::apollo::drivers::Esr_status2_4e1_Can_tx_xcvr_operationalType >(can_tx_xcvr_operational_);
}
void Esr_status2_4e1::set_can_tx_xcvr_operational(::apollo::drivers::Esr_status2_4e1_Can_tx_xcvr_operationalType value) {
assert(::apollo::drivers::Esr_status2_4e1_Can_tx_xcvr_operationalType_IsValid(value));
set_has_can_tx_xcvr_operational();
can_tx_xcvr_operational_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_xcvr_operational)
}
// optional int32 can_tx_steering_angle_ack = 12;
bool Esr_status2_4e1::has_can_tx_steering_angle_ack() const {
return (_has_bits_[0] & 0x00000800u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_steering_angle_ack() {
_has_bits_[0] |= 0x00000800u;
}
void Esr_status2_4e1::clear_has_can_tx_steering_angle_ack() {
_has_bits_[0] &= ~0x00000800u;
}
void Esr_status2_4e1::clear_can_tx_steering_angle_ack() {
can_tx_steering_angle_ack_ = 0;
clear_has_can_tx_steering_angle_ack();
}
::google::protobuf::int32 Esr_status2_4e1::can_tx_steering_angle_ack() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_steering_angle_ack)
return can_tx_steering_angle_ack_;
}
void Esr_status2_4e1::set_can_tx_steering_angle_ack(::google::protobuf::int32 value) {
set_has_can_tx_steering_angle_ack();
can_tx_steering_angle_ack_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_steering_angle_ack)
}
// optional int32 can_tx_rolling_count_2 = 13;
bool Esr_status2_4e1::has_can_tx_rolling_count_2() const {
return (_has_bits_[0] & 0x00001000u) != 0;
}
void Esr_status2_4e1::set_has_can_tx_rolling_count_2() {
_has_bits_[0] |= 0x00001000u;
}
void Esr_status2_4e1::clear_has_can_tx_rolling_count_2() {
_has_bits_[0] &= ~0x00001000u;
}
void Esr_status2_4e1::clear_can_tx_rolling_count_2() {
can_tx_rolling_count_2_ = 0;
clear_has_can_tx_rolling_count_2();
}
::google::protobuf::int32 Esr_status2_4e1::can_tx_rolling_count_2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status2_4e1.can_tx_rolling_count_2)
return can_tx_rolling_count_2_;
}
void Esr_status2_4e1::set_can_tx_rolling_count_2(::google::protobuf::int32 value) {
set_has_can_tx_rolling_count_2();
can_tx_rolling_count_2_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status2_4e1.can_tx_rolling_count_2)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_status8_5e7::kCanTxHistoryFault7FieldNumber;
const int Esr_status8_5e7::kCanTxHistoryFault6FieldNumber;
const int Esr_status8_5e7::kCanTxHistoryFault5FieldNumber;
const int Esr_status8_5e7::kCanTxHistoryFault4FieldNumber;
const int Esr_status8_5e7::kCanTxHistoryFault3FieldNumber;
const int Esr_status8_5e7::kCanTxHistoryFault2FieldNumber;
const int Esr_status8_5e7::kCanTxHistoryFault1FieldNumber;
const int Esr_status8_5e7::kCanTxHistoryFault0FieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_status8_5e7::Esr_status8_5e7()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_status8_5e7)
}
void Esr_status8_5e7::InitAsDefaultInstance() {
}
Esr_status8_5e7::Esr_status8_5e7(const Esr_status8_5e7& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_status8_5e7)
}
void Esr_status8_5e7::SharedCtor() {
_cached_size_ = 0;
can_tx_history_fault_7_ = 0;
can_tx_history_fault_6_ = 0;
can_tx_history_fault_5_ = 0;
can_tx_history_fault_4_ = 0;
can_tx_history_fault_3_ = 0;
can_tx_history_fault_2_ = 0;
can_tx_history_fault_1_ = 0;
can_tx_history_fault_0_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_status8_5e7::~Esr_status8_5e7() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_status8_5e7)
SharedDtor();
}
void Esr_status8_5e7::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_status8_5e7::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_status8_5e7::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status8_5e7_descriptor_;
}
const Esr_status8_5e7& Esr_status8_5e7::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_status8_5e7* Esr_status8_5e7::default_instance_ = NULL;
Esr_status8_5e7* Esr_status8_5e7::New(::google::protobuf::Arena* arena) const {
Esr_status8_5e7* n = new Esr_status8_5e7;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_status8_5e7::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_status8_5e7)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_status8_5e7, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_status8_5e7*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_tx_history_fault_7_, can_tx_history_fault_0_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_status8_5e7::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_status8_5e7)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 can_tx_history_fault_7 = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_history_fault_7_)));
set_has_can_tx_history_fault_7();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_history_fault_6;
break;
}
// optional int32 can_tx_history_fault_6 = 2;
case 2: {
if (tag == 16) {
parse_can_tx_history_fault_6:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_history_fault_6_)));
set_has_can_tx_history_fault_6();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_tx_history_fault_5;
break;
}
// optional int32 can_tx_history_fault_5 = 3;
case 3: {
if (tag == 24) {
parse_can_tx_history_fault_5:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_history_fault_5_)));
set_has_can_tx_history_fault_5();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_history_fault_4;
break;
}
// optional int32 can_tx_history_fault_4 = 4;
case 4: {
if (tag == 32) {
parse_can_tx_history_fault_4:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_history_fault_4_)));
set_has_can_tx_history_fault_4();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_tx_history_fault_3;
break;
}
// optional int32 can_tx_history_fault_3 = 5;
case 5: {
if (tag == 40) {
parse_can_tx_history_fault_3:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_history_fault_3_)));
set_has_can_tx_history_fault_3();
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_tx_history_fault_2;
break;
}
// optional int32 can_tx_history_fault_2 = 6;
case 6: {
if (tag == 48) {
parse_can_tx_history_fault_2:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_history_fault_2_)));
set_has_can_tx_history_fault_2();
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_tx_history_fault_1;
break;
}
// optional int32 can_tx_history_fault_1 = 7;
case 7: {
if (tag == 56) {
parse_can_tx_history_fault_1:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_history_fault_1_)));
set_has_can_tx_history_fault_1();
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_can_tx_history_fault_0;
break;
}
// optional int32 can_tx_history_fault_0 = 8;
case 8: {
if (tag == 64) {
parse_can_tx_history_fault_0:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_history_fault_0_)));
set_has_can_tx_history_fault_0();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_status8_5e7)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_status8_5e7)
return false;
#undef DO_
}
void Esr_status8_5e7::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_status8_5e7)
// optional int32 can_tx_history_fault_7 = 1;
if (has_can_tx_history_fault_7()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->can_tx_history_fault_7(), output);
}
// optional int32 can_tx_history_fault_6 = 2;
if (has_can_tx_history_fault_6()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->can_tx_history_fault_6(), output);
}
// optional int32 can_tx_history_fault_5 = 3;
if (has_can_tx_history_fault_5()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->can_tx_history_fault_5(), output);
}
// optional int32 can_tx_history_fault_4 = 4;
if (has_can_tx_history_fault_4()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_tx_history_fault_4(), output);
}
// optional int32 can_tx_history_fault_3 = 5;
if (has_can_tx_history_fault_3()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->can_tx_history_fault_3(), output);
}
// optional int32 can_tx_history_fault_2 = 6;
if (has_can_tx_history_fault_2()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->can_tx_history_fault_2(), output);
}
// optional int32 can_tx_history_fault_1 = 7;
if (has_can_tx_history_fault_1()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->can_tx_history_fault_1(), output);
}
// optional int32 can_tx_history_fault_0 = 8;
if (has_can_tx_history_fault_0()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->can_tx_history_fault_0(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_status8_5e7)
}
::google::protobuf::uint8* Esr_status8_5e7::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_status8_5e7)
// optional int32 can_tx_history_fault_7 = 1;
if (has_can_tx_history_fault_7()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->can_tx_history_fault_7(), target);
}
// optional int32 can_tx_history_fault_6 = 2;
if (has_can_tx_history_fault_6()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->can_tx_history_fault_6(), target);
}
// optional int32 can_tx_history_fault_5 = 3;
if (has_can_tx_history_fault_5()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->can_tx_history_fault_5(), target);
}
// optional int32 can_tx_history_fault_4 = 4;
if (has_can_tx_history_fault_4()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_tx_history_fault_4(), target);
}
// optional int32 can_tx_history_fault_3 = 5;
if (has_can_tx_history_fault_3()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->can_tx_history_fault_3(), target);
}
// optional int32 can_tx_history_fault_2 = 6;
if (has_can_tx_history_fault_2()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->can_tx_history_fault_2(), target);
}
// optional int32 can_tx_history_fault_1 = 7;
if (has_can_tx_history_fault_1()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->can_tx_history_fault_1(), target);
}
// optional int32 can_tx_history_fault_0 = 8;
if (has_can_tx_history_fault_0()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->can_tx_history_fault_0(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_status8_5e7)
return target;
}
int Esr_status8_5e7::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_status8_5e7)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional int32 can_tx_history_fault_7 = 1;
if (has_can_tx_history_fault_7()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_history_fault_7());
}
// optional int32 can_tx_history_fault_6 = 2;
if (has_can_tx_history_fault_6()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_history_fault_6());
}
// optional int32 can_tx_history_fault_5 = 3;
if (has_can_tx_history_fault_5()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_history_fault_5());
}
// optional int32 can_tx_history_fault_4 = 4;
if (has_can_tx_history_fault_4()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_history_fault_4());
}
// optional int32 can_tx_history_fault_3 = 5;
if (has_can_tx_history_fault_3()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_history_fault_3());
}
// optional int32 can_tx_history_fault_2 = 6;
if (has_can_tx_history_fault_2()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_history_fault_2());
}
// optional int32 can_tx_history_fault_1 = 7;
if (has_can_tx_history_fault_1()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_history_fault_1());
}
// optional int32 can_tx_history_fault_0 = 8;
if (has_can_tx_history_fault_0()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_history_fault_0());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_status8_5e7::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_status8_5e7)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_status8_5e7* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_status8_5e7>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_status8_5e7)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_status8_5e7)
MergeFrom(*source);
}
}
void Esr_status8_5e7::MergeFrom(const Esr_status8_5e7& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_status8_5e7)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_history_fault_7()) {
set_can_tx_history_fault_7(from.can_tx_history_fault_7());
}
if (from.has_can_tx_history_fault_6()) {
set_can_tx_history_fault_6(from.can_tx_history_fault_6());
}
if (from.has_can_tx_history_fault_5()) {
set_can_tx_history_fault_5(from.can_tx_history_fault_5());
}
if (from.has_can_tx_history_fault_4()) {
set_can_tx_history_fault_4(from.can_tx_history_fault_4());
}
if (from.has_can_tx_history_fault_3()) {
set_can_tx_history_fault_3(from.can_tx_history_fault_3());
}
if (from.has_can_tx_history_fault_2()) {
set_can_tx_history_fault_2(from.can_tx_history_fault_2());
}
if (from.has_can_tx_history_fault_1()) {
set_can_tx_history_fault_1(from.can_tx_history_fault_1());
}
if (from.has_can_tx_history_fault_0()) {
set_can_tx_history_fault_0(from.can_tx_history_fault_0());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_status8_5e7::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_status8_5e7)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_status8_5e7::CopyFrom(const Esr_status8_5e7& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_status8_5e7)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_status8_5e7::IsInitialized() const {
return true;
}
void Esr_status8_5e7::Swap(Esr_status8_5e7* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_status8_5e7::InternalSwap(Esr_status8_5e7* other) {
std::swap(can_tx_history_fault_7_, other->can_tx_history_fault_7_);
std::swap(can_tx_history_fault_6_, other->can_tx_history_fault_6_);
std::swap(can_tx_history_fault_5_, other->can_tx_history_fault_5_);
std::swap(can_tx_history_fault_4_, other->can_tx_history_fault_4_);
std::swap(can_tx_history_fault_3_, other->can_tx_history_fault_3_);
std::swap(can_tx_history_fault_2_, other->can_tx_history_fault_2_);
std::swap(can_tx_history_fault_1_, other->can_tx_history_fault_1_);
std::swap(can_tx_history_fault_0_, other->can_tx_history_fault_0_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_status8_5e7::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_status8_5e7_descriptor_;
metadata.reflection = Esr_status8_5e7_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_status8_5e7
// optional int32 can_tx_history_fault_7 = 1;
bool Esr_status8_5e7::has_can_tx_history_fault_7() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_status8_5e7::set_has_can_tx_history_fault_7() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_status8_5e7::clear_has_can_tx_history_fault_7() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_status8_5e7::clear_can_tx_history_fault_7() {
can_tx_history_fault_7_ = 0;
clear_has_can_tx_history_fault_7();
}
::google::protobuf::int32 Esr_status8_5e7::can_tx_history_fault_7() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_7)
return can_tx_history_fault_7_;
}
void Esr_status8_5e7::set_can_tx_history_fault_7(::google::protobuf::int32 value) {
set_has_can_tx_history_fault_7();
can_tx_history_fault_7_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_7)
}
// optional int32 can_tx_history_fault_6 = 2;
bool Esr_status8_5e7::has_can_tx_history_fault_6() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_status8_5e7::set_has_can_tx_history_fault_6() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_status8_5e7::clear_has_can_tx_history_fault_6() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_status8_5e7::clear_can_tx_history_fault_6() {
can_tx_history_fault_6_ = 0;
clear_has_can_tx_history_fault_6();
}
::google::protobuf::int32 Esr_status8_5e7::can_tx_history_fault_6() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_6)
return can_tx_history_fault_6_;
}
void Esr_status8_5e7::set_can_tx_history_fault_6(::google::protobuf::int32 value) {
set_has_can_tx_history_fault_6();
can_tx_history_fault_6_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_6)
}
// optional int32 can_tx_history_fault_5 = 3;
bool Esr_status8_5e7::has_can_tx_history_fault_5() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_status8_5e7::set_has_can_tx_history_fault_5() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_status8_5e7::clear_has_can_tx_history_fault_5() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_status8_5e7::clear_can_tx_history_fault_5() {
can_tx_history_fault_5_ = 0;
clear_has_can_tx_history_fault_5();
}
::google::protobuf::int32 Esr_status8_5e7::can_tx_history_fault_5() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_5)
return can_tx_history_fault_5_;
}
void Esr_status8_5e7::set_can_tx_history_fault_5(::google::protobuf::int32 value) {
set_has_can_tx_history_fault_5();
can_tx_history_fault_5_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_5)
}
// optional int32 can_tx_history_fault_4 = 4;
bool Esr_status8_5e7::has_can_tx_history_fault_4() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_status8_5e7::set_has_can_tx_history_fault_4() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_status8_5e7::clear_has_can_tx_history_fault_4() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_status8_5e7::clear_can_tx_history_fault_4() {
can_tx_history_fault_4_ = 0;
clear_has_can_tx_history_fault_4();
}
::google::protobuf::int32 Esr_status8_5e7::can_tx_history_fault_4() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_4)
return can_tx_history_fault_4_;
}
void Esr_status8_5e7::set_can_tx_history_fault_4(::google::protobuf::int32 value) {
set_has_can_tx_history_fault_4();
can_tx_history_fault_4_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_4)
}
// optional int32 can_tx_history_fault_3 = 5;
bool Esr_status8_5e7::has_can_tx_history_fault_3() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_status8_5e7::set_has_can_tx_history_fault_3() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_status8_5e7::clear_has_can_tx_history_fault_3() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_status8_5e7::clear_can_tx_history_fault_3() {
can_tx_history_fault_3_ = 0;
clear_has_can_tx_history_fault_3();
}
::google::protobuf::int32 Esr_status8_5e7::can_tx_history_fault_3() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_3)
return can_tx_history_fault_3_;
}
void Esr_status8_5e7::set_can_tx_history_fault_3(::google::protobuf::int32 value) {
set_has_can_tx_history_fault_3();
can_tx_history_fault_3_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_3)
}
// optional int32 can_tx_history_fault_2 = 6;
bool Esr_status8_5e7::has_can_tx_history_fault_2() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Esr_status8_5e7::set_has_can_tx_history_fault_2() {
_has_bits_[0] |= 0x00000020u;
}
void Esr_status8_5e7::clear_has_can_tx_history_fault_2() {
_has_bits_[0] &= ~0x00000020u;
}
void Esr_status8_5e7::clear_can_tx_history_fault_2() {
can_tx_history_fault_2_ = 0;
clear_has_can_tx_history_fault_2();
}
::google::protobuf::int32 Esr_status8_5e7::can_tx_history_fault_2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_2)
return can_tx_history_fault_2_;
}
void Esr_status8_5e7::set_can_tx_history_fault_2(::google::protobuf::int32 value) {
set_has_can_tx_history_fault_2();
can_tx_history_fault_2_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_2)
}
// optional int32 can_tx_history_fault_1 = 7;
bool Esr_status8_5e7::has_can_tx_history_fault_1() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Esr_status8_5e7::set_has_can_tx_history_fault_1() {
_has_bits_[0] |= 0x00000040u;
}
void Esr_status8_5e7::clear_has_can_tx_history_fault_1() {
_has_bits_[0] &= ~0x00000040u;
}
void Esr_status8_5e7::clear_can_tx_history_fault_1() {
can_tx_history_fault_1_ = 0;
clear_has_can_tx_history_fault_1();
}
::google::protobuf::int32 Esr_status8_5e7::can_tx_history_fault_1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_1)
return can_tx_history_fault_1_;
}
void Esr_status8_5e7::set_can_tx_history_fault_1(::google::protobuf::int32 value) {
set_has_can_tx_history_fault_1();
can_tx_history_fault_1_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_1)
}
// optional int32 can_tx_history_fault_0 = 8;
bool Esr_status8_5e7::has_can_tx_history_fault_0() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Esr_status8_5e7::set_has_can_tx_history_fault_0() {
_has_bits_[0] |= 0x00000080u;
}
void Esr_status8_5e7::clear_has_can_tx_history_fault_0() {
_has_bits_[0] &= ~0x00000080u;
}
void Esr_status8_5e7::clear_can_tx_history_fault_0() {
can_tx_history_fault_0_ = 0;
clear_has_can_tx_history_fault_0();
}
::google::protobuf::int32 Esr_status8_5e7::can_tx_history_fault_0() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_0)
return can_tx_history_fault_0_;
}
void Esr_status8_5e7::set_can_tx_history_fault_0(::google::protobuf::int32 value) {
set_has_can_tx_history_fault_0();
can_tx_history_fault_0_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status8_5e7.can_tx_history_fault_0)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Esr_status7_5e6::kCanTxActiveFault7FieldNumber;
const int Esr_status7_5e6::kCanTxActiveFault6FieldNumber;
const int Esr_status7_5e6::kCanTxActiveFault5FieldNumber;
const int Esr_status7_5e6::kCanTxActiveFault4FieldNumber;
const int Esr_status7_5e6::kCanTxActiveFault3FieldNumber;
const int Esr_status7_5e6::kCanTxActiveFault2FieldNumber;
const int Esr_status7_5e6::kCanTxActiveFault0FieldNumber;
const int Esr_status7_5e6::kCanTxActiveFault1FieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Esr_status7_5e6::Esr_status7_5e6()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Esr_status7_5e6)
}
void Esr_status7_5e6::InitAsDefaultInstance() {
}
Esr_status7_5e6::Esr_status7_5e6(const Esr_status7_5e6& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Esr_status7_5e6)
}
void Esr_status7_5e6::SharedCtor() {
_cached_size_ = 0;
can_tx_active_fault_7_ = 0;
can_tx_active_fault_6_ = 0;
can_tx_active_fault_5_ = 0;
can_tx_active_fault_4_ = 0;
can_tx_active_fault_3_ = 0;
can_tx_active_fault_2_ = 0;
can_tx_active_fault_0_ = 0;
can_tx_active_fault_1_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esr_status7_5e6::~Esr_status7_5e6() {
// @@protoc_insertion_point(destructor:apollo.drivers.Esr_status7_5e6)
SharedDtor();
}
void Esr_status7_5e6::SharedDtor() {
if (this != default_instance_) {
}
}
void Esr_status7_5e6::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Esr_status7_5e6::descriptor() {
protobuf_AssignDescriptorsOnce();
return Esr_status7_5e6_descriptor_;
}
const Esr_status7_5e6& Esr_status7_5e6::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Esr_status7_5e6* Esr_status7_5e6::default_instance_ = NULL;
Esr_status7_5e6* Esr_status7_5e6::New(::google::protobuf::Arena* arena) const {
Esr_status7_5e6* n = new Esr_status7_5e6;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Esr_status7_5e6::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Esr_status7_5e6)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Esr_status7_5e6, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Esr_status7_5e6*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_tx_active_fault_7_, can_tx_active_fault_1_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Esr_status7_5e6::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Esr_status7_5e6)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 can_tx_active_fault_7 = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_active_fault_7_)));
set_has_can_tx_active_fault_7();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_tx_active_fault_6;
break;
}
// optional int32 can_tx_active_fault_6 = 2;
case 2: {
if (tag == 16) {
parse_can_tx_active_fault_6:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_active_fault_6_)));
set_has_can_tx_active_fault_6();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_tx_active_fault_5;
break;
}
// optional int32 can_tx_active_fault_5 = 3;
case 3: {
if (tag == 24) {
parse_can_tx_active_fault_5:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_active_fault_5_)));
set_has_can_tx_active_fault_5();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_tx_active_fault_4;
break;
}
// optional int32 can_tx_active_fault_4 = 4;
case 4: {
if (tag == 32) {
parse_can_tx_active_fault_4:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_active_fault_4_)));
set_has_can_tx_active_fault_4();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_tx_active_fault_3;
break;
}
// optional int32 can_tx_active_fault_3 = 5;
case 5: {
if (tag == 40) {
parse_can_tx_active_fault_3:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_active_fault_3_)));
set_has_can_tx_active_fault_3();
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_tx_active_fault_2;
break;
}
// optional int32 can_tx_active_fault_2 = 6;
case 6: {
if (tag == 48) {
parse_can_tx_active_fault_2:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_active_fault_2_)));
set_has_can_tx_active_fault_2();
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_tx_active_fault_0;
break;
}
// optional int32 can_tx_active_fault_0 = 7;
case 7: {
if (tag == 56) {
parse_can_tx_active_fault_0:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_active_fault_0_)));
set_has_can_tx_active_fault_0();
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_can_tx_active_fault_1;
break;
}
// optional int32 can_tx_active_fault_1 = 8;
case 8: {
if (tag == 64) {
parse_can_tx_active_fault_1:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_tx_active_fault_1_)));
set_has_can_tx_active_fault_1();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Esr_status7_5e6)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Esr_status7_5e6)
return false;
#undef DO_
}
void Esr_status7_5e6::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Esr_status7_5e6)
// optional int32 can_tx_active_fault_7 = 1;
if (has_can_tx_active_fault_7()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->can_tx_active_fault_7(), output);
}
// optional int32 can_tx_active_fault_6 = 2;
if (has_can_tx_active_fault_6()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->can_tx_active_fault_6(), output);
}
// optional int32 can_tx_active_fault_5 = 3;
if (has_can_tx_active_fault_5()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->can_tx_active_fault_5(), output);
}
// optional int32 can_tx_active_fault_4 = 4;
if (has_can_tx_active_fault_4()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_tx_active_fault_4(), output);
}
// optional int32 can_tx_active_fault_3 = 5;
if (has_can_tx_active_fault_3()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->can_tx_active_fault_3(), output);
}
// optional int32 can_tx_active_fault_2 = 6;
if (has_can_tx_active_fault_2()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->can_tx_active_fault_2(), output);
}
// optional int32 can_tx_active_fault_0 = 7;
if (has_can_tx_active_fault_0()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->can_tx_active_fault_0(), output);
}
// optional int32 can_tx_active_fault_1 = 8;
if (has_can_tx_active_fault_1()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->can_tx_active_fault_1(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Esr_status7_5e6)
}
::google::protobuf::uint8* Esr_status7_5e6::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Esr_status7_5e6)
// optional int32 can_tx_active_fault_7 = 1;
if (has_can_tx_active_fault_7()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->can_tx_active_fault_7(), target);
}
// optional int32 can_tx_active_fault_6 = 2;
if (has_can_tx_active_fault_6()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->can_tx_active_fault_6(), target);
}
// optional int32 can_tx_active_fault_5 = 3;
if (has_can_tx_active_fault_5()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->can_tx_active_fault_5(), target);
}
// optional int32 can_tx_active_fault_4 = 4;
if (has_can_tx_active_fault_4()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_tx_active_fault_4(), target);
}
// optional int32 can_tx_active_fault_3 = 5;
if (has_can_tx_active_fault_3()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->can_tx_active_fault_3(), target);
}
// optional int32 can_tx_active_fault_2 = 6;
if (has_can_tx_active_fault_2()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->can_tx_active_fault_2(), target);
}
// optional int32 can_tx_active_fault_0 = 7;
if (has_can_tx_active_fault_0()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->can_tx_active_fault_0(), target);
}
// optional int32 can_tx_active_fault_1 = 8;
if (has_can_tx_active_fault_1()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->can_tx_active_fault_1(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Esr_status7_5e6)
return target;
}
int Esr_status7_5e6::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Esr_status7_5e6)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional int32 can_tx_active_fault_7 = 1;
if (has_can_tx_active_fault_7()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_active_fault_7());
}
// optional int32 can_tx_active_fault_6 = 2;
if (has_can_tx_active_fault_6()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_active_fault_6());
}
// optional int32 can_tx_active_fault_5 = 3;
if (has_can_tx_active_fault_5()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_active_fault_5());
}
// optional int32 can_tx_active_fault_4 = 4;
if (has_can_tx_active_fault_4()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_active_fault_4());
}
// optional int32 can_tx_active_fault_3 = 5;
if (has_can_tx_active_fault_3()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_active_fault_3());
}
// optional int32 can_tx_active_fault_2 = 6;
if (has_can_tx_active_fault_2()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_active_fault_2());
}
// optional int32 can_tx_active_fault_0 = 7;
if (has_can_tx_active_fault_0()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_active_fault_0());
}
// optional int32 can_tx_active_fault_1 = 8;
if (has_can_tx_active_fault_1()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_tx_active_fault_1());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Esr_status7_5e6::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Esr_status7_5e6)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Esr_status7_5e6* source =
::google::protobuf::internal::DynamicCastToGenerated<const Esr_status7_5e6>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Esr_status7_5e6)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Esr_status7_5e6)
MergeFrom(*source);
}
}
void Esr_status7_5e6::MergeFrom(const Esr_status7_5e6& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Esr_status7_5e6)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_tx_active_fault_7()) {
set_can_tx_active_fault_7(from.can_tx_active_fault_7());
}
if (from.has_can_tx_active_fault_6()) {
set_can_tx_active_fault_6(from.can_tx_active_fault_6());
}
if (from.has_can_tx_active_fault_5()) {
set_can_tx_active_fault_5(from.can_tx_active_fault_5());
}
if (from.has_can_tx_active_fault_4()) {
set_can_tx_active_fault_4(from.can_tx_active_fault_4());
}
if (from.has_can_tx_active_fault_3()) {
set_can_tx_active_fault_3(from.can_tx_active_fault_3());
}
if (from.has_can_tx_active_fault_2()) {
set_can_tx_active_fault_2(from.can_tx_active_fault_2());
}
if (from.has_can_tx_active_fault_0()) {
set_can_tx_active_fault_0(from.can_tx_active_fault_0());
}
if (from.has_can_tx_active_fault_1()) {
set_can_tx_active_fault_1(from.can_tx_active_fault_1());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Esr_status7_5e6::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Esr_status7_5e6)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Esr_status7_5e6::CopyFrom(const Esr_status7_5e6& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Esr_status7_5e6)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Esr_status7_5e6::IsInitialized() const {
return true;
}
void Esr_status7_5e6::Swap(Esr_status7_5e6* other) {
if (other == this) return;
InternalSwap(other);
}
void Esr_status7_5e6::InternalSwap(Esr_status7_5e6* other) {
std::swap(can_tx_active_fault_7_, other->can_tx_active_fault_7_);
std::swap(can_tx_active_fault_6_, other->can_tx_active_fault_6_);
std::swap(can_tx_active_fault_5_, other->can_tx_active_fault_5_);
std::swap(can_tx_active_fault_4_, other->can_tx_active_fault_4_);
std::swap(can_tx_active_fault_3_, other->can_tx_active_fault_3_);
std::swap(can_tx_active_fault_2_, other->can_tx_active_fault_2_);
std::swap(can_tx_active_fault_0_, other->can_tx_active_fault_0_);
std::swap(can_tx_active_fault_1_, other->can_tx_active_fault_1_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Esr_status7_5e6::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Esr_status7_5e6_descriptor_;
metadata.reflection = Esr_status7_5e6_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Esr_status7_5e6
// optional int32 can_tx_active_fault_7 = 1;
bool Esr_status7_5e6::has_can_tx_active_fault_7() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Esr_status7_5e6::set_has_can_tx_active_fault_7() {
_has_bits_[0] |= 0x00000001u;
}
void Esr_status7_5e6::clear_has_can_tx_active_fault_7() {
_has_bits_[0] &= ~0x00000001u;
}
void Esr_status7_5e6::clear_can_tx_active_fault_7() {
can_tx_active_fault_7_ = 0;
clear_has_can_tx_active_fault_7();
}
::google::protobuf::int32 Esr_status7_5e6::can_tx_active_fault_7() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_7)
return can_tx_active_fault_7_;
}
void Esr_status7_5e6::set_can_tx_active_fault_7(::google::protobuf::int32 value) {
set_has_can_tx_active_fault_7();
can_tx_active_fault_7_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_7)
}
// optional int32 can_tx_active_fault_6 = 2;
bool Esr_status7_5e6::has_can_tx_active_fault_6() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Esr_status7_5e6::set_has_can_tx_active_fault_6() {
_has_bits_[0] |= 0x00000002u;
}
void Esr_status7_5e6::clear_has_can_tx_active_fault_6() {
_has_bits_[0] &= ~0x00000002u;
}
void Esr_status7_5e6::clear_can_tx_active_fault_6() {
can_tx_active_fault_6_ = 0;
clear_has_can_tx_active_fault_6();
}
::google::protobuf::int32 Esr_status7_5e6::can_tx_active_fault_6() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_6)
return can_tx_active_fault_6_;
}
void Esr_status7_5e6::set_can_tx_active_fault_6(::google::protobuf::int32 value) {
set_has_can_tx_active_fault_6();
can_tx_active_fault_6_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_6)
}
// optional int32 can_tx_active_fault_5 = 3;
bool Esr_status7_5e6::has_can_tx_active_fault_5() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Esr_status7_5e6::set_has_can_tx_active_fault_5() {
_has_bits_[0] |= 0x00000004u;
}
void Esr_status7_5e6::clear_has_can_tx_active_fault_5() {
_has_bits_[0] &= ~0x00000004u;
}
void Esr_status7_5e6::clear_can_tx_active_fault_5() {
can_tx_active_fault_5_ = 0;
clear_has_can_tx_active_fault_5();
}
::google::protobuf::int32 Esr_status7_5e6::can_tx_active_fault_5() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_5)
return can_tx_active_fault_5_;
}
void Esr_status7_5e6::set_can_tx_active_fault_5(::google::protobuf::int32 value) {
set_has_can_tx_active_fault_5();
can_tx_active_fault_5_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_5)
}
// optional int32 can_tx_active_fault_4 = 4;
bool Esr_status7_5e6::has_can_tx_active_fault_4() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Esr_status7_5e6::set_has_can_tx_active_fault_4() {
_has_bits_[0] |= 0x00000008u;
}
void Esr_status7_5e6::clear_has_can_tx_active_fault_4() {
_has_bits_[0] &= ~0x00000008u;
}
void Esr_status7_5e6::clear_can_tx_active_fault_4() {
can_tx_active_fault_4_ = 0;
clear_has_can_tx_active_fault_4();
}
::google::protobuf::int32 Esr_status7_5e6::can_tx_active_fault_4() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_4)
return can_tx_active_fault_4_;
}
void Esr_status7_5e6::set_can_tx_active_fault_4(::google::protobuf::int32 value) {
set_has_can_tx_active_fault_4();
can_tx_active_fault_4_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_4)
}
// optional int32 can_tx_active_fault_3 = 5;
bool Esr_status7_5e6::has_can_tx_active_fault_3() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Esr_status7_5e6::set_has_can_tx_active_fault_3() {
_has_bits_[0] |= 0x00000010u;
}
void Esr_status7_5e6::clear_has_can_tx_active_fault_3() {
_has_bits_[0] &= ~0x00000010u;
}
void Esr_status7_5e6::clear_can_tx_active_fault_3() {
can_tx_active_fault_3_ = 0;
clear_has_can_tx_active_fault_3();
}
::google::protobuf::int32 Esr_status7_5e6::can_tx_active_fault_3() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_3)
return can_tx_active_fault_3_;
}
void Esr_status7_5e6::set_can_tx_active_fault_3(::google::protobuf::int32 value) {
set_has_can_tx_active_fault_3();
can_tx_active_fault_3_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_3)
}
// optional int32 can_tx_active_fault_2 = 6;
bool Esr_status7_5e6::has_can_tx_active_fault_2() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Esr_status7_5e6::set_has_can_tx_active_fault_2() {
_has_bits_[0] |= 0x00000020u;
}
void Esr_status7_5e6::clear_has_can_tx_active_fault_2() {
_has_bits_[0] &= ~0x00000020u;
}
void Esr_status7_5e6::clear_can_tx_active_fault_2() {
can_tx_active_fault_2_ = 0;
clear_has_can_tx_active_fault_2();
}
::google::protobuf::int32 Esr_status7_5e6::can_tx_active_fault_2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_2)
return can_tx_active_fault_2_;
}
void Esr_status7_5e6::set_can_tx_active_fault_2(::google::protobuf::int32 value) {
set_has_can_tx_active_fault_2();
can_tx_active_fault_2_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_2)
}
// optional int32 can_tx_active_fault_0 = 7;
bool Esr_status7_5e6::has_can_tx_active_fault_0() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Esr_status7_5e6::set_has_can_tx_active_fault_0() {
_has_bits_[0] |= 0x00000040u;
}
void Esr_status7_5e6::clear_has_can_tx_active_fault_0() {
_has_bits_[0] &= ~0x00000040u;
}
void Esr_status7_5e6::clear_can_tx_active_fault_0() {
can_tx_active_fault_0_ = 0;
clear_has_can_tx_active_fault_0();
}
::google::protobuf::int32 Esr_status7_5e6::can_tx_active_fault_0() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_0)
return can_tx_active_fault_0_;
}
void Esr_status7_5e6::set_can_tx_active_fault_0(::google::protobuf::int32 value) {
set_has_can_tx_active_fault_0();
can_tx_active_fault_0_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_0)
}
// optional int32 can_tx_active_fault_1 = 8;
bool Esr_status7_5e6::has_can_tx_active_fault_1() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Esr_status7_5e6::set_has_can_tx_active_fault_1() {
_has_bits_[0] |= 0x00000080u;
}
void Esr_status7_5e6::clear_has_can_tx_active_fault_1() {
_has_bits_[0] &= ~0x00000080u;
}
void Esr_status7_5e6::clear_can_tx_active_fault_1() {
can_tx_active_fault_1_ = 0;
clear_has_can_tx_active_fault_1();
}
::google::protobuf::int32 Esr_status7_5e6::can_tx_active_fault_1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_1)
return can_tx_active_fault_1_;
}
void Esr_status7_5e6::set_can_tx_active_fault_1(::google::protobuf::int32 value) {
set_has_can_tx_active_fault_1();
can_tx_active_fault_1_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Esr_status7_5e6.can_tx_active_fault_1)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_serv_align_typeType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle3_5f2_Can_rx_serv_align_typeType_descriptor_;
}
bool Vehicle3_5f2_Can_rx_serv_align_typeType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle3_5f2_Can_rx_serv_align_typeType Vehicle3_5f2::CAN_RX_SERV_ALIGN_TYPE_AUTO_OR_DEALER;
const Vehicle3_5f2_Can_rx_serv_align_typeType Vehicle3_5f2::CAN_RX_SERV_ALIGN_TYPE_VOLVO_SHORT_TRACK;
const Vehicle3_5f2_Can_rx_serv_align_typeType Vehicle3_5f2::Can_rx_serv_align_typeType_MIN;
const Vehicle3_5f2_Can_rx_serv_align_typeType Vehicle3_5f2::Can_rx_serv_align_typeType_MAX;
const int Vehicle3_5f2::Can_rx_serv_align_typeType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_serv_align_enableType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle3_5f2_Can_rx_serv_align_enableType_descriptor_;
}
bool Vehicle3_5f2_Can_rx_serv_align_enableType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle3_5f2_Can_rx_serv_align_enableType Vehicle3_5f2::CAN_RX_SERV_ALIGN_ENABLE_DISABLED;
const Vehicle3_5f2_Can_rx_serv_align_enableType Vehicle3_5f2::CAN_RX_SERV_ALIGN_ENABLE_ENABLED;
const Vehicle3_5f2_Can_rx_serv_align_enableType Vehicle3_5f2::Can_rx_serv_align_enableType_MIN;
const Vehicle3_5f2_Can_rx_serv_align_enableType Vehicle3_5f2::Can_rx_serv_align_enableType_MAX;
const int Vehicle3_5f2::Can_rx_serv_align_enableType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_auto_align_convergedType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle3_5f2_Can_rx_auto_align_convergedType_descriptor_;
}
bool Vehicle3_5f2_Can_rx_auto_align_convergedType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle3_5f2_Can_rx_auto_align_convergedType Vehicle3_5f2::CAN_RX_AUTO_ALIGN_CONVERGED_NOT_CONVERGED;
const Vehicle3_5f2_Can_rx_auto_align_convergedType Vehicle3_5f2::CAN_RX_AUTO_ALIGN_CONVERGED_CONVERGED;
const Vehicle3_5f2_Can_rx_auto_align_convergedType Vehicle3_5f2::Can_rx_auto_align_convergedType_MIN;
const Vehicle3_5f2_Can_rx_auto_align_convergedType Vehicle3_5f2::Can_rx_auto_align_convergedType_MAX;
const int Vehicle3_5f2::Can_rx_auto_align_convergedType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_auto_align_disableType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle3_5f2_Can_rx_auto_align_disableType_descriptor_;
}
bool Vehicle3_5f2_Can_rx_auto_align_disableType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle3_5f2_Can_rx_auto_align_disableType Vehicle3_5f2::CAN_RX_AUTO_ALIGN_DISABLE_ENABLED;
const Vehicle3_5f2_Can_rx_auto_align_disableType Vehicle3_5f2::CAN_RX_AUTO_ALIGN_DISABLE_DISABLED;
const Vehicle3_5f2_Can_rx_auto_align_disableType Vehicle3_5f2::Can_rx_auto_align_disableType_MIN;
const Vehicle3_5f2_Can_rx_auto_align_disableType Vehicle3_5f2::Can_rx_auto_align_disableType_MAX;
const int Vehicle3_5f2::Can_rx_auto_align_disableType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_wheel_slipType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle3_5f2_Can_rx_wheel_slipType_descriptor_;
}
bool Vehicle3_5f2_Can_rx_wheel_slipType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle3_5f2_Can_rx_wheel_slipType Vehicle3_5f2::CAN_RX_WHEEL_SLIP_NO_CONTROL;
const Vehicle3_5f2_Can_rx_wheel_slipType Vehicle3_5f2::CAN_RX_WHEEL_SLIP_BRAKE_SLIP_CONTROL;
const Vehicle3_5f2_Can_rx_wheel_slipType Vehicle3_5f2::CAN_RX_WHEEL_SLIP_TRACTION_SLIP_CONTROL;
const Vehicle3_5f2_Can_rx_wheel_slipType Vehicle3_5f2::CAN_RX_WHEEL_SLIP_INVALID_3;
const Vehicle3_5f2_Can_rx_wheel_slipType Vehicle3_5f2::Can_rx_wheel_slipType_MIN;
const Vehicle3_5f2_Can_rx_wheel_slipType Vehicle3_5f2::Can_rx_wheel_slipType_MAX;
const int Vehicle3_5f2::Can_rx_wheel_slipType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_long_accel_validityType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle3_5f2_Can_rx_long_accel_validityType_descriptor_;
}
bool Vehicle3_5f2_Can_rx_long_accel_validityType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle3_5f2_Can_rx_long_accel_validityType Vehicle3_5f2::CAN_RX_LONG_ACCEL_VALIDITY_INVALID;
const Vehicle3_5f2_Can_rx_long_accel_validityType Vehicle3_5f2::CAN_RX_LONG_ACCEL_VALIDITY_VALID;
const Vehicle3_5f2_Can_rx_long_accel_validityType Vehicle3_5f2::Can_rx_long_accel_validityType_MIN;
const Vehicle3_5f2_Can_rx_long_accel_validityType Vehicle3_5f2::Can_rx_long_accel_validityType_MAX;
const int Vehicle3_5f2::Can_rx_long_accel_validityType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle3_5f2_Can_rx_lat_accel_validityType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle3_5f2_Can_rx_lat_accel_validityType_descriptor_;
}
bool Vehicle3_5f2_Can_rx_lat_accel_validityType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle3_5f2_Can_rx_lat_accel_validityType Vehicle3_5f2::CAN_RX_LAT_ACCEL_VALIDITY_INVALID;
const Vehicle3_5f2_Can_rx_lat_accel_validityType Vehicle3_5f2::CAN_RX_LAT_ACCEL_VALIDITY_VALID;
const Vehicle3_5f2_Can_rx_lat_accel_validityType Vehicle3_5f2::Can_rx_lat_accel_validityType_MIN;
const Vehicle3_5f2_Can_rx_lat_accel_validityType Vehicle3_5f2::Can_rx_lat_accel_validityType_MAX;
const int Vehicle3_5f2::Can_rx_lat_accel_validityType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Vehicle3_5f2::kCanRxServAlignUpdatesNeedFieldNumber;
const int Vehicle3_5f2::kCanRxServAlignTypeFieldNumber;
const int Vehicle3_5f2::kCanRxServAlignEnableFieldNumber;
const int Vehicle3_5f2::kCanRxAalignAvgCtrTotalFieldNumber;
const int Vehicle3_5f2::kCanRxAutoAlignConvergedFieldNumber;
const int Vehicle3_5f2::kCanRxAutoAlignDisableFieldNumber;
const int Vehicle3_5f2::kCanRxAngleMountingOffsetFieldNumber;
const int Vehicle3_5f2::kCanRxWheelSlipFieldNumber;
const int Vehicle3_5f2::kCanRxRadarHeightFieldNumber;
const int Vehicle3_5f2::kCanRxRadarFovMrFieldNumber;
const int Vehicle3_5f2::kCanRxRadarFovLrFieldNumber;
const int Vehicle3_5f2::kCanRxLongAccelValidityFieldNumber;
const int Vehicle3_5f2::kCanRxLongAccelFieldNumber;
const int Vehicle3_5f2::kCanRxLatAccelValidityFieldNumber;
const int Vehicle3_5f2::kCanRxLatAccelFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Vehicle3_5f2::Vehicle3_5f2()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Vehicle3_5f2)
}
void Vehicle3_5f2::InitAsDefaultInstance() {
}
Vehicle3_5f2::Vehicle3_5f2(const Vehicle3_5f2& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Vehicle3_5f2)
}
void Vehicle3_5f2::SharedCtor() {
_cached_size_ = 0;
can_rx_serv_align_updates_need_ = 0;
can_rx_serv_align_type_ = 0;
can_rx_serv_align_enable_ = 0;
can_rx_aalign_avg_ctr_total_ = 0;
can_rx_auto_align_converged_ = 0;
can_rx_auto_align_disable_ = 0;
can_rx_angle_mounting_offset_ = 0;
can_rx_wheel_slip_ = 0;
can_rx_radar_height_ = 0;
can_rx_radar_fov_mr_ = 0;
can_rx_radar_fov_lr_ = 0;
can_rx_long_accel_validity_ = 0;
can_rx_long_accel_ = 0;
can_rx_lat_accel_validity_ = 0;
can_rx_lat_accel_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Vehicle3_5f2::~Vehicle3_5f2() {
// @@protoc_insertion_point(destructor:apollo.drivers.Vehicle3_5f2)
SharedDtor();
}
void Vehicle3_5f2::SharedDtor() {
if (this != default_instance_) {
}
}
void Vehicle3_5f2::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Vehicle3_5f2::descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle3_5f2_descriptor_;
}
const Vehicle3_5f2& Vehicle3_5f2::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Vehicle3_5f2* Vehicle3_5f2::default_instance_ = NULL;
Vehicle3_5f2* Vehicle3_5f2::New(::google::protobuf::Arena* arena) const {
Vehicle3_5f2* n = new Vehicle3_5f2;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Vehicle3_5f2::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Vehicle3_5f2)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Vehicle3_5f2, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Vehicle3_5f2*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_rx_serv_align_updates_need_, can_rx_wheel_slip_);
}
if (_has_bits_[8 / 32] & 32512u) {
ZR_(can_rx_radar_height_, can_rx_lat_accel_validity_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Vehicle3_5f2::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Vehicle3_5f2)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 can_rx_serv_align_updates_need = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_serv_align_updates_need_)));
set_has_can_rx_serv_align_updates_need();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_can_rx_serv_align_type;
break;
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_serv_align_typeType can_rx_serv_align_type = 2;
case 2: {
if (tag == 16) {
parse_can_rx_serv_align_type:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_typeType_IsValid(value)) {
set_can_rx_serv_align_type(static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_typeType >(value));
} else {
mutable_unknown_fields()->AddVarint(2, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_rx_serv_align_enable;
break;
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_serv_align_enableType can_rx_serv_align_enable = 3;
case 3: {
if (tag == 24) {
parse_can_rx_serv_align_enable:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_enableType_IsValid(value)) {
set_can_rx_serv_align_enable(static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_enableType >(value));
} else {
mutable_unknown_fields()->AddVarint(3, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(33)) goto parse_can_rx_aalign_avg_ctr_total;
break;
}
// optional double can_rx_aalign_avg_ctr_total = 4;
case 4: {
if (tag == 33) {
parse_can_rx_aalign_avg_ctr_total:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_aalign_avg_ctr_total_)));
set_has_can_rx_aalign_avg_ctr_total();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_rx_auto_align_converged;
break;
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_auto_align_convergedType can_rx_auto_align_converged = 5;
case 5: {
if (tag == 40) {
parse_can_rx_auto_align_converged:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_convergedType_IsValid(value)) {
set_can_rx_auto_align_converged(static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_convergedType >(value));
} else {
mutable_unknown_fields()->AddVarint(5, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_rx_auto_align_disable;
break;
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_auto_align_disableType can_rx_auto_align_disable = 6;
case 6: {
if (tag == 48) {
parse_can_rx_auto_align_disable:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_disableType_IsValid(value)) {
set_can_rx_auto_align_disable(static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_disableType >(value));
} else {
mutable_unknown_fields()->AddVarint(6, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(57)) goto parse_can_rx_angle_mounting_offset;
break;
}
// optional double can_rx_angle_mounting_offset = 7;
case 7: {
if (tag == 57) {
parse_can_rx_angle_mounting_offset:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_angle_mounting_offset_)));
set_has_can_rx_angle_mounting_offset();
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_can_rx_wheel_slip;
break;
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_wheel_slipType can_rx_wheel_slip = 8;
case 8: {
if (tag == 64) {
parse_can_rx_wheel_slip:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle3_5f2_Can_rx_wheel_slipType_IsValid(value)) {
set_can_rx_wheel_slip(static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_wheel_slipType >(value));
} else {
mutable_unknown_fields()->AddVarint(8, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(72)) goto parse_can_rx_radar_height;
break;
}
// optional int32 can_rx_radar_height = 9;
case 9: {
if (tag == 72) {
parse_can_rx_radar_height:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_radar_height_)));
set_has_can_rx_radar_height();
} else {
goto handle_unusual;
}
if (input->ExpectTag(80)) goto parse_can_rx_radar_fov_mr;
break;
}
// optional int32 can_rx_radar_fov_mr = 10;
case 10: {
if (tag == 80) {
parse_can_rx_radar_fov_mr:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_radar_fov_mr_)));
set_has_can_rx_radar_fov_mr();
} else {
goto handle_unusual;
}
if (input->ExpectTag(88)) goto parse_can_rx_radar_fov_lr;
break;
}
// optional int32 can_rx_radar_fov_lr = 11;
case 11: {
if (tag == 88) {
parse_can_rx_radar_fov_lr:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_radar_fov_lr_)));
set_has_can_rx_radar_fov_lr();
} else {
goto handle_unusual;
}
if (input->ExpectTag(96)) goto parse_can_rx_long_accel_validity;
break;
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_long_accel_validityType can_rx_long_accel_validity = 12;
case 12: {
if (tag == 96) {
parse_can_rx_long_accel_validity:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle3_5f2_Can_rx_long_accel_validityType_IsValid(value)) {
set_can_rx_long_accel_validity(static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_long_accel_validityType >(value));
} else {
mutable_unknown_fields()->AddVarint(12, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(105)) goto parse_can_rx_long_accel;
break;
}
// optional double can_rx_long_accel = 13;
case 13: {
if (tag == 105) {
parse_can_rx_long_accel:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_long_accel_)));
set_has_can_rx_long_accel();
} else {
goto handle_unusual;
}
if (input->ExpectTag(112)) goto parse_can_rx_lat_accel_validity;
break;
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_lat_accel_validityType can_rx_lat_accel_validity = 14;
case 14: {
if (tag == 112) {
parse_can_rx_lat_accel_validity:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle3_5f2_Can_rx_lat_accel_validityType_IsValid(value)) {
set_can_rx_lat_accel_validity(static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_lat_accel_validityType >(value));
} else {
mutable_unknown_fields()->AddVarint(14, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(121)) goto parse_can_rx_lat_accel;
break;
}
// optional double can_rx_lat_accel = 15;
case 15: {
if (tag == 121) {
parse_can_rx_lat_accel:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_lat_accel_)));
set_has_can_rx_lat_accel();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Vehicle3_5f2)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Vehicle3_5f2)
return false;
#undef DO_
}
void Vehicle3_5f2::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Vehicle3_5f2)
// optional int32 can_rx_serv_align_updates_need = 1;
if (has_can_rx_serv_align_updates_need()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->can_rx_serv_align_updates_need(), output);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_serv_align_typeType can_rx_serv_align_type = 2;
if (has_can_rx_serv_align_type()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
2, this->can_rx_serv_align_type(), output);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_serv_align_enableType can_rx_serv_align_enable = 3;
if (has_can_rx_serv_align_enable()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
3, this->can_rx_serv_align_enable(), output);
}
// optional double can_rx_aalign_avg_ctr_total = 4;
if (has_can_rx_aalign_avg_ctr_total()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->can_rx_aalign_avg_ctr_total(), output);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_auto_align_convergedType can_rx_auto_align_converged = 5;
if (has_can_rx_auto_align_converged()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
5, this->can_rx_auto_align_converged(), output);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_auto_align_disableType can_rx_auto_align_disable = 6;
if (has_can_rx_auto_align_disable()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
6, this->can_rx_auto_align_disable(), output);
}
// optional double can_rx_angle_mounting_offset = 7;
if (has_can_rx_angle_mounting_offset()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(7, this->can_rx_angle_mounting_offset(), output);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_wheel_slipType can_rx_wheel_slip = 8;
if (has_can_rx_wheel_slip()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
8, this->can_rx_wheel_slip(), output);
}
// optional int32 can_rx_radar_height = 9;
if (has_can_rx_radar_height()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->can_rx_radar_height(), output);
}
// optional int32 can_rx_radar_fov_mr = 10;
if (has_can_rx_radar_fov_mr()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->can_rx_radar_fov_mr(), output);
}
// optional int32 can_rx_radar_fov_lr = 11;
if (has_can_rx_radar_fov_lr()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(11, this->can_rx_radar_fov_lr(), output);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_long_accel_validityType can_rx_long_accel_validity = 12;
if (has_can_rx_long_accel_validity()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
12, this->can_rx_long_accel_validity(), output);
}
// optional double can_rx_long_accel = 13;
if (has_can_rx_long_accel()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(13, this->can_rx_long_accel(), output);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_lat_accel_validityType can_rx_lat_accel_validity = 14;
if (has_can_rx_lat_accel_validity()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
14, this->can_rx_lat_accel_validity(), output);
}
// optional double can_rx_lat_accel = 15;
if (has_can_rx_lat_accel()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(15, this->can_rx_lat_accel(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Vehicle3_5f2)
}
::google::protobuf::uint8* Vehicle3_5f2::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Vehicle3_5f2)
// optional int32 can_rx_serv_align_updates_need = 1;
if (has_can_rx_serv_align_updates_need()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->can_rx_serv_align_updates_need(), target);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_serv_align_typeType can_rx_serv_align_type = 2;
if (has_can_rx_serv_align_type()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2, this->can_rx_serv_align_type(), target);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_serv_align_enableType can_rx_serv_align_enable = 3;
if (has_can_rx_serv_align_enable()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
3, this->can_rx_serv_align_enable(), target);
}
// optional double can_rx_aalign_avg_ctr_total = 4;
if (has_can_rx_aalign_avg_ctr_total()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->can_rx_aalign_avg_ctr_total(), target);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_auto_align_convergedType can_rx_auto_align_converged = 5;
if (has_can_rx_auto_align_converged()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
5, this->can_rx_auto_align_converged(), target);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_auto_align_disableType can_rx_auto_align_disable = 6;
if (has_can_rx_auto_align_disable()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
6, this->can_rx_auto_align_disable(), target);
}
// optional double can_rx_angle_mounting_offset = 7;
if (has_can_rx_angle_mounting_offset()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(7, this->can_rx_angle_mounting_offset(), target);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_wheel_slipType can_rx_wheel_slip = 8;
if (has_can_rx_wheel_slip()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
8, this->can_rx_wheel_slip(), target);
}
// optional int32 can_rx_radar_height = 9;
if (has_can_rx_radar_height()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->can_rx_radar_height(), target);
}
// optional int32 can_rx_radar_fov_mr = 10;
if (has_can_rx_radar_fov_mr()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(10, this->can_rx_radar_fov_mr(), target);
}
// optional int32 can_rx_radar_fov_lr = 11;
if (has_can_rx_radar_fov_lr()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(11, this->can_rx_radar_fov_lr(), target);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_long_accel_validityType can_rx_long_accel_validity = 12;
if (has_can_rx_long_accel_validity()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
12, this->can_rx_long_accel_validity(), target);
}
// optional double can_rx_long_accel = 13;
if (has_can_rx_long_accel()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(13, this->can_rx_long_accel(), target);
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_lat_accel_validityType can_rx_lat_accel_validity = 14;
if (has_can_rx_lat_accel_validity()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
14, this->can_rx_lat_accel_validity(), target);
}
// optional double can_rx_lat_accel = 15;
if (has_can_rx_lat_accel()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(15, this->can_rx_lat_accel(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Vehicle3_5f2)
return target;
}
int Vehicle3_5f2::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Vehicle3_5f2)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional int32 can_rx_serv_align_updates_need = 1;
if (has_can_rx_serv_align_updates_need()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_serv_align_updates_need());
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_serv_align_typeType can_rx_serv_align_type = 2;
if (has_can_rx_serv_align_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_serv_align_type());
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_serv_align_enableType can_rx_serv_align_enable = 3;
if (has_can_rx_serv_align_enable()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_serv_align_enable());
}
// optional double can_rx_aalign_avg_ctr_total = 4;
if (has_can_rx_aalign_avg_ctr_total()) {
total_size += 1 + 8;
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_auto_align_convergedType can_rx_auto_align_converged = 5;
if (has_can_rx_auto_align_converged()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_auto_align_converged());
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_auto_align_disableType can_rx_auto_align_disable = 6;
if (has_can_rx_auto_align_disable()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_auto_align_disable());
}
// optional double can_rx_angle_mounting_offset = 7;
if (has_can_rx_angle_mounting_offset()) {
total_size += 1 + 8;
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_wheel_slipType can_rx_wheel_slip = 8;
if (has_can_rx_wheel_slip()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_wheel_slip());
}
}
if (_has_bits_[8 / 32] & 32512u) {
// optional int32 can_rx_radar_height = 9;
if (has_can_rx_radar_height()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_radar_height());
}
// optional int32 can_rx_radar_fov_mr = 10;
if (has_can_rx_radar_fov_mr()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_radar_fov_mr());
}
// optional int32 can_rx_radar_fov_lr = 11;
if (has_can_rx_radar_fov_lr()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_radar_fov_lr());
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_long_accel_validityType can_rx_long_accel_validity = 12;
if (has_can_rx_long_accel_validity()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_long_accel_validity());
}
// optional double can_rx_long_accel = 13;
if (has_can_rx_long_accel()) {
total_size += 1 + 8;
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_lat_accel_validityType can_rx_lat_accel_validity = 14;
if (has_can_rx_lat_accel_validity()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_lat_accel_validity());
}
// optional double can_rx_lat_accel = 15;
if (has_can_rx_lat_accel()) {
total_size += 1 + 8;
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Vehicle3_5f2::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Vehicle3_5f2)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Vehicle3_5f2* source =
::google::protobuf::internal::DynamicCastToGenerated<const Vehicle3_5f2>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Vehicle3_5f2)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Vehicle3_5f2)
MergeFrom(*source);
}
}
void Vehicle3_5f2::MergeFrom(const Vehicle3_5f2& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Vehicle3_5f2)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_rx_serv_align_updates_need()) {
set_can_rx_serv_align_updates_need(from.can_rx_serv_align_updates_need());
}
if (from.has_can_rx_serv_align_type()) {
set_can_rx_serv_align_type(from.can_rx_serv_align_type());
}
if (from.has_can_rx_serv_align_enable()) {
set_can_rx_serv_align_enable(from.can_rx_serv_align_enable());
}
if (from.has_can_rx_aalign_avg_ctr_total()) {
set_can_rx_aalign_avg_ctr_total(from.can_rx_aalign_avg_ctr_total());
}
if (from.has_can_rx_auto_align_converged()) {
set_can_rx_auto_align_converged(from.can_rx_auto_align_converged());
}
if (from.has_can_rx_auto_align_disable()) {
set_can_rx_auto_align_disable(from.can_rx_auto_align_disable());
}
if (from.has_can_rx_angle_mounting_offset()) {
set_can_rx_angle_mounting_offset(from.can_rx_angle_mounting_offset());
}
if (from.has_can_rx_wheel_slip()) {
set_can_rx_wheel_slip(from.can_rx_wheel_slip());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_can_rx_radar_height()) {
set_can_rx_radar_height(from.can_rx_radar_height());
}
if (from.has_can_rx_radar_fov_mr()) {
set_can_rx_radar_fov_mr(from.can_rx_radar_fov_mr());
}
if (from.has_can_rx_radar_fov_lr()) {
set_can_rx_radar_fov_lr(from.can_rx_radar_fov_lr());
}
if (from.has_can_rx_long_accel_validity()) {
set_can_rx_long_accel_validity(from.can_rx_long_accel_validity());
}
if (from.has_can_rx_long_accel()) {
set_can_rx_long_accel(from.can_rx_long_accel());
}
if (from.has_can_rx_lat_accel_validity()) {
set_can_rx_lat_accel_validity(from.can_rx_lat_accel_validity());
}
if (from.has_can_rx_lat_accel()) {
set_can_rx_lat_accel(from.can_rx_lat_accel());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Vehicle3_5f2::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Vehicle3_5f2)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Vehicle3_5f2::CopyFrom(const Vehicle3_5f2& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Vehicle3_5f2)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Vehicle3_5f2::IsInitialized() const {
return true;
}
void Vehicle3_5f2::Swap(Vehicle3_5f2* other) {
if (other == this) return;
InternalSwap(other);
}
void Vehicle3_5f2::InternalSwap(Vehicle3_5f2* other) {
std::swap(can_rx_serv_align_updates_need_, other->can_rx_serv_align_updates_need_);
std::swap(can_rx_serv_align_type_, other->can_rx_serv_align_type_);
std::swap(can_rx_serv_align_enable_, other->can_rx_serv_align_enable_);
std::swap(can_rx_aalign_avg_ctr_total_, other->can_rx_aalign_avg_ctr_total_);
std::swap(can_rx_auto_align_converged_, other->can_rx_auto_align_converged_);
std::swap(can_rx_auto_align_disable_, other->can_rx_auto_align_disable_);
std::swap(can_rx_angle_mounting_offset_, other->can_rx_angle_mounting_offset_);
std::swap(can_rx_wheel_slip_, other->can_rx_wheel_slip_);
std::swap(can_rx_radar_height_, other->can_rx_radar_height_);
std::swap(can_rx_radar_fov_mr_, other->can_rx_radar_fov_mr_);
std::swap(can_rx_radar_fov_lr_, other->can_rx_radar_fov_lr_);
std::swap(can_rx_long_accel_validity_, other->can_rx_long_accel_validity_);
std::swap(can_rx_long_accel_, other->can_rx_long_accel_);
std::swap(can_rx_lat_accel_validity_, other->can_rx_lat_accel_validity_);
std::swap(can_rx_lat_accel_, other->can_rx_lat_accel_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Vehicle3_5f2::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Vehicle3_5f2_descriptor_;
metadata.reflection = Vehicle3_5f2_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Vehicle3_5f2
// optional int32 can_rx_serv_align_updates_need = 1;
bool Vehicle3_5f2::has_can_rx_serv_align_updates_need() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_serv_align_updates_need() {
_has_bits_[0] |= 0x00000001u;
}
void Vehicle3_5f2::clear_has_can_rx_serv_align_updates_need() {
_has_bits_[0] &= ~0x00000001u;
}
void Vehicle3_5f2::clear_can_rx_serv_align_updates_need() {
can_rx_serv_align_updates_need_ = 0;
clear_has_can_rx_serv_align_updates_need();
}
::google::protobuf::int32 Vehicle3_5f2::can_rx_serv_align_updates_need() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_serv_align_updates_need)
return can_rx_serv_align_updates_need_;
}
void Vehicle3_5f2::set_can_rx_serv_align_updates_need(::google::protobuf::int32 value) {
set_has_can_rx_serv_align_updates_need();
can_rx_serv_align_updates_need_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_serv_align_updates_need)
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_serv_align_typeType can_rx_serv_align_type = 2;
bool Vehicle3_5f2::has_can_rx_serv_align_type() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_serv_align_type() {
_has_bits_[0] |= 0x00000002u;
}
void Vehicle3_5f2::clear_has_can_rx_serv_align_type() {
_has_bits_[0] &= ~0x00000002u;
}
void Vehicle3_5f2::clear_can_rx_serv_align_type() {
can_rx_serv_align_type_ = 0;
clear_has_can_rx_serv_align_type();
}
::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_typeType Vehicle3_5f2::can_rx_serv_align_type() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_serv_align_type)
return static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_typeType >(can_rx_serv_align_type_);
}
void Vehicle3_5f2::set_can_rx_serv_align_type(::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_typeType value) {
assert(::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_typeType_IsValid(value));
set_has_can_rx_serv_align_type();
can_rx_serv_align_type_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_serv_align_type)
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_serv_align_enableType can_rx_serv_align_enable = 3;
bool Vehicle3_5f2::has_can_rx_serv_align_enable() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_serv_align_enable() {
_has_bits_[0] |= 0x00000004u;
}
void Vehicle3_5f2::clear_has_can_rx_serv_align_enable() {
_has_bits_[0] &= ~0x00000004u;
}
void Vehicle3_5f2::clear_can_rx_serv_align_enable() {
can_rx_serv_align_enable_ = 0;
clear_has_can_rx_serv_align_enable();
}
::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_enableType Vehicle3_5f2::can_rx_serv_align_enable() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_serv_align_enable)
return static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_enableType >(can_rx_serv_align_enable_);
}
void Vehicle3_5f2::set_can_rx_serv_align_enable(::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_enableType value) {
assert(::apollo::drivers::Vehicle3_5f2_Can_rx_serv_align_enableType_IsValid(value));
set_has_can_rx_serv_align_enable();
can_rx_serv_align_enable_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_serv_align_enable)
}
// optional double can_rx_aalign_avg_ctr_total = 4;
bool Vehicle3_5f2::has_can_rx_aalign_avg_ctr_total() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_aalign_avg_ctr_total() {
_has_bits_[0] |= 0x00000008u;
}
void Vehicle3_5f2::clear_has_can_rx_aalign_avg_ctr_total() {
_has_bits_[0] &= ~0x00000008u;
}
void Vehicle3_5f2::clear_can_rx_aalign_avg_ctr_total() {
can_rx_aalign_avg_ctr_total_ = 0;
clear_has_can_rx_aalign_avg_ctr_total();
}
double Vehicle3_5f2::can_rx_aalign_avg_ctr_total() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_aalign_avg_ctr_total)
return can_rx_aalign_avg_ctr_total_;
}
void Vehicle3_5f2::set_can_rx_aalign_avg_ctr_total(double value) {
set_has_can_rx_aalign_avg_ctr_total();
can_rx_aalign_avg_ctr_total_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_aalign_avg_ctr_total)
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_auto_align_convergedType can_rx_auto_align_converged = 5;
bool Vehicle3_5f2::has_can_rx_auto_align_converged() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_auto_align_converged() {
_has_bits_[0] |= 0x00000010u;
}
void Vehicle3_5f2::clear_has_can_rx_auto_align_converged() {
_has_bits_[0] &= ~0x00000010u;
}
void Vehicle3_5f2::clear_can_rx_auto_align_converged() {
can_rx_auto_align_converged_ = 0;
clear_has_can_rx_auto_align_converged();
}
::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_convergedType Vehicle3_5f2::can_rx_auto_align_converged() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_auto_align_converged)
return static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_convergedType >(can_rx_auto_align_converged_);
}
void Vehicle3_5f2::set_can_rx_auto_align_converged(::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_convergedType value) {
assert(::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_convergedType_IsValid(value));
set_has_can_rx_auto_align_converged();
can_rx_auto_align_converged_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_auto_align_converged)
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_auto_align_disableType can_rx_auto_align_disable = 6;
bool Vehicle3_5f2::has_can_rx_auto_align_disable() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_auto_align_disable() {
_has_bits_[0] |= 0x00000020u;
}
void Vehicle3_5f2::clear_has_can_rx_auto_align_disable() {
_has_bits_[0] &= ~0x00000020u;
}
void Vehicle3_5f2::clear_can_rx_auto_align_disable() {
can_rx_auto_align_disable_ = 0;
clear_has_can_rx_auto_align_disable();
}
::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_disableType Vehicle3_5f2::can_rx_auto_align_disable() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_auto_align_disable)
return static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_disableType >(can_rx_auto_align_disable_);
}
void Vehicle3_5f2::set_can_rx_auto_align_disable(::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_disableType value) {
assert(::apollo::drivers::Vehicle3_5f2_Can_rx_auto_align_disableType_IsValid(value));
set_has_can_rx_auto_align_disable();
can_rx_auto_align_disable_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_auto_align_disable)
}
// optional double can_rx_angle_mounting_offset = 7;
bool Vehicle3_5f2::has_can_rx_angle_mounting_offset() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_angle_mounting_offset() {
_has_bits_[0] |= 0x00000040u;
}
void Vehicle3_5f2::clear_has_can_rx_angle_mounting_offset() {
_has_bits_[0] &= ~0x00000040u;
}
void Vehicle3_5f2::clear_can_rx_angle_mounting_offset() {
can_rx_angle_mounting_offset_ = 0;
clear_has_can_rx_angle_mounting_offset();
}
double Vehicle3_5f2::can_rx_angle_mounting_offset() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_angle_mounting_offset)
return can_rx_angle_mounting_offset_;
}
void Vehicle3_5f2::set_can_rx_angle_mounting_offset(double value) {
set_has_can_rx_angle_mounting_offset();
can_rx_angle_mounting_offset_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_angle_mounting_offset)
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_wheel_slipType can_rx_wheel_slip = 8;
bool Vehicle3_5f2::has_can_rx_wheel_slip() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_wheel_slip() {
_has_bits_[0] |= 0x00000080u;
}
void Vehicle3_5f2::clear_has_can_rx_wheel_slip() {
_has_bits_[0] &= ~0x00000080u;
}
void Vehicle3_5f2::clear_can_rx_wheel_slip() {
can_rx_wheel_slip_ = 0;
clear_has_can_rx_wheel_slip();
}
::apollo::drivers::Vehicle3_5f2_Can_rx_wheel_slipType Vehicle3_5f2::can_rx_wheel_slip() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_wheel_slip)
return static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_wheel_slipType >(can_rx_wheel_slip_);
}
void Vehicle3_5f2::set_can_rx_wheel_slip(::apollo::drivers::Vehicle3_5f2_Can_rx_wheel_slipType value) {
assert(::apollo::drivers::Vehicle3_5f2_Can_rx_wheel_slipType_IsValid(value));
set_has_can_rx_wheel_slip();
can_rx_wheel_slip_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_wheel_slip)
}
// optional int32 can_rx_radar_height = 9;
bool Vehicle3_5f2::has_can_rx_radar_height() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_radar_height() {
_has_bits_[0] |= 0x00000100u;
}
void Vehicle3_5f2::clear_has_can_rx_radar_height() {
_has_bits_[0] &= ~0x00000100u;
}
void Vehicle3_5f2::clear_can_rx_radar_height() {
can_rx_radar_height_ = 0;
clear_has_can_rx_radar_height();
}
::google::protobuf::int32 Vehicle3_5f2::can_rx_radar_height() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_radar_height)
return can_rx_radar_height_;
}
void Vehicle3_5f2::set_can_rx_radar_height(::google::protobuf::int32 value) {
set_has_can_rx_radar_height();
can_rx_radar_height_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_radar_height)
}
// optional int32 can_rx_radar_fov_mr = 10;
bool Vehicle3_5f2::has_can_rx_radar_fov_mr() const {
return (_has_bits_[0] & 0x00000200u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_radar_fov_mr() {
_has_bits_[0] |= 0x00000200u;
}
void Vehicle3_5f2::clear_has_can_rx_radar_fov_mr() {
_has_bits_[0] &= ~0x00000200u;
}
void Vehicle3_5f2::clear_can_rx_radar_fov_mr() {
can_rx_radar_fov_mr_ = 0;
clear_has_can_rx_radar_fov_mr();
}
::google::protobuf::int32 Vehicle3_5f2::can_rx_radar_fov_mr() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_radar_fov_mr)
return can_rx_radar_fov_mr_;
}
void Vehicle3_5f2::set_can_rx_radar_fov_mr(::google::protobuf::int32 value) {
set_has_can_rx_radar_fov_mr();
can_rx_radar_fov_mr_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_radar_fov_mr)
}
// optional int32 can_rx_radar_fov_lr = 11;
bool Vehicle3_5f2::has_can_rx_radar_fov_lr() const {
return (_has_bits_[0] & 0x00000400u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_radar_fov_lr() {
_has_bits_[0] |= 0x00000400u;
}
void Vehicle3_5f2::clear_has_can_rx_radar_fov_lr() {
_has_bits_[0] &= ~0x00000400u;
}
void Vehicle3_5f2::clear_can_rx_radar_fov_lr() {
can_rx_radar_fov_lr_ = 0;
clear_has_can_rx_radar_fov_lr();
}
::google::protobuf::int32 Vehicle3_5f2::can_rx_radar_fov_lr() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_radar_fov_lr)
return can_rx_radar_fov_lr_;
}
void Vehicle3_5f2::set_can_rx_radar_fov_lr(::google::protobuf::int32 value) {
set_has_can_rx_radar_fov_lr();
can_rx_radar_fov_lr_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_radar_fov_lr)
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_long_accel_validityType can_rx_long_accel_validity = 12;
bool Vehicle3_5f2::has_can_rx_long_accel_validity() const {
return (_has_bits_[0] & 0x00000800u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_long_accel_validity() {
_has_bits_[0] |= 0x00000800u;
}
void Vehicle3_5f2::clear_has_can_rx_long_accel_validity() {
_has_bits_[0] &= ~0x00000800u;
}
void Vehicle3_5f2::clear_can_rx_long_accel_validity() {
can_rx_long_accel_validity_ = 0;
clear_has_can_rx_long_accel_validity();
}
::apollo::drivers::Vehicle3_5f2_Can_rx_long_accel_validityType Vehicle3_5f2::can_rx_long_accel_validity() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_long_accel_validity)
return static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_long_accel_validityType >(can_rx_long_accel_validity_);
}
void Vehicle3_5f2::set_can_rx_long_accel_validity(::apollo::drivers::Vehicle3_5f2_Can_rx_long_accel_validityType value) {
assert(::apollo::drivers::Vehicle3_5f2_Can_rx_long_accel_validityType_IsValid(value));
set_has_can_rx_long_accel_validity();
can_rx_long_accel_validity_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_long_accel_validity)
}
// optional double can_rx_long_accel = 13;
bool Vehicle3_5f2::has_can_rx_long_accel() const {
return (_has_bits_[0] & 0x00001000u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_long_accel() {
_has_bits_[0] |= 0x00001000u;
}
void Vehicle3_5f2::clear_has_can_rx_long_accel() {
_has_bits_[0] &= ~0x00001000u;
}
void Vehicle3_5f2::clear_can_rx_long_accel() {
can_rx_long_accel_ = 0;
clear_has_can_rx_long_accel();
}
double Vehicle3_5f2::can_rx_long_accel() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_long_accel)
return can_rx_long_accel_;
}
void Vehicle3_5f2::set_can_rx_long_accel(double value) {
set_has_can_rx_long_accel();
can_rx_long_accel_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_long_accel)
}
// optional .apollo.drivers.Vehicle3_5f2.Can_rx_lat_accel_validityType can_rx_lat_accel_validity = 14;
bool Vehicle3_5f2::has_can_rx_lat_accel_validity() const {
return (_has_bits_[0] & 0x00002000u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_lat_accel_validity() {
_has_bits_[0] |= 0x00002000u;
}
void Vehicle3_5f2::clear_has_can_rx_lat_accel_validity() {
_has_bits_[0] &= ~0x00002000u;
}
void Vehicle3_5f2::clear_can_rx_lat_accel_validity() {
can_rx_lat_accel_validity_ = 0;
clear_has_can_rx_lat_accel_validity();
}
::apollo::drivers::Vehicle3_5f2_Can_rx_lat_accel_validityType Vehicle3_5f2::can_rx_lat_accel_validity() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_lat_accel_validity)
return static_cast< ::apollo::drivers::Vehicle3_5f2_Can_rx_lat_accel_validityType >(can_rx_lat_accel_validity_);
}
void Vehicle3_5f2::set_can_rx_lat_accel_validity(::apollo::drivers::Vehicle3_5f2_Can_rx_lat_accel_validityType value) {
assert(::apollo::drivers::Vehicle3_5f2_Can_rx_lat_accel_validityType_IsValid(value));
set_has_can_rx_lat_accel_validity();
can_rx_lat_accel_validity_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_lat_accel_validity)
}
// optional double can_rx_lat_accel = 15;
bool Vehicle3_5f2::has_can_rx_lat_accel() const {
return (_has_bits_[0] & 0x00004000u) != 0;
}
void Vehicle3_5f2::set_has_can_rx_lat_accel() {
_has_bits_[0] |= 0x00004000u;
}
void Vehicle3_5f2::clear_has_can_rx_lat_accel() {
_has_bits_[0] &= ~0x00004000u;
}
void Vehicle3_5f2::clear_can_rx_lat_accel() {
can_rx_lat_accel_ = 0;
clear_has_can_rx_lat_accel();
}
double Vehicle3_5f2::can_rx_lat_accel() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle3_5f2.can_rx_lat_accel)
return can_rx_lat_accel_;
}
void Vehicle3_5f2::set_can_rx_lat_accel(double value) {
set_has_can_rx_lat_accel();
can_rx_lat_accel_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle3_5f2.can_rx_lat_accel)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
const ::google::protobuf::EnumDescriptor* Vehicle4_5f3_Can_rx_fac_align_cmd_2Type_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle4_5f3_Can_rx_fac_align_cmd_2Type_descriptor_;
}
bool Vehicle4_5f3_Can_rx_fac_align_cmd_2Type_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle4_5f3_Can_rx_fac_align_cmd_2Type Vehicle4_5f3::CAN_RX_FAC_ALIGN_CMD_2_OFF;
const Vehicle4_5f3_Can_rx_fac_align_cmd_2Type Vehicle4_5f3::CAN_RX_FAC_ALIGN_CMD_2_ON;
const Vehicle4_5f3_Can_rx_fac_align_cmd_2Type Vehicle4_5f3::Can_rx_fac_align_cmd_2Type_MIN;
const Vehicle4_5f3_Can_rx_fac_align_cmd_2Type Vehicle4_5f3::Can_rx_fac_align_cmd_2Type_MAX;
const int Vehicle4_5f3::Can_rx_fac_align_cmd_2Type_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Vehicle4_5f3_Can_rx_fac_align_cmd_1Type_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle4_5f3_Can_rx_fac_align_cmd_1Type_descriptor_;
}
bool Vehicle4_5f3_Can_rx_fac_align_cmd_1Type_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle4_5f3_Can_rx_fac_align_cmd_1Type Vehicle4_5f3::CAN_RX_FAC_ALIGN_CMD_1_OFF;
const Vehicle4_5f3_Can_rx_fac_align_cmd_1Type Vehicle4_5f3::CAN_RX_FAC_ALIGN_CMD_1_ON;
const Vehicle4_5f3_Can_rx_fac_align_cmd_1Type Vehicle4_5f3::Can_rx_fac_align_cmd_1Type_MIN;
const Vehicle4_5f3_Can_rx_fac_align_cmd_1Type Vehicle4_5f3::Can_rx_fac_align_cmd_1Type_MAX;
const int Vehicle4_5f3::Can_rx_fac_align_cmd_1Type_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Vehicle4_5f3::kCanRxFacTgtRangeR2MFieldNumber;
const int Vehicle4_5f3::kCanRxFacTgtRangeM2TFieldNumber;
const int Vehicle4_5f3::kCanRxFacTgtRange1FieldNumber;
const int Vehicle4_5f3::kCanRxFacTgtMtgSpaceVerFieldNumber;
const int Vehicle4_5f3::kCanRxFacTgtMtgSpaceHorFieldNumber;
const int Vehicle4_5f3::kCanRxFacTgtMtgOffsetFieldNumber;
const int Vehicle4_5f3::kCanRxFacAlignSampReqFieldNumber;
const int Vehicle4_5f3::kCanRxFacAlignMaxNtFieldNumber;
const int Vehicle4_5f3::kCanRxFacAlignCmd2FieldNumber;
const int Vehicle4_5f3::kCanRxFacAlignCmd1FieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Vehicle4_5f3::Vehicle4_5f3()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Vehicle4_5f3)
}
void Vehicle4_5f3::InitAsDefaultInstance() {
}
Vehicle4_5f3::Vehicle4_5f3(const Vehicle4_5f3& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Vehicle4_5f3)
}
void Vehicle4_5f3::SharedCtor() {
_cached_size_ = 0;
can_rx_fac_tgt_range_r2m_ = 0;
can_rx_fac_tgt_range_m2t_ = 0;
can_rx_fac_tgt_range_1_ = 0;
can_rx_fac_tgt_mtg_space_ver_ = 0;
can_rx_fac_tgt_mtg_space_hor_ = 0;
can_rx_fac_tgt_mtg_offset_ = 0;
can_rx_fac_align_samp_req_ = 0;
can_rx_fac_align_max_nt_ = 0;
can_rx_fac_align_cmd_2_ = 0;
can_rx_fac_align_cmd_1_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Vehicle4_5f3::~Vehicle4_5f3() {
// @@protoc_insertion_point(destructor:apollo.drivers.Vehicle4_5f3)
SharedDtor();
}
void Vehicle4_5f3::SharedDtor() {
if (this != default_instance_) {
}
}
void Vehicle4_5f3::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Vehicle4_5f3::descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle4_5f3_descriptor_;
}
const Vehicle4_5f3& Vehicle4_5f3::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Vehicle4_5f3* Vehicle4_5f3::default_instance_ = NULL;
Vehicle4_5f3* Vehicle4_5f3::New(::google::protobuf::Arena* arena) const {
Vehicle4_5f3* n = new Vehicle4_5f3;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Vehicle4_5f3::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Vehicle4_5f3)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Vehicle4_5f3, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Vehicle4_5f3*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_rx_fac_tgt_range_r2m_, can_rx_fac_align_max_nt_);
}
ZR_(can_rx_fac_align_cmd_2_, can_rx_fac_align_cmd_1_);
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Vehicle4_5f3::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Vehicle4_5f3)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional double can_rx_fac_tgt_range_r2m = 1;
case 1: {
if (tag == 9) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_fac_tgt_range_r2m_)));
set_has_can_rx_fac_tgt_range_r2m();
} else {
goto handle_unusual;
}
if (input->ExpectTag(17)) goto parse_can_rx_fac_tgt_range_m2t;
break;
}
// optional double can_rx_fac_tgt_range_m2t = 2;
case 2: {
if (tag == 17) {
parse_can_rx_fac_tgt_range_m2t:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_fac_tgt_range_m2t_)));
set_has_can_rx_fac_tgt_range_m2t();
} else {
goto handle_unusual;
}
if (input->ExpectTag(25)) goto parse_can_rx_fac_tgt_range_1;
break;
}
// optional double can_rx_fac_tgt_range_1 = 3;
case 3: {
if (tag == 25) {
parse_can_rx_fac_tgt_range_1:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_fac_tgt_range_1_)));
set_has_can_rx_fac_tgt_range_1();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_can_rx_fac_tgt_mtg_space_ver;
break;
}
// optional int32 can_rx_fac_tgt_mtg_space_ver = 4;
case 4: {
if (tag == 32) {
parse_can_rx_fac_tgt_mtg_space_ver:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_fac_tgt_mtg_space_ver_)));
set_has_can_rx_fac_tgt_mtg_space_ver();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_can_rx_fac_tgt_mtg_space_hor;
break;
}
// optional int32 can_rx_fac_tgt_mtg_space_hor = 5;
case 5: {
if (tag == 40) {
parse_can_rx_fac_tgt_mtg_space_hor:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_fac_tgt_mtg_space_hor_)));
set_has_can_rx_fac_tgt_mtg_space_hor();
} else {
goto handle_unusual;
}
if (input->ExpectTag(48)) goto parse_can_rx_fac_tgt_mtg_offset;
break;
}
// optional int32 can_rx_fac_tgt_mtg_offset = 6;
case 6: {
if (tag == 48) {
parse_can_rx_fac_tgt_mtg_offset:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_fac_tgt_mtg_offset_)));
set_has_can_rx_fac_tgt_mtg_offset();
} else {
goto handle_unusual;
}
if (input->ExpectTag(56)) goto parse_can_rx_fac_align_samp_req;
break;
}
// optional int32 can_rx_fac_align_samp_req = 7;
case 7: {
if (tag == 56) {
parse_can_rx_fac_align_samp_req:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_fac_align_samp_req_)));
set_has_can_rx_fac_align_samp_req();
} else {
goto handle_unusual;
}
if (input->ExpectTag(64)) goto parse_can_rx_fac_align_max_nt;
break;
}
// optional int32 can_rx_fac_align_max_nt = 8;
case 8: {
if (tag == 64) {
parse_can_rx_fac_align_max_nt:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_fac_align_max_nt_)));
set_has_can_rx_fac_align_max_nt();
} else {
goto handle_unusual;
}
if (input->ExpectTag(72)) goto parse_can_rx_fac_align_cmd_2;
break;
}
// optional .apollo.drivers.Vehicle4_5f3.Can_rx_fac_align_cmd_2Type can_rx_fac_align_cmd_2 = 9;
case 9: {
if (tag == 72) {
parse_can_rx_fac_align_cmd_2:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_2Type_IsValid(value)) {
set_can_rx_fac_align_cmd_2(static_cast< ::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_2Type >(value));
} else {
mutable_unknown_fields()->AddVarint(9, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(80)) goto parse_can_rx_fac_align_cmd_1;
break;
}
// optional .apollo.drivers.Vehicle4_5f3.Can_rx_fac_align_cmd_1Type can_rx_fac_align_cmd_1 = 10;
case 10: {
if (tag == 80) {
parse_can_rx_fac_align_cmd_1:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_1Type_IsValid(value)) {
set_can_rx_fac_align_cmd_1(static_cast< ::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_1Type >(value));
} else {
mutable_unknown_fields()->AddVarint(10, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Vehicle4_5f3)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Vehicle4_5f3)
return false;
#undef DO_
}
void Vehicle4_5f3::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Vehicle4_5f3)
// optional double can_rx_fac_tgt_range_r2m = 1;
if (has_can_rx_fac_tgt_range_r2m()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->can_rx_fac_tgt_range_r2m(), output);
}
// optional double can_rx_fac_tgt_range_m2t = 2;
if (has_can_rx_fac_tgt_range_m2t()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->can_rx_fac_tgt_range_m2t(), output);
}
// optional double can_rx_fac_tgt_range_1 = 3;
if (has_can_rx_fac_tgt_range_1()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->can_rx_fac_tgt_range_1(), output);
}
// optional int32 can_rx_fac_tgt_mtg_space_ver = 4;
if (has_can_rx_fac_tgt_mtg_space_ver()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->can_rx_fac_tgt_mtg_space_ver(), output);
}
// optional int32 can_rx_fac_tgt_mtg_space_hor = 5;
if (has_can_rx_fac_tgt_mtg_space_hor()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->can_rx_fac_tgt_mtg_space_hor(), output);
}
// optional int32 can_rx_fac_tgt_mtg_offset = 6;
if (has_can_rx_fac_tgt_mtg_offset()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->can_rx_fac_tgt_mtg_offset(), output);
}
// optional int32 can_rx_fac_align_samp_req = 7;
if (has_can_rx_fac_align_samp_req()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->can_rx_fac_align_samp_req(), output);
}
// optional int32 can_rx_fac_align_max_nt = 8;
if (has_can_rx_fac_align_max_nt()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->can_rx_fac_align_max_nt(), output);
}
// optional .apollo.drivers.Vehicle4_5f3.Can_rx_fac_align_cmd_2Type can_rx_fac_align_cmd_2 = 9;
if (has_can_rx_fac_align_cmd_2()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
9, this->can_rx_fac_align_cmd_2(), output);
}
// optional .apollo.drivers.Vehicle4_5f3.Can_rx_fac_align_cmd_1Type can_rx_fac_align_cmd_1 = 10;
if (has_can_rx_fac_align_cmd_1()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
10, this->can_rx_fac_align_cmd_1(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Vehicle4_5f3)
}
::google::protobuf::uint8* Vehicle4_5f3::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Vehicle4_5f3)
// optional double can_rx_fac_tgt_range_r2m = 1;
if (has_can_rx_fac_tgt_range_r2m()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->can_rx_fac_tgt_range_r2m(), target);
}
// optional double can_rx_fac_tgt_range_m2t = 2;
if (has_can_rx_fac_tgt_range_m2t()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->can_rx_fac_tgt_range_m2t(), target);
}
// optional double can_rx_fac_tgt_range_1 = 3;
if (has_can_rx_fac_tgt_range_1()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->can_rx_fac_tgt_range_1(), target);
}
// optional int32 can_rx_fac_tgt_mtg_space_ver = 4;
if (has_can_rx_fac_tgt_mtg_space_ver()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->can_rx_fac_tgt_mtg_space_ver(), target);
}
// optional int32 can_rx_fac_tgt_mtg_space_hor = 5;
if (has_can_rx_fac_tgt_mtg_space_hor()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->can_rx_fac_tgt_mtg_space_hor(), target);
}
// optional int32 can_rx_fac_tgt_mtg_offset = 6;
if (has_can_rx_fac_tgt_mtg_offset()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->can_rx_fac_tgt_mtg_offset(), target);
}
// optional int32 can_rx_fac_align_samp_req = 7;
if (has_can_rx_fac_align_samp_req()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->can_rx_fac_align_samp_req(), target);
}
// optional int32 can_rx_fac_align_max_nt = 8;
if (has_can_rx_fac_align_max_nt()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->can_rx_fac_align_max_nt(), target);
}
// optional .apollo.drivers.Vehicle4_5f3.Can_rx_fac_align_cmd_2Type can_rx_fac_align_cmd_2 = 9;
if (has_can_rx_fac_align_cmd_2()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
9, this->can_rx_fac_align_cmd_2(), target);
}
// optional .apollo.drivers.Vehicle4_5f3.Can_rx_fac_align_cmd_1Type can_rx_fac_align_cmd_1 = 10;
if (has_can_rx_fac_align_cmd_1()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
10, this->can_rx_fac_align_cmd_1(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Vehicle4_5f3)
return target;
}
int Vehicle4_5f3::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Vehicle4_5f3)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional double can_rx_fac_tgt_range_r2m = 1;
if (has_can_rx_fac_tgt_range_r2m()) {
total_size += 1 + 8;
}
// optional double can_rx_fac_tgt_range_m2t = 2;
if (has_can_rx_fac_tgt_range_m2t()) {
total_size += 1 + 8;
}
// optional double can_rx_fac_tgt_range_1 = 3;
if (has_can_rx_fac_tgt_range_1()) {
total_size += 1 + 8;
}
// optional int32 can_rx_fac_tgt_mtg_space_ver = 4;
if (has_can_rx_fac_tgt_mtg_space_ver()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_fac_tgt_mtg_space_ver());
}
// optional int32 can_rx_fac_tgt_mtg_space_hor = 5;
if (has_can_rx_fac_tgt_mtg_space_hor()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_fac_tgt_mtg_space_hor());
}
// optional int32 can_rx_fac_tgt_mtg_offset = 6;
if (has_can_rx_fac_tgt_mtg_offset()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_fac_tgt_mtg_offset());
}
// optional int32 can_rx_fac_align_samp_req = 7;
if (has_can_rx_fac_align_samp_req()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_fac_align_samp_req());
}
// optional int32 can_rx_fac_align_max_nt = 8;
if (has_can_rx_fac_align_max_nt()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_fac_align_max_nt());
}
}
if (_has_bits_[8 / 32] & 768u) {
// optional .apollo.drivers.Vehicle4_5f3.Can_rx_fac_align_cmd_2Type can_rx_fac_align_cmd_2 = 9;
if (has_can_rx_fac_align_cmd_2()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_fac_align_cmd_2());
}
// optional .apollo.drivers.Vehicle4_5f3.Can_rx_fac_align_cmd_1Type can_rx_fac_align_cmd_1 = 10;
if (has_can_rx_fac_align_cmd_1()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_fac_align_cmd_1());
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Vehicle4_5f3::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Vehicle4_5f3)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Vehicle4_5f3* source =
::google::protobuf::internal::DynamicCastToGenerated<const Vehicle4_5f3>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Vehicle4_5f3)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Vehicle4_5f3)
MergeFrom(*source);
}
}
void Vehicle4_5f3::MergeFrom(const Vehicle4_5f3& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Vehicle4_5f3)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_rx_fac_tgt_range_r2m()) {
set_can_rx_fac_tgt_range_r2m(from.can_rx_fac_tgt_range_r2m());
}
if (from.has_can_rx_fac_tgt_range_m2t()) {
set_can_rx_fac_tgt_range_m2t(from.can_rx_fac_tgt_range_m2t());
}
if (from.has_can_rx_fac_tgt_range_1()) {
set_can_rx_fac_tgt_range_1(from.can_rx_fac_tgt_range_1());
}
if (from.has_can_rx_fac_tgt_mtg_space_ver()) {
set_can_rx_fac_tgt_mtg_space_ver(from.can_rx_fac_tgt_mtg_space_ver());
}
if (from.has_can_rx_fac_tgt_mtg_space_hor()) {
set_can_rx_fac_tgt_mtg_space_hor(from.can_rx_fac_tgt_mtg_space_hor());
}
if (from.has_can_rx_fac_tgt_mtg_offset()) {
set_can_rx_fac_tgt_mtg_offset(from.can_rx_fac_tgt_mtg_offset());
}
if (from.has_can_rx_fac_align_samp_req()) {
set_can_rx_fac_align_samp_req(from.can_rx_fac_align_samp_req());
}
if (from.has_can_rx_fac_align_max_nt()) {
set_can_rx_fac_align_max_nt(from.can_rx_fac_align_max_nt());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_can_rx_fac_align_cmd_2()) {
set_can_rx_fac_align_cmd_2(from.can_rx_fac_align_cmd_2());
}
if (from.has_can_rx_fac_align_cmd_1()) {
set_can_rx_fac_align_cmd_1(from.can_rx_fac_align_cmd_1());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Vehicle4_5f3::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Vehicle4_5f3)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Vehicle4_5f3::CopyFrom(const Vehicle4_5f3& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Vehicle4_5f3)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Vehicle4_5f3::IsInitialized() const {
return true;
}
void Vehicle4_5f3::Swap(Vehicle4_5f3* other) {
if (other == this) return;
InternalSwap(other);
}
void Vehicle4_5f3::InternalSwap(Vehicle4_5f3* other) {
std::swap(can_rx_fac_tgt_range_r2m_, other->can_rx_fac_tgt_range_r2m_);
std::swap(can_rx_fac_tgt_range_m2t_, other->can_rx_fac_tgt_range_m2t_);
std::swap(can_rx_fac_tgt_range_1_, other->can_rx_fac_tgt_range_1_);
std::swap(can_rx_fac_tgt_mtg_space_ver_, other->can_rx_fac_tgt_mtg_space_ver_);
std::swap(can_rx_fac_tgt_mtg_space_hor_, other->can_rx_fac_tgt_mtg_space_hor_);
std::swap(can_rx_fac_tgt_mtg_offset_, other->can_rx_fac_tgt_mtg_offset_);
std::swap(can_rx_fac_align_samp_req_, other->can_rx_fac_align_samp_req_);
std::swap(can_rx_fac_align_max_nt_, other->can_rx_fac_align_max_nt_);
std::swap(can_rx_fac_align_cmd_2_, other->can_rx_fac_align_cmd_2_);
std::swap(can_rx_fac_align_cmd_1_, other->can_rx_fac_align_cmd_1_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Vehicle4_5f3::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Vehicle4_5f3_descriptor_;
metadata.reflection = Vehicle4_5f3_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Vehicle4_5f3
// optional double can_rx_fac_tgt_range_r2m = 1;
bool Vehicle4_5f3::has_can_rx_fac_tgt_range_r2m() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Vehicle4_5f3::set_has_can_rx_fac_tgt_range_r2m() {
_has_bits_[0] |= 0x00000001u;
}
void Vehicle4_5f3::clear_has_can_rx_fac_tgt_range_r2m() {
_has_bits_[0] &= ~0x00000001u;
}
void Vehicle4_5f3::clear_can_rx_fac_tgt_range_r2m() {
can_rx_fac_tgt_range_r2m_ = 0;
clear_has_can_rx_fac_tgt_range_r2m();
}
double Vehicle4_5f3::can_rx_fac_tgt_range_r2m() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_range_r2m)
return can_rx_fac_tgt_range_r2m_;
}
void Vehicle4_5f3::set_can_rx_fac_tgt_range_r2m(double value) {
set_has_can_rx_fac_tgt_range_r2m();
can_rx_fac_tgt_range_r2m_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_range_r2m)
}
// optional double can_rx_fac_tgt_range_m2t = 2;
bool Vehicle4_5f3::has_can_rx_fac_tgt_range_m2t() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Vehicle4_5f3::set_has_can_rx_fac_tgt_range_m2t() {
_has_bits_[0] |= 0x00000002u;
}
void Vehicle4_5f3::clear_has_can_rx_fac_tgt_range_m2t() {
_has_bits_[0] &= ~0x00000002u;
}
void Vehicle4_5f3::clear_can_rx_fac_tgt_range_m2t() {
can_rx_fac_tgt_range_m2t_ = 0;
clear_has_can_rx_fac_tgt_range_m2t();
}
double Vehicle4_5f3::can_rx_fac_tgt_range_m2t() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_range_m2t)
return can_rx_fac_tgt_range_m2t_;
}
void Vehicle4_5f3::set_can_rx_fac_tgt_range_m2t(double value) {
set_has_can_rx_fac_tgt_range_m2t();
can_rx_fac_tgt_range_m2t_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_range_m2t)
}
// optional double can_rx_fac_tgt_range_1 = 3;
bool Vehicle4_5f3::has_can_rx_fac_tgt_range_1() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Vehicle4_5f3::set_has_can_rx_fac_tgt_range_1() {
_has_bits_[0] |= 0x00000004u;
}
void Vehicle4_5f3::clear_has_can_rx_fac_tgt_range_1() {
_has_bits_[0] &= ~0x00000004u;
}
void Vehicle4_5f3::clear_can_rx_fac_tgt_range_1() {
can_rx_fac_tgt_range_1_ = 0;
clear_has_can_rx_fac_tgt_range_1();
}
double Vehicle4_5f3::can_rx_fac_tgt_range_1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_range_1)
return can_rx_fac_tgt_range_1_;
}
void Vehicle4_5f3::set_can_rx_fac_tgt_range_1(double value) {
set_has_can_rx_fac_tgt_range_1();
can_rx_fac_tgt_range_1_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_range_1)
}
// optional int32 can_rx_fac_tgt_mtg_space_ver = 4;
bool Vehicle4_5f3::has_can_rx_fac_tgt_mtg_space_ver() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Vehicle4_5f3::set_has_can_rx_fac_tgt_mtg_space_ver() {
_has_bits_[0] |= 0x00000008u;
}
void Vehicle4_5f3::clear_has_can_rx_fac_tgt_mtg_space_ver() {
_has_bits_[0] &= ~0x00000008u;
}
void Vehicle4_5f3::clear_can_rx_fac_tgt_mtg_space_ver() {
can_rx_fac_tgt_mtg_space_ver_ = 0;
clear_has_can_rx_fac_tgt_mtg_space_ver();
}
::google::protobuf::int32 Vehicle4_5f3::can_rx_fac_tgt_mtg_space_ver() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_mtg_space_ver)
return can_rx_fac_tgt_mtg_space_ver_;
}
void Vehicle4_5f3::set_can_rx_fac_tgt_mtg_space_ver(::google::protobuf::int32 value) {
set_has_can_rx_fac_tgt_mtg_space_ver();
can_rx_fac_tgt_mtg_space_ver_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_mtg_space_ver)
}
// optional int32 can_rx_fac_tgt_mtg_space_hor = 5;
bool Vehicle4_5f3::has_can_rx_fac_tgt_mtg_space_hor() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Vehicle4_5f3::set_has_can_rx_fac_tgt_mtg_space_hor() {
_has_bits_[0] |= 0x00000010u;
}
void Vehicle4_5f3::clear_has_can_rx_fac_tgt_mtg_space_hor() {
_has_bits_[0] &= ~0x00000010u;
}
void Vehicle4_5f3::clear_can_rx_fac_tgt_mtg_space_hor() {
can_rx_fac_tgt_mtg_space_hor_ = 0;
clear_has_can_rx_fac_tgt_mtg_space_hor();
}
::google::protobuf::int32 Vehicle4_5f3::can_rx_fac_tgt_mtg_space_hor() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_mtg_space_hor)
return can_rx_fac_tgt_mtg_space_hor_;
}
void Vehicle4_5f3::set_can_rx_fac_tgt_mtg_space_hor(::google::protobuf::int32 value) {
set_has_can_rx_fac_tgt_mtg_space_hor();
can_rx_fac_tgt_mtg_space_hor_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_mtg_space_hor)
}
// optional int32 can_rx_fac_tgt_mtg_offset = 6;
bool Vehicle4_5f3::has_can_rx_fac_tgt_mtg_offset() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Vehicle4_5f3::set_has_can_rx_fac_tgt_mtg_offset() {
_has_bits_[0] |= 0x00000020u;
}
void Vehicle4_5f3::clear_has_can_rx_fac_tgt_mtg_offset() {
_has_bits_[0] &= ~0x00000020u;
}
void Vehicle4_5f3::clear_can_rx_fac_tgt_mtg_offset() {
can_rx_fac_tgt_mtg_offset_ = 0;
clear_has_can_rx_fac_tgt_mtg_offset();
}
::google::protobuf::int32 Vehicle4_5f3::can_rx_fac_tgt_mtg_offset() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_mtg_offset)
return can_rx_fac_tgt_mtg_offset_;
}
void Vehicle4_5f3::set_can_rx_fac_tgt_mtg_offset(::google::protobuf::int32 value) {
set_has_can_rx_fac_tgt_mtg_offset();
can_rx_fac_tgt_mtg_offset_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle4_5f3.can_rx_fac_tgt_mtg_offset)
}
// optional int32 can_rx_fac_align_samp_req = 7;
bool Vehicle4_5f3::has_can_rx_fac_align_samp_req() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Vehicle4_5f3::set_has_can_rx_fac_align_samp_req() {
_has_bits_[0] |= 0x00000040u;
}
void Vehicle4_5f3::clear_has_can_rx_fac_align_samp_req() {
_has_bits_[0] &= ~0x00000040u;
}
void Vehicle4_5f3::clear_can_rx_fac_align_samp_req() {
can_rx_fac_align_samp_req_ = 0;
clear_has_can_rx_fac_align_samp_req();
}
::google::protobuf::int32 Vehicle4_5f3::can_rx_fac_align_samp_req() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle4_5f3.can_rx_fac_align_samp_req)
return can_rx_fac_align_samp_req_;
}
void Vehicle4_5f3::set_can_rx_fac_align_samp_req(::google::protobuf::int32 value) {
set_has_can_rx_fac_align_samp_req();
can_rx_fac_align_samp_req_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle4_5f3.can_rx_fac_align_samp_req)
}
// optional int32 can_rx_fac_align_max_nt = 8;
bool Vehicle4_5f3::has_can_rx_fac_align_max_nt() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Vehicle4_5f3::set_has_can_rx_fac_align_max_nt() {
_has_bits_[0] |= 0x00000080u;
}
void Vehicle4_5f3::clear_has_can_rx_fac_align_max_nt() {
_has_bits_[0] &= ~0x00000080u;
}
void Vehicle4_5f3::clear_can_rx_fac_align_max_nt() {
can_rx_fac_align_max_nt_ = 0;
clear_has_can_rx_fac_align_max_nt();
}
::google::protobuf::int32 Vehicle4_5f3::can_rx_fac_align_max_nt() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle4_5f3.can_rx_fac_align_max_nt)
return can_rx_fac_align_max_nt_;
}
void Vehicle4_5f3::set_can_rx_fac_align_max_nt(::google::protobuf::int32 value) {
set_has_can_rx_fac_align_max_nt();
can_rx_fac_align_max_nt_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle4_5f3.can_rx_fac_align_max_nt)
}
// optional .apollo.drivers.Vehicle4_5f3.Can_rx_fac_align_cmd_2Type can_rx_fac_align_cmd_2 = 9;
bool Vehicle4_5f3::has_can_rx_fac_align_cmd_2() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
void Vehicle4_5f3::set_has_can_rx_fac_align_cmd_2() {
_has_bits_[0] |= 0x00000100u;
}
void Vehicle4_5f3::clear_has_can_rx_fac_align_cmd_2() {
_has_bits_[0] &= ~0x00000100u;
}
void Vehicle4_5f3::clear_can_rx_fac_align_cmd_2() {
can_rx_fac_align_cmd_2_ = 0;
clear_has_can_rx_fac_align_cmd_2();
}
::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_2Type Vehicle4_5f3::can_rx_fac_align_cmd_2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle4_5f3.can_rx_fac_align_cmd_2)
return static_cast< ::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_2Type >(can_rx_fac_align_cmd_2_);
}
void Vehicle4_5f3::set_can_rx_fac_align_cmd_2(::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_2Type value) {
assert(::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_2Type_IsValid(value));
set_has_can_rx_fac_align_cmd_2();
can_rx_fac_align_cmd_2_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle4_5f3.can_rx_fac_align_cmd_2)
}
// optional .apollo.drivers.Vehicle4_5f3.Can_rx_fac_align_cmd_1Type can_rx_fac_align_cmd_1 = 10;
bool Vehicle4_5f3::has_can_rx_fac_align_cmd_1() const {
return (_has_bits_[0] & 0x00000200u) != 0;
}
void Vehicle4_5f3::set_has_can_rx_fac_align_cmd_1() {
_has_bits_[0] |= 0x00000200u;
}
void Vehicle4_5f3::clear_has_can_rx_fac_align_cmd_1() {
_has_bits_[0] &= ~0x00000200u;
}
void Vehicle4_5f3::clear_can_rx_fac_align_cmd_1() {
can_rx_fac_align_cmd_1_ = 0;
clear_has_can_rx_fac_align_cmd_1();
}
::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_1Type Vehicle4_5f3::can_rx_fac_align_cmd_1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle4_5f3.can_rx_fac_align_cmd_1)
return static_cast< ::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_1Type >(can_rx_fac_align_cmd_1_);
}
void Vehicle4_5f3::set_can_rx_fac_align_cmd_1(::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_1Type value) {
assert(::apollo::drivers::Vehicle4_5f3_Can_rx_fac_align_cmd_1Type_IsValid(value));
set_has_can_rx_fac_align_cmd_1();
can_rx_fac_align_cmd_1_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle4_5f3.can_rx_fac_align_cmd_1)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
const ::google::protobuf::EnumDescriptor* Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType_descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType_descriptor_;
}
bool Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType Vehicle5_5f4::CAN_RX_YAW_RATE_BIAS_SHIFT_NO_DETECT;
const Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType Vehicle5_5f4::CAN_RX_YAW_RATE_BIAS_SHIFT_DETECT;
const Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType Vehicle5_5f4::Can_rx_yaw_rate_bias_shiftType_MIN;
const Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType Vehicle5_5f4::Can_rx_yaw_rate_bias_shiftType_MAX;
const int Vehicle5_5f4::Can_rx_yaw_rate_bias_shiftType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Vehicle5_5f4::kCanRxYawRateBiasShiftFieldNumber;
const int Vehicle5_5f4::kCanRxSteeringGearRatioFieldNumber;
const int Vehicle5_5f4::kCanRxWheelbaseFieldNumber;
const int Vehicle5_5f4::kCanRxDistanceRearAxleFieldNumber;
const int Vehicle5_5f4::kCanRxCwBlockageThresholdFieldNumber;
const int Vehicle5_5f4::kCanRxFunnelOffsetRightFieldNumber;
const int Vehicle5_5f4::kCanRxFunnelOffsetLeftFieldNumber;
const int Vehicle5_5f4::kCanRxBeamwidthVertFieldNumber;
const int Vehicle5_5f4::kCanRxOversteerUndersteerFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Vehicle5_5f4::Vehicle5_5f4()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Vehicle5_5f4)
}
void Vehicle5_5f4::InitAsDefaultInstance() {
}
Vehicle5_5f4::Vehicle5_5f4(const Vehicle5_5f4& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Vehicle5_5f4)
}
void Vehicle5_5f4::SharedCtor() {
_cached_size_ = 0;
can_rx_yaw_rate_bias_shift_ = 0;
can_rx_steering_gear_ratio_ = 0;
can_rx_wheelbase_ = 0;
can_rx_distance_rear_axle_ = 0;
can_rx_cw_blockage_threshold_ = 0;
can_rx_funnel_offset_right_ = 0;
can_rx_funnel_offset_left_ = 0;
can_rx_beamwidth_vert_ = 0;
can_rx_oversteer_understeer_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Vehicle5_5f4::~Vehicle5_5f4() {
// @@protoc_insertion_point(destructor:apollo.drivers.Vehicle5_5f4)
SharedDtor();
}
void Vehicle5_5f4::SharedDtor() {
if (this != default_instance_) {
}
}
void Vehicle5_5f4::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Vehicle5_5f4::descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle5_5f4_descriptor_;
}
const Vehicle5_5f4& Vehicle5_5f4::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Vehicle5_5f4* Vehicle5_5f4::default_instance_ = NULL;
Vehicle5_5f4* Vehicle5_5f4::New(::google::protobuf::Arena* arena) const {
Vehicle5_5f4* n = new Vehicle5_5f4;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Vehicle5_5f4::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Vehicle5_5f4)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Vehicle5_5f4, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Vehicle5_5f4*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 255u) {
ZR_(can_rx_steering_gear_ratio_, can_rx_yaw_rate_bias_shift_);
ZR_(can_rx_funnel_offset_right_, can_rx_beamwidth_vert_);
}
can_rx_oversteer_understeer_ = 0;
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Vehicle5_5f4::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Vehicle5_5f4)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .apollo.drivers.Vehicle5_5f4.Can_rx_yaw_rate_bias_shiftType can_rx_yaw_rate_bias_shift = 1;
case 1: {
if (tag == 8) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::apollo::drivers::Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType_IsValid(value)) {
set_can_rx_yaw_rate_bias_shift(static_cast< ::apollo::drivers::Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType >(value));
} else {
mutable_unknown_fields()->AddVarint(1, value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(17)) goto parse_can_rx_steering_gear_ratio;
break;
}
// optional double can_rx_steering_gear_ratio = 2;
case 2: {
if (tag == 17) {
parse_can_rx_steering_gear_ratio:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_steering_gear_ratio_)));
set_has_can_rx_steering_gear_ratio();
} else {
goto handle_unusual;
}
if (input->ExpectTag(25)) goto parse_can_rx_wheelbase;
break;
}
// optional double can_rx_wheelbase = 3;
case 3: {
if (tag == 25) {
parse_can_rx_wheelbase:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_wheelbase_)));
set_has_can_rx_wheelbase();
} else {
goto handle_unusual;
}
if (input->ExpectTag(33)) goto parse_can_rx_distance_rear_axle;
break;
}
// optional double can_rx_distance_rear_axle = 4;
case 4: {
if (tag == 33) {
parse_can_rx_distance_rear_axle:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_distance_rear_axle_)));
set_has_can_rx_distance_rear_axle();
} else {
goto handle_unusual;
}
if (input->ExpectTag(41)) goto parse_can_rx_cw_blockage_threshold;
break;
}
// optional double can_rx_cw_blockage_threshold = 5;
case 5: {
if (tag == 41) {
parse_can_rx_cw_blockage_threshold:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_cw_blockage_threshold_)));
set_has_can_rx_cw_blockage_threshold();
} else {
goto handle_unusual;
}
if (input->ExpectTag(49)) goto parse_can_rx_funnel_offset_right;
break;
}
// optional double can_rx_funnel_offset_right = 6;
case 6: {
if (tag == 49) {
parse_can_rx_funnel_offset_right:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_funnel_offset_right_)));
set_has_can_rx_funnel_offset_right();
} else {
goto handle_unusual;
}
if (input->ExpectTag(57)) goto parse_can_rx_funnel_offset_left;
break;
}
// optional double can_rx_funnel_offset_left = 7;
case 7: {
if (tag == 57) {
parse_can_rx_funnel_offset_left:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_funnel_offset_left_)));
set_has_can_rx_funnel_offset_left();
} else {
goto handle_unusual;
}
if (input->ExpectTag(65)) goto parse_can_rx_beamwidth_vert;
break;
}
// optional double can_rx_beamwidth_vert = 8;
case 8: {
if (tag == 65) {
parse_can_rx_beamwidth_vert:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_beamwidth_vert_)));
set_has_can_rx_beamwidth_vert();
} else {
goto handle_unusual;
}
if (input->ExpectTag(72)) goto parse_can_rx_oversteer_understeer;
break;
}
// optional int32 can_rx_oversteer_understeer = 9;
case 9: {
if (tag == 72) {
parse_can_rx_oversteer_understeer:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_rx_oversteer_understeer_)));
set_has_can_rx_oversteer_understeer();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Vehicle5_5f4)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Vehicle5_5f4)
return false;
#undef DO_
}
void Vehicle5_5f4::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Vehicle5_5f4)
// optional .apollo.drivers.Vehicle5_5f4.Can_rx_yaw_rate_bias_shiftType can_rx_yaw_rate_bias_shift = 1;
if (has_can_rx_yaw_rate_bias_shift()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->can_rx_yaw_rate_bias_shift(), output);
}
// optional double can_rx_steering_gear_ratio = 2;
if (has_can_rx_steering_gear_ratio()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->can_rx_steering_gear_ratio(), output);
}
// optional double can_rx_wheelbase = 3;
if (has_can_rx_wheelbase()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->can_rx_wheelbase(), output);
}
// optional double can_rx_distance_rear_axle = 4;
if (has_can_rx_distance_rear_axle()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->can_rx_distance_rear_axle(), output);
}
// optional double can_rx_cw_blockage_threshold = 5;
if (has_can_rx_cw_blockage_threshold()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->can_rx_cw_blockage_threshold(), output);
}
// optional double can_rx_funnel_offset_right = 6;
if (has_can_rx_funnel_offset_right()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->can_rx_funnel_offset_right(), output);
}
// optional double can_rx_funnel_offset_left = 7;
if (has_can_rx_funnel_offset_left()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(7, this->can_rx_funnel_offset_left(), output);
}
// optional double can_rx_beamwidth_vert = 8;
if (has_can_rx_beamwidth_vert()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(8, this->can_rx_beamwidth_vert(), output);
}
// optional int32 can_rx_oversteer_understeer = 9;
if (has_can_rx_oversteer_understeer()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->can_rx_oversteer_understeer(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Vehicle5_5f4)
}
::google::protobuf::uint8* Vehicle5_5f4::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Vehicle5_5f4)
// optional .apollo.drivers.Vehicle5_5f4.Can_rx_yaw_rate_bias_shiftType can_rx_yaw_rate_bias_shift = 1;
if (has_can_rx_yaw_rate_bias_shift()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->can_rx_yaw_rate_bias_shift(), target);
}
// optional double can_rx_steering_gear_ratio = 2;
if (has_can_rx_steering_gear_ratio()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->can_rx_steering_gear_ratio(), target);
}
// optional double can_rx_wheelbase = 3;
if (has_can_rx_wheelbase()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->can_rx_wheelbase(), target);
}
// optional double can_rx_distance_rear_axle = 4;
if (has_can_rx_distance_rear_axle()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->can_rx_distance_rear_axle(), target);
}
// optional double can_rx_cw_blockage_threshold = 5;
if (has_can_rx_cw_blockage_threshold()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(5, this->can_rx_cw_blockage_threshold(), target);
}
// optional double can_rx_funnel_offset_right = 6;
if (has_can_rx_funnel_offset_right()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->can_rx_funnel_offset_right(), target);
}
// optional double can_rx_funnel_offset_left = 7;
if (has_can_rx_funnel_offset_left()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(7, this->can_rx_funnel_offset_left(), target);
}
// optional double can_rx_beamwidth_vert = 8;
if (has_can_rx_beamwidth_vert()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(8, this->can_rx_beamwidth_vert(), target);
}
// optional int32 can_rx_oversteer_understeer = 9;
if (has_can_rx_oversteer_understeer()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->can_rx_oversteer_understeer(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Vehicle5_5f4)
return target;
}
int Vehicle5_5f4::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Vehicle5_5f4)
int total_size = 0;
if (_has_bits_[0 / 32] & 255u) {
// optional .apollo.drivers.Vehicle5_5f4.Can_rx_yaw_rate_bias_shiftType can_rx_yaw_rate_bias_shift = 1;
if (has_can_rx_yaw_rate_bias_shift()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->can_rx_yaw_rate_bias_shift());
}
// optional double can_rx_steering_gear_ratio = 2;
if (has_can_rx_steering_gear_ratio()) {
total_size += 1 + 8;
}
// optional double can_rx_wheelbase = 3;
if (has_can_rx_wheelbase()) {
total_size += 1 + 8;
}
// optional double can_rx_distance_rear_axle = 4;
if (has_can_rx_distance_rear_axle()) {
total_size += 1 + 8;
}
// optional double can_rx_cw_blockage_threshold = 5;
if (has_can_rx_cw_blockage_threshold()) {
total_size += 1 + 8;
}
// optional double can_rx_funnel_offset_right = 6;
if (has_can_rx_funnel_offset_right()) {
total_size += 1 + 8;
}
// optional double can_rx_funnel_offset_left = 7;
if (has_can_rx_funnel_offset_left()) {
total_size += 1 + 8;
}
// optional double can_rx_beamwidth_vert = 8;
if (has_can_rx_beamwidth_vert()) {
total_size += 1 + 8;
}
}
// optional int32 can_rx_oversteer_understeer = 9;
if (has_can_rx_oversteer_understeer()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_rx_oversteer_understeer());
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Vehicle5_5f4::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Vehicle5_5f4)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Vehicle5_5f4* source =
::google::protobuf::internal::DynamicCastToGenerated<const Vehicle5_5f4>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Vehicle5_5f4)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Vehicle5_5f4)
MergeFrom(*source);
}
}
void Vehicle5_5f4::MergeFrom(const Vehicle5_5f4& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Vehicle5_5f4)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_rx_yaw_rate_bias_shift()) {
set_can_rx_yaw_rate_bias_shift(from.can_rx_yaw_rate_bias_shift());
}
if (from.has_can_rx_steering_gear_ratio()) {
set_can_rx_steering_gear_ratio(from.can_rx_steering_gear_ratio());
}
if (from.has_can_rx_wheelbase()) {
set_can_rx_wheelbase(from.can_rx_wheelbase());
}
if (from.has_can_rx_distance_rear_axle()) {
set_can_rx_distance_rear_axle(from.can_rx_distance_rear_axle());
}
if (from.has_can_rx_cw_blockage_threshold()) {
set_can_rx_cw_blockage_threshold(from.can_rx_cw_blockage_threshold());
}
if (from.has_can_rx_funnel_offset_right()) {
set_can_rx_funnel_offset_right(from.can_rx_funnel_offset_right());
}
if (from.has_can_rx_funnel_offset_left()) {
set_can_rx_funnel_offset_left(from.can_rx_funnel_offset_left());
}
if (from.has_can_rx_beamwidth_vert()) {
set_can_rx_beamwidth_vert(from.can_rx_beamwidth_vert());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_can_rx_oversteer_understeer()) {
set_can_rx_oversteer_understeer(from.can_rx_oversteer_understeer());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Vehicle5_5f4::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Vehicle5_5f4)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Vehicle5_5f4::CopyFrom(const Vehicle5_5f4& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Vehicle5_5f4)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Vehicle5_5f4::IsInitialized() const {
return true;
}
void Vehicle5_5f4::Swap(Vehicle5_5f4* other) {
if (other == this) return;
InternalSwap(other);
}
void Vehicle5_5f4::InternalSwap(Vehicle5_5f4* other) {
std::swap(can_rx_yaw_rate_bias_shift_, other->can_rx_yaw_rate_bias_shift_);
std::swap(can_rx_steering_gear_ratio_, other->can_rx_steering_gear_ratio_);
std::swap(can_rx_wheelbase_, other->can_rx_wheelbase_);
std::swap(can_rx_distance_rear_axle_, other->can_rx_distance_rear_axle_);
std::swap(can_rx_cw_blockage_threshold_, other->can_rx_cw_blockage_threshold_);
std::swap(can_rx_funnel_offset_right_, other->can_rx_funnel_offset_right_);
std::swap(can_rx_funnel_offset_left_, other->can_rx_funnel_offset_left_);
std::swap(can_rx_beamwidth_vert_, other->can_rx_beamwidth_vert_);
std::swap(can_rx_oversteer_understeer_, other->can_rx_oversteer_understeer_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Vehicle5_5f4::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Vehicle5_5f4_descriptor_;
metadata.reflection = Vehicle5_5f4_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Vehicle5_5f4
// optional .apollo.drivers.Vehicle5_5f4.Can_rx_yaw_rate_bias_shiftType can_rx_yaw_rate_bias_shift = 1;
bool Vehicle5_5f4::has_can_rx_yaw_rate_bias_shift() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Vehicle5_5f4::set_has_can_rx_yaw_rate_bias_shift() {
_has_bits_[0] |= 0x00000001u;
}
void Vehicle5_5f4::clear_has_can_rx_yaw_rate_bias_shift() {
_has_bits_[0] &= ~0x00000001u;
}
void Vehicle5_5f4::clear_can_rx_yaw_rate_bias_shift() {
can_rx_yaw_rate_bias_shift_ = 0;
clear_has_can_rx_yaw_rate_bias_shift();
}
::apollo::drivers::Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType Vehicle5_5f4::can_rx_yaw_rate_bias_shift() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle5_5f4.can_rx_yaw_rate_bias_shift)
return static_cast< ::apollo::drivers::Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType >(can_rx_yaw_rate_bias_shift_);
}
void Vehicle5_5f4::set_can_rx_yaw_rate_bias_shift(::apollo::drivers::Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType value) {
assert(::apollo::drivers::Vehicle5_5f4_Can_rx_yaw_rate_bias_shiftType_IsValid(value));
set_has_can_rx_yaw_rate_bias_shift();
can_rx_yaw_rate_bias_shift_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle5_5f4.can_rx_yaw_rate_bias_shift)
}
// optional double can_rx_steering_gear_ratio = 2;
bool Vehicle5_5f4::has_can_rx_steering_gear_ratio() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Vehicle5_5f4::set_has_can_rx_steering_gear_ratio() {
_has_bits_[0] |= 0x00000002u;
}
void Vehicle5_5f4::clear_has_can_rx_steering_gear_ratio() {
_has_bits_[0] &= ~0x00000002u;
}
void Vehicle5_5f4::clear_can_rx_steering_gear_ratio() {
can_rx_steering_gear_ratio_ = 0;
clear_has_can_rx_steering_gear_ratio();
}
double Vehicle5_5f4::can_rx_steering_gear_ratio() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle5_5f4.can_rx_steering_gear_ratio)
return can_rx_steering_gear_ratio_;
}
void Vehicle5_5f4::set_can_rx_steering_gear_ratio(double value) {
set_has_can_rx_steering_gear_ratio();
can_rx_steering_gear_ratio_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle5_5f4.can_rx_steering_gear_ratio)
}
// optional double can_rx_wheelbase = 3;
bool Vehicle5_5f4::has_can_rx_wheelbase() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Vehicle5_5f4::set_has_can_rx_wheelbase() {
_has_bits_[0] |= 0x00000004u;
}
void Vehicle5_5f4::clear_has_can_rx_wheelbase() {
_has_bits_[0] &= ~0x00000004u;
}
void Vehicle5_5f4::clear_can_rx_wheelbase() {
can_rx_wheelbase_ = 0;
clear_has_can_rx_wheelbase();
}
double Vehicle5_5f4::can_rx_wheelbase() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle5_5f4.can_rx_wheelbase)
return can_rx_wheelbase_;
}
void Vehicle5_5f4::set_can_rx_wheelbase(double value) {
set_has_can_rx_wheelbase();
can_rx_wheelbase_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle5_5f4.can_rx_wheelbase)
}
// optional double can_rx_distance_rear_axle = 4;
bool Vehicle5_5f4::has_can_rx_distance_rear_axle() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Vehicle5_5f4::set_has_can_rx_distance_rear_axle() {
_has_bits_[0] |= 0x00000008u;
}
void Vehicle5_5f4::clear_has_can_rx_distance_rear_axle() {
_has_bits_[0] &= ~0x00000008u;
}
void Vehicle5_5f4::clear_can_rx_distance_rear_axle() {
can_rx_distance_rear_axle_ = 0;
clear_has_can_rx_distance_rear_axle();
}
double Vehicle5_5f4::can_rx_distance_rear_axle() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle5_5f4.can_rx_distance_rear_axle)
return can_rx_distance_rear_axle_;
}
void Vehicle5_5f4::set_can_rx_distance_rear_axle(double value) {
set_has_can_rx_distance_rear_axle();
can_rx_distance_rear_axle_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle5_5f4.can_rx_distance_rear_axle)
}
// optional double can_rx_cw_blockage_threshold = 5;
bool Vehicle5_5f4::has_can_rx_cw_blockage_threshold() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Vehicle5_5f4::set_has_can_rx_cw_blockage_threshold() {
_has_bits_[0] |= 0x00000010u;
}
void Vehicle5_5f4::clear_has_can_rx_cw_blockage_threshold() {
_has_bits_[0] &= ~0x00000010u;
}
void Vehicle5_5f4::clear_can_rx_cw_blockage_threshold() {
can_rx_cw_blockage_threshold_ = 0;
clear_has_can_rx_cw_blockage_threshold();
}
double Vehicle5_5f4::can_rx_cw_blockage_threshold() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle5_5f4.can_rx_cw_blockage_threshold)
return can_rx_cw_blockage_threshold_;
}
void Vehicle5_5f4::set_can_rx_cw_blockage_threshold(double value) {
set_has_can_rx_cw_blockage_threshold();
can_rx_cw_blockage_threshold_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle5_5f4.can_rx_cw_blockage_threshold)
}
// optional double can_rx_funnel_offset_right = 6;
bool Vehicle5_5f4::has_can_rx_funnel_offset_right() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Vehicle5_5f4::set_has_can_rx_funnel_offset_right() {
_has_bits_[0] |= 0x00000020u;
}
void Vehicle5_5f4::clear_has_can_rx_funnel_offset_right() {
_has_bits_[0] &= ~0x00000020u;
}
void Vehicle5_5f4::clear_can_rx_funnel_offset_right() {
can_rx_funnel_offset_right_ = 0;
clear_has_can_rx_funnel_offset_right();
}
double Vehicle5_5f4::can_rx_funnel_offset_right() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle5_5f4.can_rx_funnel_offset_right)
return can_rx_funnel_offset_right_;
}
void Vehicle5_5f4::set_can_rx_funnel_offset_right(double value) {
set_has_can_rx_funnel_offset_right();
can_rx_funnel_offset_right_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle5_5f4.can_rx_funnel_offset_right)
}
// optional double can_rx_funnel_offset_left = 7;
bool Vehicle5_5f4::has_can_rx_funnel_offset_left() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Vehicle5_5f4::set_has_can_rx_funnel_offset_left() {
_has_bits_[0] |= 0x00000040u;
}
void Vehicle5_5f4::clear_has_can_rx_funnel_offset_left() {
_has_bits_[0] &= ~0x00000040u;
}
void Vehicle5_5f4::clear_can_rx_funnel_offset_left() {
can_rx_funnel_offset_left_ = 0;
clear_has_can_rx_funnel_offset_left();
}
double Vehicle5_5f4::can_rx_funnel_offset_left() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle5_5f4.can_rx_funnel_offset_left)
return can_rx_funnel_offset_left_;
}
void Vehicle5_5f4::set_can_rx_funnel_offset_left(double value) {
set_has_can_rx_funnel_offset_left();
can_rx_funnel_offset_left_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle5_5f4.can_rx_funnel_offset_left)
}
// optional double can_rx_beamwidth_vert = 8;
bool Vehicle5_5f4::has_can_rx_beamwidth_vert() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Vehicle5_5f4::set_has_can_rx_beamwidth_vert() {
_has_bits_[0] |= 0x00000080u;
}
void Vehicle5_5f4::clear_has_can_rx_beamwidth_vert() {
_has_bits_[0] &= ~0x00000080u;
}
void Vehicle5_5f4::clear_can_rx_beamwidth_vert() {
can_rx_beamwidth_vert_ = 0;
clear_has_can_rx_beamwidth_vert();
}
double Vehicle5_5f4::can_rx_beamwidth_vert() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle5_5f4.can_rx_beamwidth_vert)
return can_rx_beamwidth_vert_;
}
void Vehicle5_5f4::set_can_rx_beamwidth_vert(double value) {
set_has_can_rx_beamwidth_vert();
can_rx_beamwidth_vert_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle5_5f4.can_rx_beamwidth_vert)
}
// optional int32 can_rx_oversteer_understeer = 9;
bool Vehicle5_5f4::has_can_rx_oversteer_understeer() const {
return (_has_bits_[0] & 0x00000100u) != 0;
}
void Vehicle5_5f4::set_has_can_rx_oversteer_understeer() {
_has_bits_[0] |= 0x00000100u;
}
void Vehicle5_5f4::clear_has_can_rx_oversteer_understeer() {
_has_bits_[0] &= ~0x00000100u;
}
void Vehicle5_5f4::clear_can_rx_oversteer_understeer() {
can_rx_oversteer_understeer_ = 0;
clear_has_can_rx_oversteer_understeer();
}
::google::protobuf::int32 Vehicle5_5f4::can_rx_oversteer_understeer() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle5_5f4.can_rx_oversteer_understeer)
return can_rx_oversteer_understeer_;
}
void Vehicle5_5f4::set_can_rx_oversteer_understeer(::google::protobuf::int32 value) {
set_has_can_rx_oversteer_understeer();
can_rx_oversteer_understeer_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle5_5f4.can_rx_oversteer_understeer)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Vehicle6_5f5::kCanRxInnerFunnelOffsetRightFieldNumber;
const int Vehicle6_5f5::kCanRxInnerFunnelOffsetLeftFieldNumber;
const int Vehicle6_5f5::kCanVolvoFaRangeMaxShortFieldNumber;
const int Vehicle6_5f5::kCanVolvoFaMinVspeedShortFieldNumber;
const int Vehicle6_5f5::kCanVolvoFaAalignEstimateFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Vehicle6_5f5::Vehicle6_5f5()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.Vehicle6_5f5)
}
void Vehicle6_5f5::InitAsDefaultInstance() {
}
Vehicle6_5f5::Vehicle6_5f5(const Vehicle6_5f5& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.Vehicle6_5f5)
}
void Vehicle6_5f5::SharedCtor() {
_cached_size_ = 0;
can_rx_inner_funnel_offset_right_ = 0;
can_rx_inner_funnel_offset_left_ = 0;
can_volvo_fa_range_max_short_ = 0;
can_volvo_fa_min_vspeed_short_ = 0;
can_volvo_fa_aalign_estimate_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Vehicle6_5f5::~Vehicle6_5f5() {
// @@protoc_insertion_point(destructor:apollo.drivers.Vehicle6_5f5)
SharedDtor();
}
void Vehicle6_5f5::SharedDtor() {
if (this != default_instance_) {
}
}
void Vehicle6_5f5::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Vehicle6_5f5::descriptor() {
protobuf_AssignDescriptorsOnce();
return Vehicle6_5f5_descriptor_;
}
const Vehicle6_5f5& Vehicle6_5f5::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
Vehicle6_5f5* Vehicle6_5f5::default_instance_ = NULL;
Vehicle6_5f5* Vehicle6_5f5::New(::google::protobuf::Arena* arena) const {
Vehicle6_5f5* n = new Vehicle6_5f5;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Vehicle6_5f5::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.Vehicle6_5f5)
#if defined(__clang__)
#define ZR_HELPER_(f) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
__builtin_offsetof(Vehicle6_5f5, f) \
_Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
&reinterpret_cast<Vehicle6_5f5*>(16)->f)
#endif
#define ZR_(first, last) do {\
::memset(&first, 0,\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
if (_has_bits_[0 / 32] & 31u) {
ZR_(can_rx_inner_funnel_offset_right_, can_volvo_fa_range_max_short_);
}
#undef ZR_HELPER_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool Vehicle6_5f5::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.Vehicle6_5f5)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional double can_rx_inner_funnel_offset_right = 1;
case 1: {
if (tag == 9) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_inner_funnel_offset_right_)));
set_has_can_rx_inner_funnel_offset_right();
} else {
goto handle_unusual;
}
if (input->ExpectTag(17)) goto parse_can_rx_inner_funnel_offset_left;
break;
}
// optional double can_rx_inner_funnel_offset_left = 2;
case 2: {
if (tag == 17) {
parse_can_rx_inner_funnel_offset_left:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_rx_inner_funnel_offset_left_)));
set_has_can_rx_inner_funnel_offset_left();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_can_volvo_fa_range_max_short;
break;
}
// optional int32 can_volvo_fa_range_max_short = 3;
case 3: {
if (tag == 24) {
parse_can_volvo_fa_range_max_short:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &can_volvo_fa_range_max_short_)));
set_has_can_volvo_fa_range_max_short();
} else {
goto handle_unusual;
}
if (input->ExpectTag(33)) goto parse_can_volvo_fa_min_vspeed_short;
break;
}
// optional double can_volvo_fa_min_vspeed_short = 4;
case 4: {
if (tag == 33) {
parse_can_volvo_fa_min_vspeed_short:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_volvo_fa_min_vspeed_short_)));
set_has_can_volvo_fa_min_vspeed_short();
} else {
goto handle_unusual;
}
if (input->ExpectTag(41)) goto parse_can_volvo_fa_aalign_estimate;
break;
}
// optional double can_volvo_fa_aalign_estimate = 5;
case 5: {
if (tag == 41) {
parse_can_volvo_fa_aalign_estimate:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &can_volvo_fa_aalign_estimate_)));
set_has_can_volvo_fa_aalign_estimate();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.Vehicle6_5f5)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.Vehicle6_5f5)
return false;
#undef DO_
}
void Vehicle6_5f5::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.Vehicle6_5f5)
// optional double can_rx_inner_funnel_offset_right = 1;
if (has_can_rx_inner_funnel_offset_right()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->can_rx_inner_funnel_offset_right(), output);
}
// optional double can_rx_inner_funnel_offset_left = 2;
if (has_can_rx_inner_funnel_offset_left()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->can_rx_inner_funnel_offset_left(), output);
}
// optional int32 can_volvo_fa_range_max_short = 3;
if (has_can_volvo_fa_range_max_short()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->can_volvo_fa_range_max_short(), output);
}
// optional double can_volvo_fa_min_vspeed_short = 4;
if (has_can_volvo_fa_min_vspeed_short()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->can_volvo_fa_min_vspeed_short(), output);
}
// optional double can_volvo_fa_aalign_estimate = 5;
if (has_can_volvo_fa_aalign_estimate()) {
::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->can_volvo_fa_aalign_estimate(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.Vehicle6_5f5)
}
::google::protobuf::uint8* Vehicle6_5f5::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.Vehicle6_5f5)
// optional double can_rx_inner_funnel_offset_right = 1;
if (has_can_rx_inner_funnel_offset_right()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->can_rx_inner_funnel_offset_right(), target);
}
// optional double can_rx_inner_funnel_offset_left = 2;
if (has_can_rx_inner_funnel_offset_left()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->can_rx_inner_funnel_offset_left(), target);
}
// optional int32 can_volvo_fa_range_max_short = 3;
if (has_can_volvo_fa_range_max_short()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->can_volvo_fa_range_max_short(), target);
}
// optional double can_volvo_fa_min_vspeed_short = 4;
if (has_can_volvo_fa_min_vspeed_short()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->can_volvo_fa_min_vspeed_short(), target);
}
// optional double can_volvo_fa_aalign_estimate = 5;
if (has_can_volvo_fa_aalign_estimate()) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(5, this->can_volvo_fa_aalign_estimate(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.Vehicle6_5f5)
return target;
}
int Vehicle6_5f5::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.Vehicle6_5f5)
int total_size = 0;
if (_has_bits_[0 / 32] & 31u) {
// optional double can_rx_inner_funnel_offset_right = 1;
if (has_can_rx_inner_funnel_offset_right()) {
total_size += 1 + 8;
}
// optional double can_rx_inner_funnel_offset_left = 2;
if (has_can_rx_inner_funnel_offset_left()) {
total_size += 1 + 8;
}
// optional int32 can_volvo_fa_range_max_short = 3;
if (has_can_volvo_fa_range_max_short()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->can_volvo_fa_range_max_short());
}
// optional double can_volvo_fa_min_vspeed_short = 4;
if (has_can_volvo_fa_min_vspeed_short()) {
total_size += 1 + 8;
}
// optional double can_volvo_fa_aalign_estimate = 5;
if (has_can_volvo_fa_aalign_estimate()) {
total_size += 1 + 8;
}
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Vehicle6_5f5::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.Vehicle6_5f5)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const Vehicle6_5f5* source =
::google::protobuf::internal::DynamicCastToGenerated<const Vehicle6_5f5>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.Vehicle6_5f5)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.Vehicle6_5f5)
MergeFrom(*source);
}
}
void Vehicle6_5f5::MergeFrom(const Vehicle6_5f5& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.Vehicle6_5f5)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_can_rx_inner_funnel_offset_right()) {
set_can_rx_inner_funnel_offset_right(from.can_rx_inner_funnel_offset_right());
}
if (from.has_can_rx_inner_funnel_offset_left()) {
set_can_rx_inner_funnel_offset_left(from.can_rx_inner_funnel_offset_left());
}
if (from.has_can_volvo_fa_range_max_short()) {
set_can_volvo_fa_range_max_short(from.can_volvo_fa_range_max_short());
}
if (from.has_can_volvo_fa_min_vspeed_short()) {
set_can_volvo_fa_min_vspeed_short(from.can_volvo_fa_min_vspeed_short());
}
if (from.has_can_volvo_fa_aalign_estimate()) {
set_can_volvo_fa_aalign_estimate(from.can_volvo_fa_aalign_estimate());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void Vehicle6_5f5::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.Vehicle6_5f5)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Vehicle6_5f5::CopyFrom(const Vehicle6_5f5& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.Vehicle6_5f5)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Vehicle6_5f5::IsInitialized() const {
return true;
}
void Vehicle6_5f5::Swap(Vehicle6_5f5* other) {
if (other == this) return;
InternalSwap(other);
}
void Vehicle6_5f5::InternalSwap(Vehicle6_5f5* other) {
std::swap(can_rx_inner_funnel_offset_right_, other->can_rx_inner_funnel_offset_right_);
std::swap(can_rx_inner_funnel_offset_left_, other->can_rx_inner_funnel_offset_left_);
std::swap(can_volvo_fa_range_max_short_, other->can_volvo_fa_range_max_short_);
std::swap(can_volvo_fa_min_vspeed_short_, other->can_volvo_fa_min_vspeed_short_);
std::swap(can_volvo_fa_aalign_estimate_, other->can_volvo_fa_aalign_estimate_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Vehicle6_5f5::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Vehicle6_5f5_descriptor_;
metadata.reflection = Vehicle6_5f5_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Vehicle6_5f5
// optional double can_rx_inner_funnel_offset_right = 1;
bool Vehicle6_5f5::has_can_rx_inner_funnel_offset_right() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Vehicle6_5f5::set_has_can_rx_inner_funnel_offset_right() {
_has_bits_[0] |= 0x00000001u;
}
void Vehicle6_5f5::clear_has_can_rx_inner_funnel_offset_right() {
_has_bits_[0] &= ~0x00000001u;
}
void Vehicle6_5f5::clear_can_rx_inner_funnel_offset_right() {
can_rx_inner_funnel_offset_right_ = 0;
clear_has_can_rx_inner_funnel_offset_right();
}
double Vehicle6_5f5::can_rx_inner_funnel_offset_right() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle6_5f5.can_rx_inner_funnel_offset_right)
return can_rx_inner_funnel_offset_right_;
}
void Vehicle6_5f5::set_can_rx_inner_funnel_offset_right(double value) {
set_has_can_rx_inner_funnel_offset_right();
can_rx_inner_funnel_offset_right_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle6_5f5.can_rx_inner_funnel_offset_right)
}
// optional double can_rx_inner_funnel_offset_left = 2;
bool Vehicle6_5f5::has_can_rx_inner_funnel_offset_left() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Vehicle6_5f5::set_has_can_rx_inner_funnel_offset_left() {
_has_bits_[0] |= 0x00000002u;
}
void Vehicle6_5f5::clear_has_can_rx_inner_funnel_offset_left() {
_has_bits_[0] &= ~0x00000002u;
}
void Vehicle6_5f5::clear_can_rx_inner_funnel_offset_left() {
can_rx_inner_funnel_offset_left_ = 0;
clear_has_can_rx_inner_funnel_offset_left();
}
double Vehicle6_5f5::can_rx_inner_funnel_offset_left() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle6_5f5.can_rx_inner_funnel_offset_left)
return can_rx_inner_funnel_offset_left_;
}
void Vehicle6_5f5::set_can_rx_inner_funnel_offset_left(double value) {
set_has_can_rx_inner_funnel_offset_left();
can_rx_inner_funnel_offset_left_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle6_5f5.can_rx_inner_funnel_offset_left)
}
// optional int32 can_volvo_fa_range_max_short = 3;
bool Vehicle6_5f5::has_can_volvo_fa_range_max_short() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Vehicle6_5f5::set_has_can_volvo_fa_range_max_short() {
_has_bits_[0] |= 0x00000004u;
}
void Vehicle6_5f5::clear_has_can_volvo_fa_range_max_short() {
_has_bits_[0] &= ~0x00000004u;
}
void Vehicle6_5f5::clear_can_volvo_fa_range_max_short() {
can_volvo_fa_range_max_short_ = 0;
clear_has_can_volvo_fa_range_max_short();
}
::google::protobuf::int32 Vehicle6_5f5::can_volvo_fa_range_max_short() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle6_5f5.can_volvo_fa_range_max_short)
return can_volvo_fa_range_max_short_;
}
void Vehicle6_5f5::set_can_volvo_fa_range_max_short(::google::protobuf::int32 value) {
set_has_can_volvo_fa_range_max_short();
can_volvo_fa_range_max_short_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle6_5f5.can_volvo_fa_range_max_short)
}
// optional double can_volvo_fa_min_vspeed_short = 4;
bool Vehicle6_5f5::has_can_volvo_fa_min_vspeed_short() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Vehicle6_5f5::set_has_can_volvo_fa_min_vspeed_short() {
_has_bits_[0] |= 0x00000008u;
}
void Vehicle6_5f5::clear_has_can_volvo_fa_min_vspeed_short() {
_has_bits_[0] &= ~0x00000008u;
}
void Vehicle6_5f5::clear_can_volvo_fa_min_vspeed_short() {
can_volvo_fa_min_vspeed_short_ = 0;
clear_has_can_volvo_fa_min_vspeed_short();
}
double Vehicle6_5f5::can_volvo_fa_min_vspeed_short() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle6_5f5.can_volvo_fa_min_vspeed_short)
return can_volvo_fa_min_vspeed_short_;
}
void Vehicle6_5f5::set_can_volvo_fa_min_vspeed_short(double value) {
set_has_can_volvo_fa_min_vspeed_short();
can_volvo_fa_min_vspeed_short_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle6_5f5.can_volvo_fa_min_vspeed_short)
}
// optional double can_volvo_fa_aalign_estimate = 5;
bool Vehicle6_5f5::has_can_volvo_fa_aalign_estimate() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Vehicle6_5f5::set_has_can_volvo_fa_aalign_estimate() {
_has_bits_[0] |= 0x00000010u;
}
void Vehicle6_5f5::clear_has_can_volvo_fa_aalign_estimate() {
_has_bits_[0] &= ~0x00000010u;
}
void Vehicle6_5f5::clear_can_volvo_fa_aalign_estimate() {
can_volvo_fa_aalign_estimate_ = 0;
clear_has_can_volvo_fa_aalign_estimate();
}
double Vehicle6_5f5::can_volvo_fa_aalign_estimate() const {
// @@protoc_insertion_point(field_get:apollo.drivers.Vehicle6_5f5.can_volvo_fa_aalign_estimate)
return can_volvo_fa_aalign_estimate_;
}
void Vehicle6_5f5::set_can_volvo_fa_aalign_estimate(double value) {
set_has_can_volvo_fa_aalign_estimate();
can_volvo_fa_aalign_estimate_ = value;
// @@protoc_insertion_point(field_set:apollo.drivers.Vehicle6_5f5.can_volvo_fa_aalign_estimate)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DelphiESR::kHeaderFieldNumber;
const int DelphiESR::kEsrStatus95E8FieldNumber;
const int DelphiESR::kEsrStatus65E5FieldNumber;
const int DelphiESR::kEsrStatus55E4FieldNumber;
const int DelphiESR::kEsrStatus34E2FieldNumber;
const int DelphiESR::kEsrStatus44E3FieldNumber;
const int DelphiESR::kEsrTrackmotionpower540FieldNumber;
const int DelphiESR::kAcmInstReq7E0FieldNumber;
const int DelphiESR::kEsrTrack01500FieldNumber;
const int DelphiESR::kEsrValid15D0FieldNumber;
const int DelphiESR::kEsrValid25D1FieldNumber;
const int DelphiESR::kAcmInstResp7E4FieldNumber;
const int DelphiESR::kVehicle24F1FieldNumber;
const int DelphiESR::kVehicle14F0FieldNumber;
const int DelphiESR::kEsrSim15C0FieldNumber;
const int DelphiESR::kEsrStatus14E0FieldNumber;
const int DelphiESR::kEsrStatus24E1FieldNumber;
const int DelphiESR::kEsrStatus85E7FieldNumber;
const int DelphiESR::kEsrStatus75E6FieldNumber;
const int DelphiESR::kVehicle35F2FieldNumber;
const int DelphiESR::kVehicle45F3FieldNumber;
const int DelphiESR::kVehicle55F4FieldNumber;
const int DelphiESR::kVehicle65F5FieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
DelphiESR::DelphiESR()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:apollo.drivers.DelphiESR)
}
void DelphiESR::InitAsDefaultInstance() {
header_ = const_cast< ::apollo::common::Header*>(&::apollo::common::Header::default_instance());
esr_status9_5e8_ = const_cast< ::apollo::drivers::Esr_status9_5e8*>(&::apollo::drivers::Esr_status9_5e8::default_instance());
esr_status6_5e5_ = const_cast< ::apollo::drivers::Esr_status6_5e5*>(&::apollo::drivers::Esr_status6_5e5::default_instance());
esr_status5_5e4_ = const_cast< ::apollo::drivers::Esr_status5_5e4*>(&::apollo::drivers::Esr_status5_5e4::default_instance());
esr_status3_4e2_ = const_cast< ::apollo::drivers::Esr_status3_4e2*>(&::apollo::drivers::Esr_status3_4e2::default_instance());
esr_status4_4e3_ = const_cast< ::apollo::drivers::Esr_status4_4e3*>(&::apollo::drivers::Esr_status4_4e3::default_instance());
acm_inst_req_7e0_ = const_cast< ::apollo::drivers::Acm_inst_req_7e0*>(&::apollo::drivers::Acm_inst_req_7e0::default_instance());
esr_valid1_5d0_ = const_cast< ::apollo::drivers::Esr_valid1_5d0*>(&::apollo::drivers::Esr_valid1_5d0::default_instance());
esr_valid2_5d1_ = const_cast< ::apollo::drivers::Esr_valid2_5d1*>(&::apollo::drivers::Esr_valid2_5d1::default_instance());
acm_inst_resp_7e4_ = const_cast< ::apollo::drivers::Acm_inst_resp_7e4*>(&::apollo::drivers::Acm_inst_resp_7e4::default_instance());
vehicle2_4f1_ = const_cast< ::apollo::drivers::Vehicle2_4f1*>(&::apollo::drivers::Vehicle2_4f1::default_instance());
vehicle1_4f0_ = const_cast< ::apollo::drivers::Vehicle1_4f0*>(&::apollo::drivers::Vehicle1_4f0::default_instance());
esr_sim1_5c0_ = const_cast< ::apollo::drivers::Esr_sim1_5c0*>(&::apollo::drivers::Esr_sim1_5c0::default_instance());
esr_status1_4e0_ = const_cast< ::apollo::drivers::Esr_status1_4e0*>(&::apollo::drivers::Esr_status1_4e0::default_instance());
esr_status2_4e1_ = const_cast< ::apollo::drivers::Esr_status2_4e1*>(&::apollo::drivers::Esr_status2_4e1::default_instance());
esr_status8_5e7_ = const_cast< ::apollo::drivers::Esr_status8_5e7*>(&::apollo::drivers::Esr_status8_5e7::default_instance());
esr_status7_5e6_ = const_cast< ::apollo::drivers::Esr_status7_5e6*>(&::apollo::drivers::Esr_status7_5e6::default_instance());
vehicle3_5f2_ = const_cast< ::apollo::drivers::Vehicle3_5f2*>(&::apollo::drivers::Vehicle3_5f2::default_instance());
vehicle4_5f3_ = const_cast< ::apollo::drivers::Vehicle4_5f3*>(&::apollo::drivers::Vehicle4_5f3::default_instance());
vehicle5_5f4_ = const_cast< ::apollo::drivers::Vehicle5_5f4*>(&::apollo::drivers::Vehicle5_5f4::default_instance());
vehicle6_5f5_ = const_cast< ::apollo::drivers::Vehicle6_5f5*>(&::apollo::drivers::Vehicle6_5f5::default_instance());
}
DelphiESR::DelphiESR(const DelphiESR& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:apollo.drivers.DelphiESR)
}
void DelphiESR::SharedCtor() {
_cached_size_ = 0;
header_ = NULL;
esr_status9_5e8_ = NULL;
esr_status6_5e5_ = NULL;
esr_status5_5e4_ = NULL;
esr_status3_4e2_ = NULL;
esr_status4_4e3_ = NULL;
acm_inst_req_7e0_ = NULL;
esr_valid1_5d0_ = NULL;
esr_valid2_5d1_ = NULL;
acm_inst_resp_7e4_ = NULL;
vehicle2_4f1_ = NULL;
vehicle1_4f0_ = NULL;
esr_sim1_5c0_ = NULL;
esr_status1_4e0_ = NULL;
esr_status2_4e1_ = NULL;
esr_status8_5e7_ = NULL;
esr_status7_5e6_ = NULL;
vehicle3_5f2_ = NULL;
vehicle4_5f3_ = NULL;
vehicle5_5f4_ = NULL;
vehicle6_5f5_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
DelphiESR::~DelphiESR() {
// @@protoc_insertion_point(destructor:apollo.drivers.DelphiESR)
SharedDtor();
}
void DelphiESR::SharedDtor() {
if (this != default_instance_) {
delete header_;
delete esr_status9_5e8_;
delete esr_status6_5e5_;
delete esr_status5_5e4_;
delete esr_status3_4e2_;
delete esr_status4_4e3_;
delete acm_inst_req_7e0_;
delete esr_valid1_5d0_;
delete esr_valid2_5d1_;
delete acm_inst_resp_7e4_;
delete vehicle2_4f1_;
delete vehicle1_4f0_;
delete esr_sim1_5c0_;
delete esr_status1_4e0_;
delete esr_status2_4e1_;
delete esr_status8_5e7_;
delete esr_status7_5e6_;
delete vehicle3_5f2_;
delete vehicle4_5f3_;
delete vehicle5_5f4_;
delete vehicle6_5f5_;
}
}
void DelphiESR::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DelphiESR::descriptor() {
protobuf_AssignDescriptorsOnce();
return DelphiESR_descriptor_;
}
const DelphiESR& DelphiESR::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_drivers_2fdelphi_5fesr_2eproto();
return *default_instance_;
}
DelphiESR* DelphiESR::default_instance_ = NULL;
DelphiESR* DelphiESR::New(::google::protobuf::Arena* arena) const {
DelphiESR* n = new DelphiESR;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void DelphiESR::Clear() {
// @@protoc_insertion_point(message_clear_start:apollo.drivers.DelphiESR)
if (_has_bits_[0 / 32] & 191u) {
if (has_header()) {
if (header_ != NULL) header_->::apollo::common::Header::Clear();
}
if (has_esr_status9_5e8()) {
if (esr_status9_5e8_ != NULL) esr_status9_5e8_->::apollo::drivers::Esr_status9_5e8::Clear();
}
if (has_esr_status6_5e5()) {
if (esr_status6_5e5_ != NULL) esr_status6_5e5_->::apollo::drivers::Esr_status6_5e5::Clear();
}
if (has_esr_status5_5e4()) {
if (esr_status5_5e4_ != NULL) esr_status5_5e4_->::apollo::drivers::Esr_status5_5e4::Clear();
}
if (has_esr_status3_4e2()) {
if (esr_status3_4e2_ != NULL) esr_status3_4e2_->::apollo::drivers::Esr_status3_4e2::Clear();
}
if (has_esr_status4_4e3()) {
if (esr_status4_4e3_ != NULL) esr_status4_4e3_->::apollo::drivers::Esr_status4_4e3::Clear();
}
if (has_acm_inst_req_7e0()) {
if (acm_inst_req_7e0_ != NULL) acm_inst_req_7e0_->::apollo::drivers::Acm_inst_req_7e0::Clear();
}
}
if (_has_bits_[8 / 32] & 65024u) {
if (has_esr_valid1_5d0()) {
if (esr_valid1_5d0_ != NULL) esr_valid1_5d0_->::apollo::drivers::Esr_valid1_5d0::Clear();
}
if (has_esr_valid2_5d1()) {
if (esr_valid2_5d1_ != NULL) esr_valid2_5d1_->::apollo::drivers::Esr_valid2_5d1::Clear();
}
if (has_acm_inst_resp_7e4()) {
if (acm_inst_resp_7e4_ != NULL) acm_inst_resp_7e4_->::apollo::drivers::Acm_inst_resp_7e4::Clear();
}
if (has_vehicle2_4f1()) {
if (vehicle2_4f1_ != NULL) vehicle2_4f1_->::apollo::drivers::Vehicle2_4f1::Clear();
}
if (has_vehicle1_4f0()) {
if (vehicle1_4f0_ != NULL) vehicle1_4f0_->::apollo::drivers::Vehicle1_4f0::Clear();
}
if (has_esr_sim1_5c0()) {
if (esr_sim1_5c0_ != NULL) esr_sim1_5c0_->::apollo::drivers::Esr_sim1_5c0::Clear();
}
if (has_esr_status1_4e0()) {
if (esr_status1_4e0_ != NULL) esr_status1_4e0_->::apollo::drivers::Esr_status1_4e0::Clear();
}
}
if (_has_bits_[16 / 32] & 8323072u) {
if (has_esr_status2_4e1()) {
if (esr_status2_4e1_ != NULL) esr_status2_4e1_->::apollo::drivers::Esr_status2_4e1::Clear();
}
if (has_esr_status8_5e7()) {
if (esr_status8_5e7_ != NULL) esr_status8_5e7_->::apollo::drivers::Esr_status8_5e7::Clear();
}
if (has_esr_status7_5e6()) {
if (esr_status7_5e6_ != NULL) esr_status7_5e6_->::apollo::drivers::Esr_status7_5e6::Clear();
}
if (has_vehicle3_5f2()) {
if (vehicle3_5f2_ != NULL) vehicle3_5f2_->::apollo::drivers::Vehicle3_5f2::Clear();
}
if (has_vehicle4_5f3()) {
if (vehicle4_5f3_ != NULL) vehicle4_5f3_->::apollo::drivers::Vehicle4_5f3::Clear();
}
if (has_vehicle5_5f4()) {
if (vehicle5_5f4_ != NULL) vehicle5_5f4_->::apollo::drivers::Vehicle5_5f4::Clear();
}
if (has_vehicle6_5f5()) {
if (vehicle6_5f5_ != NULL) vehicle6_5f5_->::apollo::drivers::Vehicle6_5f5::Clear();
}
}
esr_trackmotionpower_540_.Clear();
esr_track01_500_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
if (_internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->Clear();
}
}
bool DelphiESR::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:apollo.drivers.DelphiESR)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .apollo.common.Header header = 1;
case 1: {
if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_header()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(18)) goto parse_esr_status9_5e8;
break;
}
// optional .apollo.drivers.Esr_status9_5e8 esr_status9_5e8 = 2;
case 2: {
if (tag == 18) {
parse_esr_status9_5e8:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_status9_5e8()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(26)) goto parse_esr_status6_5e5;
break;
}
// optional .apollo.drivers.Esr_status6_5e5 esr_status6_5e5 = 3;
case 3: {
if (tag == 26) {
parse_esr_status6_5e5:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_status6_5e5()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(34)) goto parse_esr_status5_5e4;
break;
}
// optional .apollo.drivers.Esr_status5_5e4 esr_status5_5e4 = 4;
case 4: {
if (tag == 34) {
parse_esr_status5_5e4:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_status5_5e4()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(42)) goto parse_esr_status3_4e2;
break;
}
// optional .apollo.drivers.Esr_status3_4e2 esr_status3_4e2 = 5;
case 5: {
if (tag == 42) {
parse_esr_status3_4e2:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_status3_4e2()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(50)) goto parse_esr_status4_4e3;
break;
}
// optional .apollo.drivers.Esr_status4_4e3 esr_status4_4e3 = 6;
case 6: {
if (tag == 50) {
parse_esr_status4_4e3:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_status4_4e3()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(58)) goto parse_esr_trackmotionpower_540;
break;
}
// repeated .apollo.drivers.Esr_trackmotionpower_540 esr_trackmotionpower_540 = 7;
case 7: {
if (tag == 58) {
parse_esr_trackmotionpower_540:
DO_(input->IncrementRecursionDepth());
parse_loop_esr_trackmotionpower_540:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_esr_trackmotionpower_540()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(58)) goto parse_loop_esr_trackmotionpower_540;
input->UnsafeDecrementRecursionDepth();
if (input->ExpectTag(66)) goto parse_acm_inst_req_7e0;
break;
}
// optional .apollo.drivers.Acm_inst_req_7e0 acm_inst_req_7e0 = 8;
case 8: {
if (tag == 66) {
parse_acm_inst_req_7e0:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_acm_inst_req_7e0()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(74)) goto parse_esr_track01_500;
break;
}
// repeated .apollo.drivers.Esr_track01_500 esr_track01_500 = 9;
case 9: {
if (tag == 74) {
parse_esr_track01_500:
DO_(input->IncrementRecursionDepth());
parse_loop_esr_track01_500:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_esr_track01_500()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(74)) goto parse_loop_esr_track01_500;
input->UnsafeDecrementRecursionDepth();
if (input->ExpectTag(82)) goto parse_esr_valid1_5d0;
break;
}
// optional .apollo.drivers.Esr_valid1_5d0 esr_valid1_5d0 = 10;
case 10: {
if (tag == 82) {
parse_esr_valid1_5d0:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_valid1_5d0()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(90)) goto parse_esr_valid2_5d1;
break;
}
// optional .apollo.drivers.Esr_valid2_5d1 esr_valid2_5d1 = 11;
case 11: {
if (tag == 90) {
parse_esr_valid2_5d1:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_valid2_5d1()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(98)) goto parse_acm_inst_resp_7e4;
break;
}
// optional .apollo.drivers.Acm_inst_resp_7e4 acm_inst_resp_7e4 = 12;
case 12: {
if (tag == 98) {
parse_acm_inst_resp_7e4:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_acm_inst_resp_7e4()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(106)) goto parse_vehicle2_4f1;
break;
}
// optional .apollo.drivers.Vehicle2_4f1 vehicle2_4f1 = 13;
case 13: {
if (tag == 106) {
parse_vehicle2_4f1:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_vehicle2_4f1()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(114)) goto parse_vehicle1_4f0;
break;
}
// optional .apollo.drivers.Vehicle1_4f0 vehicle1_4f0 = 14;
case 14: {
if (tag == 114) {
parse_vehicle1_4f0:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_vehicle1_4f0()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(122)) goto parse_esr_sim1_5c0;
break;
}
// optional .apollo.drivers.Esr_sim1_5c0 esr_sim1_5c0 = 15;
case 15: {
if (tag == 122) {
parse_esr_sim1_5c0:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_sim1_5c0()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(130)) goto parse_esr_status1_4e0;
break;
}
// optional .apollo.drivers.Esr_status1_4e0 esr_status1_4e0 = 16;
case 16: {
if (tag == 130) {
parse_esr_status1_4e0:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_status1_4e0()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(138)) goto parse_esr_status2_4e1;
break;
}
// optional .apollo.drivers.Esr_status2_4e1 esr_status2_4e1 = 17;
case 17: {
if (tag == 138) {
parse_esr_status2_4e1:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_status2_4e1()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(146)) goto parse_esr_status8_5e7;
break;
}
// optional .apollo.drivers.Esr_status8_5e7 esr_status8_5e7 = 18;
case 18: {
if (tag == 146) {
parse_esr_status8_5e7:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_status8_5e7()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(154)) goto parse_esr_status7_5e6;
break;
}
// optional .apollo.drivers.Esr_status7_5e6 esr_status7_5e6 = 19;
case 19: {
if (tag == 154) {
parse_esr_status7_5e6:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_esr_status7_5e6()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(162)) goto parse_vehicle3_5f2;
break;
}
// optional .apollo.drivers.Vehicle3_5f2 vehicle3_5f2 = 20;
case 20: {
if (tag == 162) {
parse_vehicle3_5f2:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_vehicle3_5f2()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(170)) goto parse_vehicle4_5f3;
break;
}
// optional .apollo.drivers.Vehicle4_5f3 vehicle4_5f3 = 21;
case 21: {
if (tag == 170) {
parse_vehicle4_5f3:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_vehicle4_5f3()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(178)) goto parse_vehicle5_5f4;
break;
}
// optional .apollo.drivers.Vehicle5_5f4 vehicle5_5f4 = 22;
case 22: {
if (tag == 178) {
parse_vehicle5_5f4:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_vehicle5_5f4()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(186)) goto parse_vehicle6_5f5;
break;
}
// optional .apollo.drivers.Vehicle6_5f5 vehicle6_5f5 = 23;
case 23: {
if (tag == 186) {
parse_vehicle6_5f5:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_vehicle6_5f5()));
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:apollo.drivers.DelphiESR)
return true;
failure:
// @@protoc_insertion_point(parse_failure:apollo.drivers.DelphiESR)
return false;
#undef DO_
}
void DelphiESR::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:apollo.drivers.DelphiESR)
// optional .apollo.common.Header header = 1;
if (has_header()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *this->header_, output);
}
// optional .apollo.drivers.Esr_status9_5e8 esr_status9_5e8 = 2;
if (has_esr_status9_5e8()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, *this->esr_status9_5e8_, output);
}
// optional .apollo.drivers.Esr_status6_5e5 esr_status6_5e5 = 3;
if (has_esr_status6_5e5()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, *this->esr_status6_5e5_, output);
}
// optional .apollo.drivers.Esr_status5_5e4 esr_status5_5e4 = 4;
if (has_esr_status5_5e4()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
4, *this->esr_status5_5e4_, output);
}
// optional .apollo.drivers.Esr_status3_4e2 esr_status3_4e2 = 5;
if (has_esr_status3_4e2()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
5, *this->esr_status3_4e2_, output);
}
// optional .apollo.drivers.Esr_status4_4e3 esr_status4_4e3 = 6;
if (has_esr_status4_4e3()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
6, *this->esr_status4_4e3_, output);
}
// repeated .apollo.drivers.Esr_trackmotionpower_540 esr_trackmotionpower_540 = 7;
for (unsigned int i = 0, n = this->esr_trackmotionpower_540_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
7, this->esr_trackmotionpower_540(i), output);
}
// optional .apollo.drivers.Acm_inst_req_7e0 acm_inst_req_7e0 = 8;
if (has_acm_inst_req_7e0()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
8, *this->acm_inst_req_7e0_, output);
}
// repeated .apollo.drivers.Esr_track01_500 esr_track01_500 = 9;
for (unsigned int i = 0, n = this->esr_track01_500_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
9, this->esr_track01_500(i), output);
}
// optional .apollo.drivers.Esr_valid1_5d0 esr_valid1_5d0 = 10;
if (has_esr_valid1_5d0()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
10, *this->esr_valid1_5d0_, output);
}
// optional .apollo.drivers.Esr_valid2_5d1 esr_valid2_5d1 = 11;
if (has_esr_valid2_5d1()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
11, *this->esr_valid2_5d1_, output);
}
// optional .apollo.drivers.Acm_inst_resp_7e4 acm_inst_resp_7e4 = 12;
if (has_acm_inst_resp_7e4()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
12, *this->acm_inst_resp_7e4_, output);
}
// optional .apollo.drivers.Vehicle2_4f1 vehicle2_4f1 = 13;
if (has_vehicle2_4f1()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
13, *this->vehicle2_4f1_, output);
}
// optional .apollo.drivers.Vehicle1_4f0 vehicle1_4f0 = 14;
if (has_vehicle1_4f0()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
14, *this->vehicle1_4f0_, output);
}
// optional .apollo.drivers.Esr_sim1_5c0 esr_sim1_5c0 = 15;
if (has_esr_sim1_5c0()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
15, *this->esr_sim1_5c0_, output);
}
// optional .apollo.drivers.Esr_status1_4e0 esr_status1_4e0 = 16;
if (has_esr_status1_4e0()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
16, *this->esr_status1_4e0_, output);
}
// optional .apollo.drivers.Esr_status2_4e1 esr_status2_4e1 = 17;
if (has_esr_status2_4e1()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
17, *this->esr_status2_4e1_, output);
}
// optional .apollo.drivers.Esr_status8_5e7 esr_status8_5e7 = 18;
if (has_esr_status8_5e7()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
18, *this->esr_status8_5e7_, output);
}
// optional .apollo.drivers.Esr_status7_5e6 esr_status7_5e6 = 19;
if (has_esr_status7_5e6()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
19, *this->esr_status7_5e6_, output);
}
// optional .apollo.drivers.Vehicle3_5f2 vehicle3_5f2 = 20;
if (has_vehicle3_5f2()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
20, *this->vehicle3_5f2_, output);
}
// optional .apollo.drivers.Vehicle4_5f3 vehicle4_5f3 = 21;
if (has_vehicle4_5f3()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
21, *this->vehicle4_5f3_, output);
}
// optional .apollo.drivers.Vehicle5_5f4 vehicle5_5f4 = 22;
if (has_vehicle5_5f4()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
22, *this->vehicle5_5f4_, output);
}
// optional .apollo.drivers.Vehicle6_5f5 vehicle6_5f5 = 23;
if (has_vehicle6_5f5()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
23, *this->vehicle6_5f5_, output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:apollo.drivers.DelphiESR)
}
::google::protobuf::uint8* DelphiESR::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:apollo.drivers.DelphiESR)
// optional .apollo.common.Header header = 1;
if (has_header()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
1, *this->header_, false, target);
}
// optional .apollo.drivers.Esr_status9_5e8 esr_status9_5e8 = 2;
if (has_esr_status9_5e8()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
2, *this->esr_status9_5e8_, false, target);
}
// optional .apollo.drivers.Esr_status6_5e5 esr_status6_5e5 = 3;
if (has_esr_status6_5e5()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
3, *this->esr_status6_5e5_, false, target);
}
// optional .apollo.drivers.Esr_status5_5e4 esr_status5_5e4 = 4;
if (has_esr_status5_5e4()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
4, *this->esr_status5_5e4_, false, target);
}
// optional .apollo.drivers.Esr_status3_4e2 esr_status3_4e2 = 5;
if (has_esr_status3_4e2()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
5, *this->esr_status3_4e2_, false, target);
}
// optional .apollo.drivers.Esr_status4_4e3 esr_status4_4e3 = 6;
if (has_esr_status4_4e3()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
6, *this->esr_status4_4e3_, false, target);
}
// repeated .apollo.drivers.Esr_trackmotionpower_540 esr_trackmotionpower_540 = 7;
for (unsigned int i = 0, n = this->esr_trackmotionpower_540_size(); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
7, this->esr_trackmotionpower_540(i), false, target);
}
// optional .apollo.drivers.Acm_inst_req_7e0 acm_inst_req_7e0 = 8;
if (has_acm_inst_req_7e0()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
8, *this->acm_inst_req_7e0_, false, target);
}
// repeated .apollo.drivers.Esr_track01_500 esr_track01_500 = 9;
for (unsigned int i = 0, n = this->esr_track01_500_size(); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
9, this->esr_track01_500(i), false, target);
}
// optional .apollo.drivers.Esr_valid1_5d0 esr_valid1_5d0 = 10;
if (has_esr_valid1_5d0()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
10, *this->esr_valid1_5d0_, false, target);
}
// optional .apollo.drivers.Esr_valid2_5d1 esr_valid2_5d1 = 11;
if (has_esr_valid2_5d1()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
11, *this->esr_valid2_5d1_, false, target);
}
// optional .apollo.drivers.Acm_inst_resp_7e4 acm_inst_resp_7e4 = 12;
if (has_acm_inst_resp_7e4()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
12, *this->acm_inst_resp_7e4_, false, target);
}
// optional .apollo.drivers.Vehicle2_4f1 vehicle2_4f1 = 13;
if (has_vehicle2_4f1()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
13, *this->vehicle2_4f1_, false, target);
}
// optional .apollo.drivers.Vehicle1_4f0 vehicle1_4f0 = 14;
if (has_vehicle1_4f0()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
14, *this->vehicle1_4f0_, false, target);
}
// optional .apollo.drivers.Esr_sim1_5c0 esr_sim1_5c0 = 15;
if (has_esr_sim1_5c0()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
15, *this->esr_sim1_5c0_, false, target);
}
// optional .apollo.drivers.Esr_status1_4e0 esr_status1_4e0 = 16;
if (has_esr_status1_4e0()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
16, *this->esr_status1_4e0_, false, target);
}
// optional .apollo.drivers.Esr_status2_4e1 esr_status2_4e1 = 17;
if (has_esr_status2_4e1()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
17, *this->esr_status2_4e1_, false, target);
}
// optional .apollo.drivers.Esr_status8_5e7 esr_status8_5e7 = 18;
if (has_esr_status8_5e7()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
18, *this->esr_status8_5e7_, false, target);
}
// optional .apollo.drivers.Esr_status7_5e6 esr_status7_5e6 = 19;
if (has_esr_status7_5e6()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
19, *this->esr_status7_5e6_, false, target);
}
// optional .apollo.drivers.Vehicle3_5f2 vehicle3_5f2 = 20;
if (has_vehicle3_5f2()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
20, *this->vehicle3_5f2_, false, target);
}
// optional .apollo.drivers.Vehicle4_5f3 vehicle4_5f3 = 21;
if (has_vehicle4_5f3()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
21, *this->vehicle4_5f3_, false, target);
}
// optional .apollo.drivers.Vehicle5_5f4 vehicle5_5f4 = 22;
if (has_vehicle5_5f4()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
22, *this->vehicle5_5f4_, false, target);
}
// optional .apollo.drivers.Vehicle6_5f5 vehicle6_5f5 = 23;
if (has_vehicle6_5f5()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
23, *this->vehicle6_5f5_, false, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:apollo.drivers.DelphiESR)
return target;
}
int DelphiESR::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:apollo.drivers.DelphiESR)
int total_size = 0;
if (_has_bits_[0 / 32] & 191u) {
// optional .apollo.common.Header header = 1;
if (has_header()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->header_);
}
// optional .apollo.drivers.Esr_status9_5e8 esr_status9_5e8 = 2;
if (has_esr_status9_5e8()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_status9_5e8_);
}
// optional .apollo.drivers.Esr_status6_5e5 esr_status6_5e5 = 3;
if (has_esr_status6_5e5()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_status6_5e5_);
}
// optional .apollo.drivers.Esr_status5_5e4 esr_status5_5e4 = 4;
if (has_esr_status5_5e4()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_status5_5e4_);
}
// optional .apollo.drivers.Esr_status3_4e2 esr_status3_4e2 = 5;
if (has_esr_status3_4e2()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_status3_4e2_);
}
// optional .apollo.drivers.Esr_status4_4e3 esr_status4_4e3 = 6;
if (has_esr_status4_4e3()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_status4_4e3_);
}
// optional .apollo.drivers.Acm_inst_req_7e0 acm_inst_req_7e0 = 8;
if (has_acm_inst_req_7e0()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->acm_inst_req_7e0_);
}
}
if (_has_bits_[9 / 32] & 65024u) {
// optional .apollo.drivers.Esr_valid1_5d0 esr_valid1_5d0 = 10;
if (has_esr_valid1_5d0()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_valid1_5d0_);
}
// optional .apollo.drivers.Esr_valid2_5d1 esr_valid2_5d1 = 11;
if (has_esr_valid2_5d1()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_valid2_5d1_);
}
// optional .apollo.drivers.Acm_inst_resp_7e4 acm_inst_resp_7e4 = 12;
if (has_acm_inst_resp_7e4()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->acm_inst_resp_7e4_);
}
// optional .apollo.drivers.Vehicle2_4f1 vehicle2_4f1 = 13;
if (has_vehicle2_4f1()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->vehicle2_4f1_);
}
// optional .apollo.drivers.Vehicle1_4f0 vehicle1_4f0 = 14;
if (has_vehicle1_4f0()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->vehicle1_4f0_);
}
// optional .apollo.drivers.Esr_sim1_5c0 esr_sim1_5c0 = 15;
if (has_esr_sim1_5c0()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_sim1_5c0_);
}
// optional .apollo.drivers.Esr_status1_4e0 esr_status1_4e0 = 16;
if (has_esr_status1_4e0()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_status1_4e0_);
}
}
if (_has_bits_[16 / 32] & 8323072u) {
// optional .apollo.drivers.Esr_status2_4e1 esr_status2_4e1 = 17;
if (has_esr_status2_4e1()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_status2_4e1_);
}
// optional .apollo.drivers.Esr_status8_5e7 esr_status8_5e7 = 18;
if (has_esr_status8_5e7()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_status8_5e7_);
}
// optional .apollo.drivers.Esr_status7_5e6 esr_status7_5e6 = 19;
if (has_esr_status7_5e6()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->esr_status7_5e6_);
}
// optional .apollo.drivers.Vehicle3_5f2 vehicle3_5f2 = 20;
if (has_vehicle3_5f2()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->vehicle3_5f2_);
}
// optional .apollo.drivers.Vehicle4_5f3 vehicle4_5f3 = 21;
if (has_vehicle4_5f3()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->vehicle4_5f3_);
}
// optional .apollo.drivers.Vehicle5_5f4 vehicle5_5f4 = 22;
if (has_vehicle5_5f4()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->vehicle5_5f4_);
}
// optional .apollo.drivers.Vehicle6_5f5 vehicle6_5f5 = 23;
if (has_vehicle6_5f5()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->vehicle6_5f5_);
}
}
// repeated .apollo.drivers.Esr_trackmotionpower_540 esr_trackmotionpower_540 = 7;
total_size += 1 * this->esr_trackmotionpower_540_size();
for (int i = 0; i < this->esr_trackmotionpower_540_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->esr_trackmotionpower_540(i));
}
// repeated .apollo.drivers.Esr_track01_500 esr_track01_500 = 9;
total_size += 1 * this->esr_track01_500_size();
for (int i = 0; i < this->esr_track01_500_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->esr_track01_500(i));
}
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void DelphiESR::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:apollo.drivers.DelphiESR)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
const DelphiESR* source =
::google::protobuf::internal::DynamicCastToGenerated<const DelphiESR>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:apollo.drivers.DelphiESR)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:apollo.drivers.DelphiESR)
MergeFrom(*source);
}
}
void DelphiESR::MergeFrom(const DelphiESR& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:apollo.drivers.DelphiESR)
if (GOOGLE_PREDICT_FALSE(&from == this)) {
::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
}
esr_trackmotionpower_540_.MergeFrom(from.esr_trackmotionpower_540_);
esr_track01_500_.MergeFrom(from.esr_track01_500_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_header()) {
mutable_header()->::apollo::common::Header::MergeFrom(from.header());
}
if (from.has_esr_status9_5e8()) {
mutable_esr_status9_5e8()->::apollo::drivers::Esr_status9_5e8::MergeFrom(from.esr_status9_5e8());
}
if (from.has_esr_status6_5e5()) {
mutable_esr_status6_5e5()->::apollo::drivers::Esr_status6_5e5::MergeFrom(from.esr_status6_5e5());
}
if (from.has_esr_status5_5e4()) {
mutable_esr_status5_5e4()->::apollo::drivers::Esr_status5_5e4::MergeFrom(from.esr_status5_5e4());
}
if (from.has_esr_status3_4e2()) {
mutable_esr_status3_4e2()->::apollo::drivers::Esr_status3_4e2::MergeFrom(from.esr_status3_4e2());
}
if (from.has_esr_status4_4e3()) {
mutable_esr_status4_4e3()->::apollo::drivers::Esr_status4_4e3::MergeFrom(from.esr_status4_4e3());
}
if (from.has_acm_inst_req_7e0()) {
mutable_acm_inst_req_7e0()->::apollo::drivers::Acm_inst_req_7e0::MergeFrom(from.acm_inst_req_7e0());
}
}
if (from._has_bits_[9 / 32] & (0xffu << (9 % 32))) {
if (from.has_esr_valid1_5d0()) {
mutable_esr_valid1_5d0()->::apollo::drivers::Esr_valid1_5d0::MergeFrom(from.esr_valid1_5d0());
}
if (from.has_esr_valid2_5d1()) {
mutable_esr_valid2_5d1()->::apollo::drivers::Esr_valid2_5d1::MergeFrom(from.esr_valid2_5d1());
}
if (from.has_acm_inst_resp_7e4()) {
mutable_acm_inst_resp_7e4()->::apollo::drivers::Acm_inst_resp_7e4::MergeFrom(from.acm_inst_resp_7e4());
}
if (from.has_vehicle2_4f1()) {
mutable_vehicle2_4f1()->::apollo::drivers::Vehicle2_4f1::MergeFrom(from.vehicle2_4f1());
}
if (from.has_vehicle1_4f0()) {
mutable_vehicle1_4f0()->::apollo::drivers::Vehicle1_4f0::MergeFrom(from.vehicle1_4f0());
}
if (from.has_esr_sim1_5c0()) {
mutable_esr_sim1_5c0()->::apollo::drivers::Esr_sim1_5c0::MergeFrom(from.esr_sim1_5c0());
}
if (from.has_esr_status1_4e0()) {
mutable_esr_status1_4e0()->::apollo::drivers::Esr_status1_4e0::MergeFrom(from.esr_status1_4e0());
}
}
if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
if (from.has_esr_status2_4e1()) {
mutable_esr_status2_4e1()->::apollo::drivers::Esr_status2_4e1::MergeFrom(from.esr_status2_4e1());
}
if (from.has_esr_status8_5e7()) {
mutable_esr_status8_5e7()->::apollo::drivers::Esr_status8_5e7::MergeFrom(from.esr_status8_5e7());
}
if (from.has_esr_status7_5e6()) {
mutable_esr_status7_5e6()->::apollo::drivers::Esr_status7_5e6::MergeFrom(from.esr_status7_5e6());
}
if (from.has_vehicle3_5f2()) {
mutable_vehicle3_5f2()->::apollo::drivers::Vehicle3_5f2::MergeFrom(from.vehicle3_5f2());
}
if (from.has_vehicle4_5f3()) {
mutable_vehicle4_5f3()->::apollo::drivers::Vehicle4_5f3::MergeFrom(from.vehicle4_5f3());
}
if (from.has_vehicle5_5f4()) {
mutable_vehicle5_5f4()->::apollo::drivers::Vehicle5_5f4::MergeFrom(from.vehicle5_5f4());
}
if (from.has_vehicle6_5f5()) {
mutable_vehicle6_5f5()->::apollo::drivers::Vehicle6_5f5::MergeFrom(from.vehicle6_5f5());
}
}
if (from._internal_metadata_.have_unknown_fields()) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
void DelphiESR::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:apollo.drivers.DelphiESR)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void DelphiESR::CopyFrom(const DelphiESR& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:apollo.drivers.DelphiESR)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DelphiESR::IsInitialized() const {
return true;
}
void DelphiESR::Swap(DelphiESR* other) {
if (other == this) return;
InternalSwap(other);
}
void DelphiESR::InternalSwap(DelphiESR* other) {
std::swap(header_, other->header_);
std::swap(esr_status9_5e8_, other->esr_status9_5e8_);
std::swap(esr_status6_5e5_, other->esr_status6_5e5_);
std::swap(esr_status5_5e4_, other->esr_status5_5e4_);
std::swap(esr_status3_4e2_, other->esr_status3_4e2_);
std::swap(esr_status4_4e3_, other->esr_status4_4e3_);
esr_trackmotionpower_540_.UnsafeArenaSwap(&other->esr_trackmotionpower_540_);
std::swap(acm_inst_req_7e0_, other->acm_inst_req_7e0_);
esr_track01_500_.UnsafeArenaSwap(&other->esr_track01_500_);
std::swap(esr_valid1_5d0_, other->esr_valid1_5d0_);
std::swap(esr_valid2_5d1_, other->esr_valid2_5d1_);
std::swap(acm_inst_resp_7e4_, other->acm_inst_resp_7e4_);
std::swap(vehicle2_4f1_, other->vehicle2_4f1_);
std::swap(vehicle1_4f0_, other->vehicle1_4f0_);
std::swap(esr_sim1_5c0_, other->esr_sim1_5c0_);
std::swap(esr_status1_4e0_, other->esr_status1_4e0_);
std::swap(esr_status2_4e1_, other->esr_status2_4e1_);
std::swap(esr_status8_5e7_, other->esr_status8_5e7_);
std::swap(esr_status7_5e6_, other->esr_status7_5e6_);
std::swap(vehicle3_5f2_, other->vehicle3_5f2_);
std::swap(vehicle4_5f3_, other->vehicle4_5f3_);
std::swap(vehicle5_5f4_, other->vehicle5_5f4_);
std::swap(vehicle6_5f5_, other->vehicle6_5f5_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata DelphiESR::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = DelphiESR_descriptor_;
metadata.reflection = DelphiESR_reflection_;
return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DelphiESR
// optional .apollo.common.Header header = 1;
bool DelphiESR::has_header() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void DelphiESR::set_has_header() {
_has_bits_[0] |= 0x00000001u;
}
void DelphiESR::clear_has_header() {
_has_bits_[0] &= ~0x00000001u;
}
void DelphiESR::clear_header() {
if (header_ != NULL) header_->::apollo::common::Header::Clear();
clear_has_header();
}
const ::apollo::common::Header& DelphiESR::header() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.header)
return header_ != NULL ? *header_ : *default_instance_->header_;
}
::apollo::common::Header* DelphiESR::mutable_header() {
set_has_header();
if (header_ == NULL) {
header_ = new ::apollo::common::Header;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.header)
return header_;
}
::apollo::common::Header* DelphiESR::release_header() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.header)
clear_has_header();
::apollo::common::Header* temp = header_;
header_ = NULL;
return temp;
}
void DelphiESR::set_allocated_header(::apollo::common::Header* header) {
delete header_;
header_ = header;
if (header) {
set_has_header();
} else {
clear_has_header();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.header)
}
// optional .apollo.drivers.Esr_status9_5e8 esr_status9_5e8 = 2;
bool DelphiESR::has_esr_status9_5e8() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void DelphiESR::set_has_esr_status9_5e8() {
_has_bits_[0] |= 0x00000002u;
}
void DelphiESR::clear_has_esr_status9_5e8() {
_has_bits_[0] &= ~0x00000002u;
}
void DelphiESR::clear_esr_status9_5e8() {
if (esr_status9_5e8_ != NULL) esr_status9_5e8_->::apollo::drivers::Esr_status9_5e8::Clear();
clear_has_esr_status9_5e8();
}
const ::apollo::drivers::Esr_status9_5e8& DelphiESR::esr_status9_5e8() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_status9_5e8)
return esr_status9_5e8_ != NULL ? *esr_status9_5e8_ : *default_instance_->esr_status9_5e8_;
}
::apollo::drivers::Esr_status9_5e8* DelphiESR::mutable_esr_status9_5e8() {
set_has_esr_status9_5e8();
if (esr_status9_5e8_ == NULL) {
esr_status9_5e8_ = new ::apollo::drivers::Esr_status9_5e8;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_status9_5e8)
return esr_status9_5e8_;
}
::apollo::drivers::Esr_status9_5e8* DelphiESR::release_esr_status9_5e8() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_status9_5e8)
clear_has_esr_status9_5e8();
::apollo::drivers::Esr_status9_5e8* temp = esr_status9_5e8_;
esr_status9_5e8_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_status9_5e8(::apollo::drivers::Esr_status9_5e8* esr_status9_5e8) {
delete esr_status9_5e8_;
esr_status9_5e8_ = esr_status9_5e8;
if (esr_status9_5e8) {
set_has_esr_status9_5e8();
} else {
clear_has_esr_status9_5e8();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_status9_5e8)
}
// optional .apollo.drivers.Esr_status6_5e5 esr_status6_5e5 = 3;
bool DelphiESR::has_esr_status6_5e5() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void DelphiESR::set_has_esr_status6_5e5() {
_has_bits_[0] |= 0x00000004u;
}
void DelphiESR::clear_has_esr_status6_5e5() {
_has_bits_[0] &= ~0x00000004u;
}
void DelphiESR::clear_esr_status6_5e5() {
if (esr_status6_5e5_ != NULL) esr_status6_5e5_->::apollo::drivers::Esr_status6_5e5::Clear();
clear_has_esr_status6_5e5();
}
const ::apollo::drivers::Esr_status6_5e5& DelphiESR::esr_status6_5e5() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_status6_5e5)
return esr_status6_5e5_ != NULL ? *esr_status6_5e5_ : *default_instance_->esr_status6_5e5_;
}
::apollo::drivers::Esr_status6_5e5* DelphiESR::mutable_esr_status6_5e5() {
set_has_esr_status6_5e5();
if (esr_status6_5e5_ == NULL) {
esr_status6_5e5_ = new ::apollo::drivers::Esr_status6_5e5;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_status6_5e5)
return esr_status6_5e5_;
}
::apollo::drivers::Esr_status6_5e5* DelphiESR::release_esr_status6_5e5() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_status6_5e5)
clear_has_esr_status6_5e5();
::apollo::drivers::Esr_status6_5e5* temp = esr_status6_5e5_;
esr_status6_5e5_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_status6_5e5(::apollo::drivers::Esr_status6_5e5* esr_status6_5e5) {
delete esr_status6_5e5_;
esr_status6_5e5_ = esr_status6_5e5;
if (esr_status6_5e5) {
set_has_esr_status6_5e5();
} else {
clear_has_esr_status6_5e5();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_status6_5e5)
}
// optional .apollo.drivers.Esr_status5_5e4 esr_status5_5e4 = 4;
bool DelphiESR::has_esr_status5_5e4() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void DelphiESR::set_has_esr_status5_5e4() {
_has_bits_[0] |= 0x00000008u;
}
void DelphiESR::clear_has_esr_status5_5e4() {
_has_bits_[0] &= ~0x00000008u;
}
void DelphiESR::clear_esr_status5_5e4() {
if (esr_status5_5e4_ != NULL) esr_status5_5e4_->::apollo::drivers::Esr_status5_5e4::Clear();
clear_has_esr_status5_5e4();
}
const ::apollo::drivers::Esr_status5_5e4& DelphiESR::esr_status5_5e4() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_status5_5e4)
return esr_status5_5e4_ != NULL ? *esr_status5_5e4_ : *default_instance_->esr_status5_5e4_;
}
::apollo::drivers::Esr_status5_5e4* DelphiESR::mutable_esr_status5_5e4() {
set_has_esr_status5_5e4();
if (esr_status5_5e4_ == NULL) {
esr_status5_5e4_ = new ::apollo::drivers::Esr_status5_5e4;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_status5_5e4)
return esr_status5_5e4_;
}
::apollo::drivers::Esr_status5_5e4* DelphiESR::release_esr_status5_5e4() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_status5_5e4)
clear_has_esr_status5_5e4();
::apollo::drivers::Esr_status5_5e4* temp = esr_status5_5e4_;
esr_status5_5e4_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_status5_5e4(::apollo::drivers::Esr_status5_5e4* esr_status5_5e4) {
delete esr_status5_5e4_;
esr_status5_5e4_ = esr_status5_5e4;
if (esr_status5_5e4) {
set_has_esr_status5_5e4();
} else {
clear_has_esr_status5_5e4();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_status5_5e4)
}
// optional .apollo.drivers.Esr_status3_4e2 esr_status3_4e2 = 5;
bool DelphiESR::has_esr_status3_4e2() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void DelphiESR::set_has_esr_status3_4e2() {
_has_bits_[0] |= 0x00000010u;
}
void DelphiESR::clear_has_esr_status3_4e2() {
_has_bits_[0] &= ~0x00000010u;
}
void DelphiESR::clear_esr_status3_4e2() {
if (esr_status3_4e2_ != NULL) esr_status3_4e2_->::apollo::drivers::Esr_status3_4e2::Clear();
clear_has_esr_status3_4e2();
}
const ::apollo::drivers::Esr_status3_4e2& DelphiESR::esr_status3_4e2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_status3_4e2)
return esr_status3_4e2_ != NULL ? *esr_status3_4e2_ : *default_instance_->esr_status3_4e2_;
}
::apollo::drivers::Esr_status3_4e2* DelphiESR::mutable_esr_status3_4e2() {
set_has_esr_status3_4e2();
if (esr_status3_4e2_ == NULL) {
esr_status3_4e2_ = new ::apollo::drivers::Esr_status3_4e2;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_status3_4e2)
return esr_status3_4e2_;
}
::apollo::drivers::Esr_status3_4e2* DelphiESR::release_esr_status3_4e2() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_status3_4e2)
clear_has_esr_status3_4e2();
::apollo::drivers::Esr_status3_4e2* temp = esr_status3_4e2_;
esr_status3_4e2_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_status3_4e2(::apollo::drivers::Esr_status3_4e2* esr_status3_4e2) {
delete esr_status3_4e2_;
esr_status3_4e2_ = esr_status3_4e2;
if (esr_status3_4e2) {
set_has_esr_status3_4e2();
} else {
clear_has_esr_status3_4e2();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_status3_4e2)
}
// optional .apollo.drivers.Esr_status4_4e3 esr_status4_4e3 = 6;
bool DelphiESR::has_esr_status4_4e3() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void DelphiESR::set_has_esr_status4_4e3() {
_has_bits_[0] |= 0x00000020u;
}
void DelphiESR::clear_has_esr_status4_4e3() {
_has_bits_[0] &= ~0x00000020u;
}
void DelphiESR::clear_esr_status4_4e3() {
if (esr_status4_4e3_ != NULL) esr_status4_4e3_->::apollo::drivers::Esr_status4_4e3::Clear();
clear_has_esr_status4_4e3();
}
const ::apollo::drivers::Esr_status4_4e3& DelphiESR::esr_status4_4e3() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_status4_4e3)
return esr_status4_4e3_ != NULL ? *esr_status4_4e3_ : *default_instance_->esr_status4_4e3_;
}
::apollo::drivers::Esr_status4_4e3* DelphiESR::mutable_esr_status4_4e3() {
set_has_esr_status4_4e3();
if (esr_status4_4e3_ == NULL) {
esr_status4_4e3_ = new ::apollo::drivers::Esr_status4_4e3;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_status4_4e3)
return esr_status4_4e3_;
}
::apollo::drivers::Esr_status4_4e3* DelphiESR::release_esr_status4_4e3() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_status4_4e3)
clear_has_esr_status4_4e3();
::apollo::drivers::Esr_status4_4e3* temp = esr_status4_4e3_;
esr_status4_4e3_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_status4_4e3(::apollo::drivers::Esr_status4_4e3* esr_status4_4e3) {
delete esr_status4_4e3_;
esr_status4_4e3_ = esr_status4_4e3;
if (esr_status4_4e3) {
set_has_esr_status4_4e3();
} else {
clear_has_esr_status4_4e3();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_status4_4e3)
}
// repeated .apollo.drivers.Esr_trackmotionpower_540 esr_trackmotionpower_540 = 7;
int DelphiESR::esr_trackmotionpower_540_size() const {
return esr_trackmotionpower_540_.size();
}
void DelphiESR::clear_esr_trackmotionpower_540() {
esr_trackmotionpower_540_.Clear();
}
const ::apollo::drivers::Esr_trackmotionpower_540& DelphiESR::esr_trackmotionpower_540(int index) const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_trackmotionpower_540)
return esr_trackmotionpower_540_.Get(index);
}
::apollo::drivers::Esr_trackmotionpower_540* DelphiESR::mutable_esr_trackmotionpower_540(int index) {
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_trackmotionpower_540)
return esr_trackmotionpower_540_.Mutable(index);
}
::apollo::drivers::Esr_trackmotionpower_540* DelphiESR::add_esr_trackmotionpower_540() {
// @@protoc_insertion_point(field_add:apollo.drivers.DelphiESR.esr_trackmotionpower_540)
return esr_trackmotionpower_540_.Add();
}
::google::protobuf::RepeatedPtrField< ::apollo::drivers::Esr_trackmotionpower_540 >*
DelphiESR::mutable_esr_trackmotionpower_540() {
// @@protoc_insertion_point(field_mutable_list:apollo.drivers.DelphiESR.esr_trackmotionpower_540)
return &esr_trackmotionpower_540_;
}
const ::google::protobuf::RepeatedPtrField< ::apollo::drivers::Esr_trackmotionpower_540 >&
DelphiESR::esr_trackmotionpower_540() const {
// @@protoc_insertion_point(field_list:apollo.drivers.DelphiESR.esr_trackmotionpower_540)
return esr_trackmotionpower_540_;
}
// optional .apollo.drivers.Acm_inst_req_7e0 acm_inst_req_7e0 = 8;
bool DelphiESR::has_acm_inst_req_7e0() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void DelphiESR::set_has_acm_inst_req_7e0() {
_has_bits_[0] |= 0x00000080u;
}
void DelphiESR::clear_has_acm_inst_req_7e0() {
_has_bits_[0] &= ~0x00000080u;
}
void DelphiESR::clear_acm_inst_req_7e0() {
if (acm_inst_req_7e0_ != NULL) acm_inst_req_7e0_->::apollo::drivers::Acm_inst_req_7e0::Clear();
clear_has_acm_inst_req_7e0();
}
const ::apollo::drivers::Acm_inst_req_7e0& DelphiESR::acm_inst_req_7e0() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.acm_inst_req_7e0)
return acm_inst_req_7e0_ != NULL ? *acm_inst_req_7e0_ : *default_instance_->acm_inst_req_7e0_;
}
::apollo::drivers::Acm_inst_req_7e0* DelphiESR::mutable_acm_inst_req_7e0() {
set_has_acm_inst_req_7e0();
if (acm_inst_req_7e0_ == NULL) {
acm_inst_req_7e0_ = new ::apollo::drivers::Acm_inst_req_7e0;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.acm_inst_req_7e0)
return acm_inst_req_7e0_;
}
::apollo::drivers::Acm_inst_req_7e0* DelphiESR::release_acm_inst_req_7e0() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.acm_inst_req_7e0)
clear_has_acm_inst_req_7e0();
::apollo::drivers::Acm_inst_req_7e0* temp = acm_inst_req_7e0_;
acm_inst_req_7e0_ = NULL;
return temp;
}
void DelphiESR::set_allocated_acm_inst_req_7e0(::apollo::drivers::Acm_inst_req_7e0* acm_inst_req_7e0) {
delete acm_inst_req_7e0_;
acm_inst_req_7e0_ = acm_inst_req_7e0;
if (acm_inst_req_7e0) {
set_has_acm_inst_req_7e0();
} else {
clear_has_acm_inst_req_7e0();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.acm_inst_req_7e0)
}
// repeated .apollo.drivers.Esr_track01_500 esr_track01_500 = 9;
int DelphiESR::esr_track01_500_size() const {
return esr_track01_500_.size();
}
void DelphiESR::clear_esr_track01_500() {
esr_track01_500_.Clear();
}
const ::apollo::drivers::Esr_track01_500& DelphiESR::esr_track01_500(int index) const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_track01_500)
return esr_track01_500_.Get(index);
}
::apollo::drivers::Esr_track01_500* DelphiESR::mutable_esr_track01_500(int index) {
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_track01_500)
return esr_track01_500_.Mutable(index);
}
::apollo::drivers::Esr_track01_500* DelphiESR::add_esr_track01_500() {
// @@protoc_insertion_point(field_add:apollo.drivers.DelphiESR.esr_track01_500)
return esr_track01_500_.Add();
}
::google::protobuf::RepeatedPtrField< ::apollo::drivers::Esr_track01_500 >*
DelphiESR::mutable_esr_track01_500() {
// @@protoc_insertion_point(field_mutable_list:apollo.drivers.DelphiESR.esr_track01_500)
return &esr_track01_500_;
}
const ::google::protobuf::RepeatedPtrField< ::apollo::drivers::Esr_track01_500 >&
DelphiESR::esr_track01_500() const {
// @@protoc_insertion_point(field_list:apollo.drivers.DelphiESR.esr_track01_500)
return esr_track01_500_;
}
// optional .apollo.drivers.Esr_valid1_5d0 esr_valid1_5d0 = 10;
bool DelphiESR::has_esr_valid1_5d0() const {
return (_has_bits_[0] & 0x00000200u) != 0;
}
void DelphiESR::set_has_esr_valid1_5d0() {
_has_bits_[0] |= 0x00000200u;
}
void DelphiESR::clear_has_esr_valid1_5d0() {
_has_bits_[0] &= ~0x00000200u;
}
void DelphiESR::clear_esr_valid1_5d0() {
if (esr_valid1_5d0_ != NULL) esr_valid1_5d0_->::apollo::drivers::Esr_valid1_5d0::Clear();
clear_has_esr_valid1_5d0();
}
const ::apollo::drivers::Esr_valid1_5d0& DelphiESR::esr_valid1_5d0() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_valid1_5d0)
return esr_valid1_5d0_ != NULL ? *esr_valid1_5d0_ : *default_instance_->esr_valid1_5d0_;
}
::apollo::drivers::Esr_valid1_5d0* DelphiESR::mutable_esr_valid1_5d0() {
set_has_esr_valid1_5d0();
if (esr_valid1_5d0_ == NULL) {
esr_valid1_5d0_ = new ::apollo::drivers::Esr_valid1_5d0;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_valid1_5d0)
return esr_valid1_5d0_;
}
::apollo::drivers::Esr_valid1_5d0* DelphiESR::release_esr_valid1_5d0() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_valid1_5d0)
clear_has_esr_valid1_5d0();
::apollo::drivers::Esr_valid1_5d0* temp = esr_valid1_5d0_;
esr_valid1_5d0_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_valid1_5d0(::apollo::drivers::Esr_valid1_5d0* esr_valid1_5d0) {
delete esr_valid1_5d0_;
esr_valid1_5d0_ = esr_valid1_5d0;
if (esr_valid1_5d0) {
set_has_esr_valid1_5d0();
} else {
clear_has_esr_valid1_5d0();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_valid1_5d0)
}
// optional .apollo.drivers.Esr_valid2_5d1 esr_valid2_5d1 = 11;
bool DelphiESR::has_esr_valid2_5d1() const {
return (_has_bits_[0] & 0x00000400u) != 0;
}
void DelphiESR::set_has_esr_valid2_5d1() {
_has_bits_[0] |= 0x00000400u;
}
void DelphiESR::clear_has_esr_valid2_5d1() {
_has_bits_[0] &= ~0x00000400u;
}
void DelphiESR::clear_esr_valid2_5d1() {
if (esr_valid2_5d1_ != NULL) esr_valid2_5d1_->::apollo::drivers::Esr_valid2_5d1::Clear();
clear_has_esr_valid2_5d1();
}
const ::apollo::drivers::Esr_valid2_5d1& DelphiESR::esr_valid2_5d1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_valid2_5d1)
return esr_valid2_5d1_ != NULL ? *esr_valid2_5d1_ : *default_instance_->esr_valid2_5d1_;
}
::apollo::drivers::Esr_valid2_5d1* DelphiESR::mutable_esr_valid2_5d1() {
set_has_esr_valid2_5d1();
if (esr_valid2_5d1_ == NULL) {
esr_valid2_5d1_ = new ::apollo::drivers::Esr_valid2_5d1;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_valid2_5d1)
return esr_valid2_5d1_;
}
::apollo::drivers::Esr_valid2_5d1* DelphiESR::release_esr_valid2_5d1() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_valid2_5d1)
clear_has_esr_valid2_5d1();
::apollo::drivers::Esr_valid2_5d1* temp = esr_valid2_5d1_;
esr_valid2_5d1_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_valid2_5d1(::apollo::drivers::Esr_valid2_5d1* esr_valid2_5d1) {
delete esr_valid2_5d1_;
esr_valid2_5d1_ = esr_valid2_5d1;
if (esr_valid2_5d1) {
set_has_esr_valid2_5d1();
} else {
clear_has_esr_valid2_5d1();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_valid2_5d1)
}
// optional .apollo.drivers.Acm_inst_resp_7e4 acm_inst_resp_7e4 = 12;
bool DelphiESR::has_acm_inst_resp_7e4() const {
return (_has_bits_[0] & 0x00000800u) != 0;
}
void DelphiESR::set_has_acm_inst_resp_7e4() {
_has_bits_[0] |= 0x00000800u;
}
void DelphiESR::clear_has_acm_inst_resp_7e4() {
_has_bits_[0] &= ~0x00000800u;
}
void DelphiESR::clear_acm_inst_resp_7e4() {
if (acm_inst_resp_7e4_ != NULL) acm_inst_resp_7e4_->::apollo::drivers::Acm_inst_resp_7e4::Clear();
clear_has_acm_inst_resp_7e4();
}
const ::apollo::drivers::Acm_inst_resp_7e4& DelphiESR::acm_inst_resp_7e4() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.acm_inst_resp_7e4)
return acm_inst_resp_7e4_ != NULL ? *acm_inst_resp_7e4_ : *default_instance_->acm_inst_resp_7e4_;
}
::apollo::drivers::Acm_inst_resp_7e4* DelphiESR::mutable_acm_inst_resp_7e4() {
set_has_acm_inst_resp_7e4();
if (acm_inst_resp_7e4_ == NULL) {
acm_inst_resp_7e4_ = new ::apollo::drivers::Acm_inst_resp_7e4;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.acm_inst_resp_7e4)
return acm_inst_resp_7e4_;
}
::apollo::drivers::Acm_inst_resp_7e4* DelphiESR::release_acm_inst_resp_7e4() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.acm_inst_resp_7e4)
clear_has_acm_inst_resp_7e4();
::apollo::drivers::Acm_inst_resp_7e4* temp = acm_inst_resp_7e4_;
acm_inst_resp_7e4_ = NULL;
return temp;
}
void DelphiESR::set_allocated_acm_inst_resp_7e4(::apollo::drivers::Acm_inst_resp_7e4* acm_inst_resp_7e4) {
delete acm_inst_resp_7e4_;
acm_inst_resp_7e4_ = acm_inst_resp_7e4;
if (acm_inst_resp_7e4) {
set_has_acm_inst_resp_7e4();
} else {
clear_has_acm_inst_resp_7e4();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.acm_inst_resp_7e4)
}
// optional .apollo.drivers.Vehicle2_4f1 vehicle2_4f1 = 13;
bool DelphiESR::has_vehicle2_4f1() const {
return (_has_bits_[0] & 0x00001000u) != 0;
}
void DelphiESR::set_has_vehicle2_4f1() {
_has_bits_[0] |= 0x00001000u;
}
void DelphiESR::clear_has_vehicle2_4f1() {
_has_bits_[0] &= ~0x00001000u;
}
void DelphiESR::clear_vehicle2_4f1() {
if (vehicle2_4f1_ != NULL) vehicle2_4f1_->::apollo::drivers::Vehicle2_4f1::Clear();
clear_has_vehicle2_4f1();
}
const ::apollo::drivers::Vehicle2_4f1& DelphiESR::vehicle2_4f1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.vehicle2_4f1)
return vehicle2_4f1_ != NULL ? *vehicle2_4f1_ : *default_instance_->vehicle2_4f1_;
}
::apollo::drivers::Vehicle2_4f1* DelphiESR::mutable_vehicle2_4f1() {
set_has_vehicle2_4f1();
if (vehicle2_4f1_ == NULL) {
vehicle2_4f1_ = new ::apollo::drivers::Vehicle2_4f1;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.vehicle2_4f1)
return vehicle2_4f1_;
}
::apollo::drivers::Vehicle2_4f1* DelphiESR::release_vehicle2_4f1() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.vehicle2_4f1)
clear_has_vehicle2_4f1();
::apollo::drivers::Vehicle2_4f1* temp = vehicle2_4f1_;
vehicle2_4f1_ = NULL;
return temp;
}
void DelphiESR::set_allocated_vehicle2_4f1(::apollo::drivers::Vehicle2_4f1* vehicle2_4f1) {
delete vehicle2_4f1_;
vehicle2_4f1_ = vehicle2_4f1;
if (vehicle2_4f1) {
set_has_vehicle2_4f1();
} else {
clear_has_vehicle2_4f1();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.vehicle2_4f1)
}
// optional .apollo.drivers.Vehicle1_4f0 vehicle1_4f0 = 14;
bool DelphiESR::has_vehicle1_4f0() const {
return (_has_bits_[0] & 0x00002000u) != 0;
}
void DelphiESR::set_has_vehicle1_4f0() {
_has_bits_[0] |= 0x00002000u;
}
void DelphiESR::clear_has_vehicle1_4f0() {
_has_bits_[0] &= ~0x00002000u;
}
void DelphiESR::clear_vehicle1_4f0() {
if (vehicle1_4f0_ != NULL) vehicle1_4f0_->::apollo::drivers::Vehicle1_4f0::Clear();
clear_has_vehicle1_4f0();
}
const ::apollo::drivers::Vehicle1_4f0& DelphiESR::vehicle1_4f0() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.vehicle1_4f0)
return vehicle1_4f0_ != NULL ? *vehicle1_4f0_ : *default_instance_->vehicle1_4f0_;
}
::apollo::drivers::Vehicle1_4f0* DelphiESR::mutable_vehicle1_4f0() {
set_has_vehicle1_4f0();
if (vehicle1_4f0_ == NULL) {
vehicle1_4f0_ = new ::apollo::drivers::Vehicle1_4f0;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.vehicle1_4f0)
return vehicle1_4f0_;
}
::apollo::drivers::Vehicle1_4f0* DelphiESR::release_vehicle1_4f0() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.vehicle1_4f0)
clear_has_vehicle1_4f0();
::apollo::drivers::Vehicle1_4f0* temp = vehicle1_4f0_;
vehicle1_4f0_ = NULL;
return temp;
}
void DelphiESR::set_allocated_vehicle1_4f0(::apollo::drivers::Vehicle1_4f0* vehicle1_4f0) {
delete vehicle1_4f0_;
vehicle1_4f0_ = vehicle1_4f0;
if (vehicle1_4f0) {
set_has_vehicle1_4f0();
} else {
clear_has_vehicle1_4f0();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.vehicle1_4f0)
}
// optional .apollo.drivers.Esr_sim1_5c0 esr_sim1_5c0 = 15;
bool DelphiESR::has_esr_sim1_5c0() const {
return (_has_bits_[0] & 0x00004000u) != 0;
}
void DelphiESR::set_has_esr_sim1_5c0() {
_has_bits_[0] |= 0x00004000u;
}
void DelphiESR::clear_has_esr_sim1_5c0() {
_has_bits_[0] &= ~0x00004000u;
}
void DelphiESR::clear_esr_sim1_5c0() {
if (esr_sim1_5c0_ != NULL) esr_sim1_5c0_->::apollo::drivers::Esr_sim1_5c0::Clear();
clear_has_esr_sim1_5c0();
}
const ::apollo::drivers::Esr_sim1_5c0& DelphiESR::esr_sim1_5c0() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_sim1_5c0)
return esr_sim1_5c0_ != NULL ? *esr_sim1_5c0_ : *default_instance_->esr_sim1_5c0_;
}
::apollo::drivers::Esr_sim1_5c0* DelphiESR::mutable_esr_sim1_5c0() {
set_has_esr_sim1_5c0();
if (esr_sim1_5c0_ == NULL) {
esr_sim1_5c0_ = new ::apollo::drivers::Esr_sim1_5c0;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_sim1_5c0)
return esr_sim1_5c0_;
}
::apollo::drivers::Esr_sim1_5c0* DelphiESR::release_esr_sim1_5c0() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_sim1_5c0)
clear_has_esr_sim1_5c0();
::apollo::drivers::Esr_sim1_5c0* temp = esr_sim1_5c0_;
esr_sim1_5c0_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_sim1_5c0(::apollo::drivers::Esr_sim1_5c0* esr_sim1_5c0) {
delete esr_sim1_5c0_;
esr_sim1_5c0_ = esr_sim1_5c0;
if (esr_sim1_5c0) {
set_has_esr_sim1_5c0();
} else {
clear_has_esr_sim1_5c0();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_sim1_5c0)
}
// optional .apollo.drivers.Esr_status1_4e0 esr_status1_4e0 = 16;
bool DelphiESR::has_esr_status1_4e0() const {
return (_has_bits_[0] & 0x00008000u) != 0;
}
void DelphiESR::set_has_esr_status1_4e0() {
_has_bits_[0] |= 0x00008000u;
}
void DelphiESR::clear_has_esr_status1_4e0() {
_has_bits_[0] &= ~0x00008000u;
}
void DelphiESR::clear_esr_status1_4e0() {
if (esr_status1_4e0_ != NULL) esr_status1_4e0_->::apollo::drivers::Esr_status1_4e0::Clear();
clear_has_esr_status1_4e0();
}
const ::apollo::drivers::Esr_status1_4e0& DelphiESR::esr_status1_4e0() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_status1_4e0)
return esr_status1_4e0_ != NULL ? *esr_status1_4e0_ : *default_instance_->esr_status1_4e0_;
}
::apollo::drivers::Esr_status1_4e0* DelphiESR::mutable_esr_status1_4e0() {
set_has_esr_status1_4e0();
if (esr_status1_4e0_ == NULL) {
esr_status1_4e0_ = new ::apollo::drivers::Esr_status1_4e0;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_status1_4e0)
return esr_status1_4e0_;
}
::apollo::drivers::Esr_status1_4e0* DelphiESR::release_esr_status1_4e0() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_status1_4e0)
clear_has_esr_status1_4e0();
::apollo::drivers::Esr_status1_4e0* temp = esr_status1_4e0_;
esr_status1_4e0_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_status1_4e0(::apollo::drivers::Esr_status1_4e0* esr_status1_4e0) {
delete esr_status1_4e0_;
esr_status1_4e0_ = esr_status1_4e0;
if (esr_status1_4e0) {
set_has_esr_status1_4e0();
} else {
clear_has_esr_status1_4e0();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_status1_4e0)
}
// optional .apollo.drivers.Esr_status2_4e1 esr_status2_4e1 = 17;
bool DelphiESR::has_esr_status2_4e1() const {
return (_has_bits_[0] & 0x00010000u) != 0;
}
void DelphiESR::set_has_esr_status2_4e1() {
_has_bits_[0] |= 0x00010000u;
}
void DelphiESR::clear_has_esr_status2_4e1() {
_has_bits_[0] &= ~0x00010000u;
}
void DelphiESR::clear_esr_status2_4e1() {
if (esr_status2_4e1_ != NULL) esr_status2_4e1_->::apollo::drivers::Esr_status2_4e1::Clear();
clear_has_esr_status2_4e1();
}
const ::apollo::drivers::Esr_status2_4e1& DelphiESR::esr_status2_4e1() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_status2_4e1)
return esr_status2_4e1_ != NULL ? *esr_status2_4e1_ : *default_instance_->esr_status2_4e1_;
}
::apollo::drivers::Esr_status2_4e1* DelphiESR::mutable_esr_status2_4e1() {
set_has_esr_status2_4e1();
if (esr_status2_4e1_ == NULL) {
esr_status2_4e1_ = new ::apollo::drivers::Esr_status2_4e1;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_status2_4e1)
return esr_status2_4e1_;
}
::apollo::drivers::Esr_status2_4e1* DelphiESR::release_esr_status2_4e1() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_status2_4e1)
clear_has_esr_status2_4e1();
::apollo::drivers::Esr_status2_4e1* temp = esr_status2_4e1_;
esr_status2_4e1_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_status2_4e1(::apollo::drivers::Esr_status2_4e1* esr_status2_4e1) {
delete esr_status2_4e1_;
esr_status2_4e1_ = esr_status2_4e1;
if (esr_status2_4e1) {
set_has_esr_status2_4e1();
} else {
clear_has_esr_status2_4e1();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_status2_4e1)
}
// optional .apollo.drivers.Esr_status8_5e7 esr_status8_5e7 = 18;
bool DelphiESR::has_esr_status8_5e7() const {
return (_has_bits_[0] & 0x00020000u) != 0;
}
void DelphiESR::set_has_esr_status8_5e7() {
_has_bits_[0] |= 0x00020000u;
}
void DelphiESR::clear_has_esr_status8_5e7() {
_has_bits_[0] &= ~0x00020000u;
}
void DelphiESR::clear_esr_status8_5e7() {
if (esr_status8_5e7_ != NULL) esr_status8_5e7_->::apollo::drivers::Esr_status8_5e7::Clear();
clear_has_esr_status8_5e7();
}
const ::apollo::drivers::Esr_status8_5e7& DelphiESR::esr_status8_5e7() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_status8_5e7)
return esr_status8_5e7_ != NULL ? *esr_status8_5e7_ : *default_instance_->esr_status8_5e7_;
}
::apollo::drivers::Esr_status8_5e7* DelphiESR::mutable_esr_status8_5e7() {
set_has_esr_status8_5e7();
if (esr_status8_5e7_ == NULL) {
esr_status8_5e7_ = new ::apollo::drivers::Esr_status8_5e7;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_status8_5e7)
return esr_status8_5e7_;
}
::apollo::drivers::Esr_status8_5e7* DelphiESR::release_esr_status8_5e7() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_status8_5e7)
clear_has_esr_status8_5e7();
::apollo::drivers::Esr_status8_5e7* temp = esr_status8_5e7_;
esr_status8_5e7_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_status8_5e7(::apollo::drivers::Esr_status8_5e7* esr_status8_5e7) {
delete esr_status8_5e7_;
esr_status8_5e7_ = esr_status8_5e7;
if (esr_status8_5e7) {
set_has_esr_status8_5e7();
} else {
clear_has_esr_status8_5e7();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_status8_5e7)
}
// optional .apollo.drivers.Esr_status7_5e6 esr_status7_5e6 = 19;
bool DelphiESR::has_esr_status7_5e6() const {
return (_has_bits_[0] & 0x00040000u) != 0;
}
void DelphiESR::set_has_esr_status7_5e6() {
_has_bits_[0] |= 0x00040000u;
}
void DelphiESR::clear_has_esr_status7_5e6() {
_has_bits_[0] &= ~0x00040000u;
}
void DelphiESR::clear_esr_status7_5e6() {
if (esr_status7_5e6_ != NULL) esr_status7_5e6_->::apollo::drivers::Esr_status7_5e6::Clear();
clear_has_esr_status7_5e6();
}
const ::apollo::drivers::Esr_status7_5e6& DelphiESR::esr_status7_5e6() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.esr_status7_5e6)
return esr_status7_5e6_ != NULL ? *esr_status7_5e6_ : *default_instance_->esr_status7_5e6_;
}
::apollo::drivers::Esr_status7_5e6* DelphiESR::mutable_esr_status7_5e6() {
set_has_esr_status7_5e6();
if (esr_status7_5e6_ == NULL) {
esr_status7_5e6_ = new ::apollo::drivers::Esr_status7_5e6;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.esr_status7_5e6)
return esr_status7_5e6_;
}
::apollo::drivers::Esr_status7_5e6* DelphiESR::release_esr_status7_5e6() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.esr_status7_5e6)
clear_has_esr_status7_5e6();
::apollo::drivers::Esr_status7_5e6* temp = esr_status7_5e6_;
esr_status7_5e6_ = NULL;
return temp;
}
void DelphiESR::set_allocated_esr_status7_5e6(::apollo::drivers::Esr_status7_5e6* esr_status7_5e6) {
delete esr_status7_5e6_;
esr_status7_5e6_ = esr_status7_5e6;
if (esr_status7_5e6) {
set_has_esr_status7_5e6();
} else {
clear_has_esr_status7_5e6();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.esr_status7_5e6)
}
// optional .apollo.drivers.Vehicle3_5f2 vehicle3_5f2 = 20;
bool DelphiESR::has_vehicle3_5f2() const {
return (_has_bits_[0] & 0x00080000u) != 0;
}
void DelphiESR::set_has_vehicle3_5f2() {
_has_bits_[0] |= 0x00080000u;
}
void DelphiESR::clear_has_vehicle3_5f2() {
_has_bits_[0] &= ~0x00080000u;
}
void DelphiESR::clear_vehicle3_5f2() {
if (vehicle3_5f2_ != NULL) vehicle3_5f2_->::apollo::drivers::Vehicle3_5f2::Clear();
clear_has_vehicle3_5f2();
}
const ::apollo::drivers::Vehicle3_5f2& DelphiESR::vehicle3_5f2() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.vehicle3_5f2)
return vehicle3_5f2_ != NULL ? *vehicle3_5f2_ : *default_instance_->vehicle3_5f2_;
}
::apollo::drivers::Vehicle3_5f2* DelphiESR::mutable_vehicle3_5f2() {
set_has_vehicle3_5f2();
if (vehicle3_5f2_ == NULL) {
vehicle3_5f2_ = new ::apollo::drivers::Vehicle3_5f2;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.vehicle3_5f2)
return vehicle3_5f2_;
}
::apollo::drivers::Vehicle3_5f2* DelphiESR::release_vehicle3_5f2() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.vehicle3_5f2)
clear_has_vehicle3_5f2();
::apollo::drivers::Vehicle3_5f2* temp = vehicle3_5f2_;
vehicle3_5f2_ = NULL;
return temp;
}
void DelphiESR::set_allocated_vehicle3_5f2(::apollo::drivers::Vehicle3_5f2* vehicle3_5f2) {
delete vehicle3_5f2_;
vehicle3_5f2_ = vehicle3_5f2;
if (vehicle3_5f2) {
set_has_vehicle3_5f2();
} else {
clear_has_vehicle3_5f2();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.vehicle3_5f2)
}
// optional .apollo.drivers.Vehicle4_5f3 vehicle4_5f3 = 21;
bool DelphiESR::has_vehicle4_5f3() const {
return (_has_bits_[0] & 0x00100000u) != 0;
}
void DelphiESR::set_has_vehicle4_5f3() {
_has_bits_[0] |= 0x00100000u;
}
void DelphiESR::clear_has_vehicle4_5f3() {
_has_bits_[0] &= ~0x00100000u;
}
void DelphiESR::clear_vehicle4_5f3() {
if (vehicle4_5f3_ != NULL) vehicle4_5f3_->::apollo::drivers::Vehicle4_5f3::Clear();
clear_has_vehicle4_5f3();
}
const ::apollo::drivers::Vehicle4_5f3& DelphiESR::vehicle4_5f3() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.vehicle4_5f3)
return vehicle4_5f3_ != NULL ? *vehicle4_5f3_ : *default_instance_->vehicle4_5f3_;
}
::apollo::drivers::Vehicle4_5f3* DelphiESR::mutable_vehicle4_5f3() {
set_has_vehicle4_5f3();
if (vehicle4_5f3_ == NULL) {
vehicle4_5f3_ = new ::apollo::drivers::Vehicle4_5f3;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.vehicle4_5f3)
return vehicle4_5f3_;
}
::apollo::drivers::Vehicle4_5f3* DelphiESR::release_vehicle4_5f3() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.vehicle4_5f3)
clear_has_vehicle4_5f3();
::apollo::drivers::Vehicle4_5f3* temp = vehicle4_5f3_;
vehicle4_5f3_ = NULL;
return temp;
}
void DelphiESR::set_allocated_vehicle4_5f3(::apollo::drivers::Vehicle4_5f3* vehicle4_5f3) {
delete vehicle4_5f3_;
vehicle4_5f3_ = vehicle4_5f3;
if (vehicle4_5f3) {
set_has_vehicle4_5f3();
} else {
clear_has_vehicle4_5f3();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.vehicle4_5f3)
}
// optional .apollo.drivers.Vehicle5_5f4 vehicle5_5f4 = 22;
bool DelphiESR::has_vehicle5_5f4() const {
return (_has_bits_[0] & 0x00200000u) != 0;
}
void DelphiESR::set_has_vehicle5_5f4() {
_has_bits_[0] |= 0x00200000u;
}
void DelphiESR::clear_has_vehicle5_5f4() {
_has_bits_[0] &= ~0x00200000u;
}
void DelphiESR::clear_vehicle5_5f4() {
if (vehicle5_5f4_ != NULL) vehicle5_5f4_->::apollo::drivers::Vehicle5_5f4::Clear();
clear_has_vehicle5_5f4();
}
const ::apollo::drivers::Vehicle5_5f4& DelphiESR::vehicle5_5f4() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.vehicle5_5f4)
return vehicle5_5f4_ != NULL ? *vehicle5_5f4_ : *default_instance_->vehicle5_5f4_;
}
::apollo::drivers::Vehicle5_5f4* DelphiESR::mutable_vehicle5_5f4() {
set_has_vehicle5_5f4();
if (vehicle5_5f4_ == NULL) {
vehicle5_5f4_ = new ::apollo::drivers::Vehicle5_5f4;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.vehicle5_5f4)
return vehicle5_5f4_;
}
::apollo::drivers::Vehicle5_5f4* DelphiESR::release_vehicle5_5f4() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.vehicle5_5f4)
clear_has_vehicle5_5f4();
::apollo::drivers::Vehicle5_5f4* temp = vehicle5_5f4_;
vehicle5_5f4_ = NULL;
return temp;
}
void DelphiESR::set_allocated_vehicle5_5f4(::apollo::drivers::Vehicle5_5f4* vehicle5_5f4) {
delete vehicle5_5f4_;
vehicle5_5f4_ = vehicle5_5f4;
if (vehicle5_5f4) {
set_has_vehicle5_5f4();
} else {
clear_has_vehicle5_5f4();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.vehicle5_5f4)
}
// optional .apollo.drivers.Vehicle6_5f5 vehicle6_5f5 = 23;
bool DelphiESR::has_vehicle6_5f5() const {
return (_has_bits_[0] & 0x00400000u) != 0;
}
void DelphiESR::set_has_vehicle6_5f5() {
_has_bits_[0] |= 0x00400000u;
}
void DelphiESR::clear_has_vehicle6_5f5() {
_has_bits_[0] &= ~0x00400000u;
}
void DelphiESR::clear_vehicle6_5f5() {
if (vehicle6_5f5_ != NULL) vehicle6_5f5_->::apollo::drivers::Vehicle6_5f5::Clear();
clear_has_vehicle6_5f5();
}
const ::apollo::drivers::Vehicle6_5f5& DelphiESR::vehicle6_5f5() const {
// @@protoc_insertion_point(field_get:apollo.drivers.DelphiESR.vehicle6_5f5)
return vehicle6_5f5_ != NULL ? *vehicle6_5f5_ : *default_instance_->vehicle6_5f5_;
}
::apollo::drivers::Vehicle6_5f5* DelphiESR::mutable_vehicle6_5f5() {
set_has_vehicle6_5f5();
if (vehicle6_5f5_ == NULL) {
vehicle6_5f5_ = new ::apollo::drivers::Vehicle6_5f5;
}
// @@protoc_insertion_point(field_mutable:apollo.drivers.DelphiESR.vehicle6_5f5)
return vehicle6_5f5_;
}
::apollo::drivers::Vehicle6_5f5* DelphiESR::release_vehicle6_5f5() {
// @@protoc_insertion_point(field_release:apollo.drivers.DelphiESR.vehicle6_5f5)
clear_has_vehicle6_5f5();
::apollo::drivers::Vehicle6_5f5* temp = vehicle6_5f5_;
vehicle6_5f5_ = NULL;
return temp;
}
void DelphiESR::set_allocated_vehicle6_5f5(::apollo::drivers::Vehicle6_5f5* vehicle6_5f5) {
delete vehicle6_5f5_;
vehicle6_5f5_ = vehicle6_5f5;
if (vehicle6_5f5) {
set_has_vehicle6_5f5();
} else {
clear_has_vehicle6_5f5();
}
// @@protoc_insertion_point(field_set_allocated:apollo.drivers.DelphiESR.vehicle6_5f5)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// @@protoc_insertion_point(namespace_scope)
} // namespace drivers
} // namespace apollo
// @@protoc_insertion_point(global_scope)
|
4baae7d9b63f2e2c5d5f6320c5e9d8e993f91a81
|
ce6229f5915f9e6de1238861b4a940d61e56960b
|
/Sonder/Temp/il2cppOutput/il2cppOutput/mscorlib_System_Runtime_Remoting_Channels_ChannelS2007814595.h
|
b01164d2ace034ac4869fcdc8ffb323e4ecb78b1
|
[
"Apache-2.0"
] |
permissive
|
HackingForGood/GoogleyEyes
|
d9e36e3dffb4edbd0736ab49a764736a91ecebcf
|
a92b962ab220686794350560a47e88191e165c05
|
refs/heads/master
| 2021-04-15T10:03:59.093464
| 2017-06-25T17:32:52
| 2017-06-25T17:32:52
| 94,575,021
| 7
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,306
|
h
|
mscorlib_System_Runtime_Remoting_Channels_ChannelS2007814595.h
|
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include "mscorlib_System_Object2689449295.h"
// System.Collections.ArrayList
struct ArrayList_t4252133567;
// System.Runtime.Remoting.Contexts.CrossContextChannel
struct CrossContextChannel_t2302426108;
// System.String
struct String_t;
// System.Collections.IList
struct IList_t3321498491;
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Channels.ChannelServices
struct ChannelServices_t2007814595 : public Il2CppObject
{
public:
public:
};
struct ChannelServices_t2007814595_StaticFields
{
public:
// System.Collections.ArrayList System.Runtime.Remoting.Channels.ChannelServices::registeredChannels
ArrayList_t4252133567 * ___registeredChannels_0;
// System.Collections.ArrayList System.Runtime.Remoting.Channels.ChannelServices::delayedClientChannels
ArrayList_t4252133567 * ___delayedClientChannels_1;
// System.Runtime.Remoting.Contexts.CrossContextChannel System.Runtime.Remoting.Channels.ChannelServices::_crossContextSink
CrossContextChannel_t2302426108 * ____crossContextSink_2;
// System.String System.Runtime.Remoting.Channels.ChannelServices::CrossContextUrl
String_t* ___CrossContextUrl_3;
// System.Collections.IList System.Runtime.Remoting.Channels.ChannelServices::oldStartModeTypes
Il2CppObject * ___oldStartModeTypes_4;
public:
inline static int32_t get_offset_of_registeredChannels_0() { return static_cast<int32_t>(offsetof(ChannelServices_t2007814595_StaticFields, ___registeredChannels_0)); }
inline ArrayList_t4252133567 * get_registeredChannels_0() const { return ___registeredChannels_0; }
inline ArrayList_t4252133567 ** get_address_of_registeredChannels_0() { return &___registeredChannels_0; }
inline void set_registeredChannels_0(ArrayList_t4252133567 * value)
{
___registeredChannels_0 = value;
Il2CppCodeGenWriteBarrier(&___registeredChannels_0, value);
}
inline static int32_t get_offset_of_delayedClientChannels_1() { return static_cast<int32_t>(offsetof(ChannelServices_t2007814595_StaticFields, ___delayedClientChannels_1)); }
inline ArrayList_t4252133567 * get_delayedClientChannels_1() const { return ___delayedClientChannels_1; }
inline ArrayList_t4252133567 ** get_address_of_delayedClientChannels_1() { return &___delayedClientChannels_1; }
inline void set_delayedClientChannels_1(ArrayList_t4252133567 * value)
{
___delayedClientChannels_1 = value;
Il2CppCodeGenWriteBarrier(&___delayedClientChannels_1, value);
}
inline static int32_t get_offset_of__crossContextSink_2() { return static_cast<int32_t>(offsetof(ChannelServices_t2007814595_StaticFields, ____crossContextSink_2)); }
inline CrossContextChannel_t2302426108 * get__crossContextSink_2() const { return ____crossContextSink_2; }
inline CrossContextChannel_t2302426108 ** get_address_of__crossContextSink_2() { return &____crossContextSink_2; }
inline void set__crossContextSink_2(CrossContextChannel_t2302426108 * value)
{
____crossContextSink_2 = value;
Il2CppCodeGenWriteBarrier(&____crossContextSink_2, value);
}
inline static int32_t get_offset_of_CrossContextUrl_3() { return static_cast<int32_t>(offsetof(ChannelServices_t2007814595_StaticFields, ___CrossContextUrl_3)); }
inline String_t* get_CrossContextUrl_3() const { return ___CrossContextUrl_3; }
inline String_t** get_address_of_CrossContextUrl_3() { return &___CrossContextUrl_3; }
inline void set_CrossContextUrl_3(String_t* value)
{
___CrossContextUrl_3 = value;
Il2CppCodeGenWriteBarrier(&___CrossContextUrl_3, value);
}
inline static int32_t get_offset_of_oldStartModeTypes_4() { return static_cast<int32_t>(offsetof(ChannelServices_t2007814595_StaticFields, ___oldStartModeTypes_4)); }
inline Il2CppObject * get_oldStartModeTypes_4() const { return ___oldStartModeTypes_4; }
inline Il2CppObject ** get_address_of_oldStartModeTypes_4() { return &___oldStartModeTypes_4; }
inline void set_oldStartModeTypes_4(Il2CppObject * value)
{
___oldStartModeTypes_4 = value;
Il2CppCodeGenWriteBarrier(&___oldStartModeTypes_4, value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
|
5daa54a258a396ab7c11d28563f4605e737eac4d
|
15d85f364067b7f1820bf69b3f17eaf6a3e4b1ce
|
/year_1/lab2/1G/code.cpp
|
d020e74483797d895cf8ee3e96d156da283cc673
|
[] |
no_license
|
iilnar/algo
|
e8d79022b1c03064c4f4a1837a6f2c9278a520eb
|
6814bff22c3bb3ada1751c51f4b1a084789970f4
|
refs/heads/master
| 2021-01-20T21:07:00.963386
| 2016-05-28T20:56:09
| 2016-05-28T20:56:09
| 59,911,736
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 747
|
cpp
|
code.cpp
|
#include <bits/stdc++.h>
using namespace std;
int a[11], n, k;
void dfs (int v, int last) {
if (v == n + 1) {
if (last != 0) {
return;
}
for (int i = 0; i < k; i++) {
for (int j = 1; j <= n; j++) {
if (a[j] == i) {
cout << j << " ";
}
}
cout << "\n";
}
cout << "\n";
return;
}
for (int i = 0; i < k - last; i++) {
a[v] = i;
dfs(v + 1, last);
}
a[v] = k - last;
dfs(v + 1, last - 1);
}
int main () {
freopen("part2sets.in", "r", stdin);freopen("part2sets.out", "w", stdout);
cin >> n >> k;
dfs(1, k);
}
|
37fe139aebd8904c4ae728ac02da0eb6ee078785
|
969ed26bb44f94ca4226aa66af0cd5cb0c2c3537
|
/dataobjects/sections/TextureSection.h
|
5b22dbb770f5e5790077dc0d12d4706c24ec867a
|
[
"BSD-2-Clause"
] |
permissive
|
kidaa/SeventhUmbral
|
2e87295278d8b0067d118799ac0e32bded07a476
|
5c7651ac2cd9d9f5c1f7969932c15ccdf6d8848c
|
refs/heads/master
| 2020-04-30T11:07:27.364028
| 2015-05-16T00:56:11
| 2015-05-16T00:56:11
| 35,638,361
| 0
| 0
| null | 2015-05-14T21:38:28
| 2015-05-14T21:38:28
| null |
UTF-8
|
C++
| false
| false
| 236
|
h
|
TextureSection.h
|
#pragma once
#include "BaseSection.h"
class CTextureSection : public CBaseSection
{
public:
CTextureSection();
virtual ~CTextureSection();
virtual void Read(Framework::CStream&) override;
private:
uint32 m_header[4];
};
|
70d32b1a1c404e6e00e49f5d56e647f1ebcf63f5
|
248f02c9f6eda0bfbb183c293626b8b0f6cea440
|
/FirstPart/RotateVetor.cpp
|
2936a8f52b537fcf97c0c3c2646d3cb7911936a7
|
[] |
no_license
|
loohcs/FirstPart
|
9ed6fa940f9d2b5c8ee6257c00b2c6cff4dad650
|
15c6b9f2aa94a5e206ffc533fb0d1e6e06667345
|
refs/heads/master
| 2020-12-13T04:32:21.274460
| 2017-06-26T06:16:47
| 2017-06-26T06:16:47
| 95,414,725
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,013
|
cpp
|
RotateVetor.cpp
|
//
// RotateVetor.cpp
// FirstPart
//
// Created by ZhangXiaoMBS on 2017/6/23.
// Copyright © 2017年 ZhangXiaoMBS. All rights reserved.
//
#include "RotateVetor.hpp"
int gcd(int a, int b);
void printA(int a[], int size);
/******************************************************************************
*函数名称:rotateVetor(int rotdist, int size)
*函数功能:旋转向量
*入口参数:rotdist:偏移量, size:向量大小
*返 回 值:无
*******************************************************************************/
void rotateVetor(int rotdist, int size) {
int a[size];
for (int i = 0; i < size; i++) {
a[i] = i + 1;
}
/// 开始旋转
int i, j, t, k = 0;
for (i = 0; i < gcd(rotdist, size); i ++) {
t = a[i];
j = i;
do {
k = j + rotdist;
if (k >= size) {
k -= size;
}
if (k == i) {
break;
}
a[j] = a[k];
j = k;
printA(a, size);
} while (k != i);
a[j] = t;
printf("************************\n");
printA(a, size);
printf("************************\n");
}
}
/******************************************************************************
*函数名称:gcd(int a, int b)
*函数功能:求取两个数的最大公约数
*入口参数:
*返 回 值:int 最大公约数
*算法思路:辗转相除法,两者一直相除,如果为0,则除数即为最大公约数,不为0,则取余,继续相除
*******************************************************************************/
int gcd(int a, int b) {
int temp = b;
if (0 == b) {
return a;
}
while (a % b != 0) {
temp = a % b;
a = b;
b = temp;
}
return temp;
}
/******************************************************************************
*函数名称:gcd2(int a, int b)
*函数功能:求取两个数的最大公约数
*入口参数:
*返 回 值:int 最大公约数
*算法思路:辗转相减法,两者一直相减(max -= min),直到两者相等
*******************************************************************************/
int gcd2(int a, int b) {
int max = a > b ? a : b;
int min = a - b ? a : b;
while (max != min) {
max -= min;
}
return min;
}
void printA(int a[], int size) {
for (int i = 0; i < size; i ++) {
printf("%d ", a[i]);
}
printf("\n");
}
/******************************************************************************
*函数名称:gcd3(int a, int b)
*函数功能:求取两个数的最大公约数
*入口参数:
*返 回 值:int 最大公约数
*算法思路:扩展欧几里得算法,实质是使用的辗转相除法
基本算法:对于不完全为 0 的非负整数 a,b,gcd(a,b)表示 a,b 的最大公约数,必然存在整数对 x,y ,使得 gcd(a,b)=ax+by。
证明:设 a>b。
1,显然当 b=0,gcd(a,b)=a。此时 x=1,y=0;
2,ab!=0 时
设 ax1+by1=gcd(a,b);
bx2+(a mod b)y2=gcd(b,a mod b);
根据朴素的欧几里德原理有 gcd(a,b)=gcd(b,a mod b);
则:ax1+by1=bx2+(a mod b)y2;
即:ax1+by1=bx2+(a-(a/b)*b)y2=ay2+bx2-(a/b)*by2;
根据恒等定理得:x1=y2; y1=x2-(a/b)*y2;
这样我们就得到了求解 x1,y1 的方法:x1,y1 的值基于 x2,y2.
上面的思想是以递归定义的,因为 gcd 不断的递归求解一定会有个时候 b=0,所以递归可以结束。
*******************************************************************************/
int gcd3(int a, int b, int x, int y) {
if(b == 0) {
x = 1;
y = 0;
return a;
}
int r = gcd3(b, a%b, x, y);
int t = x;
x = y;
y = t - a/b * y;
return r;
}
|
36b3ca82564be643329f49e2d74e9441d728ae99
|
e8a3c0b3722cacdb99e15693bff0a4333b7ccf16
|
/LeetCode/3. Longest Substring Without Repeating Characters.cpp
|
dc493ed8e911b19ce771522155a6dbd0a12132eb
|
[] |
no_license
|
piyush1146115/Competitive-Programming
|
690f57acd374892791b16a08e14a686a225f73fa
|
66c975e0433f30539d826a4c2aa92970570b87bf
|
refs/heads/master
| 2023-08-18T03:04:24.680817
| 2023-08-12T19:15:51
| 2023-08-12T19:15:51
| 211,923,913
| 5
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,017
|
cpp
|
3. Longest Substring Without Repeating Characters.cpp
|
class Solution {
public:
int lengthOfLongestSubstring(string s) {
if(s.size() == 0)
return 0;
map<char, int> mp;
int ans = 0, p1 = 0;
for(int i = 0; i < s.size(); i++){
if(mp.find(s[i]) != mp.end()){
p1 = max(p1, mp[s[i]] + 1);
}
ans = max((i - p1 + 1), ans);
mp[s[i]] = i;
}
return ans;
}
};
class Solution {
public:
int lengthOfLongestSubstring(string s) {
if(s.size() == 0)
return 0;
int mp[128];
memset(mp, -1, sizeof(mp));
int ans = 0, p1 = 0;
for(int i = 0; i < s.size(); i++){
if(mp[s[i]] != -1){
p1 = max(p1, mp[s[i]] + 1);
}
ans = max((i - p1 + 1), ans);
mp[s[i]] = i;
}
return ans;
}
};
|
ab38707afc8b9a9b3d987dd7e26bde631f786d8c
|
27119115d1d76202699784462cfcc81f697c61b9
|
/unittests/NamedTest.cpp
|
d9f45b34478b2fc204e84c27bca6d56f06b28e81
|
[
"Apache-2.0"
] |
permissive
|
penguin-wwy/DragonLoader
|
3b52b9f2fadc4b569827ebc64316804ea838d2d6
|
29cc813a3aad515996449ec742a43766e7bc3b0e
|
refs/heads/master
| 2020-12-15T15:46:14.662278
| 2020-02-06T13:35:00
| 2020-02-06T13:35:00
| 235,162,239
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 346
|
cpp
|
NamedTest.cpp
|
//
// Created by penguin on 1/27/20.
//
#include "llvm/Demangle/Demangle.h"
#include "gtest/gtest.h"
TEST(LLVM_Mangle, Test1) {
std::string name = llvm::demangle("_Z3addii");
EXPECT_TRUE(name == "add(int, int)") << "Mangle name error: " << name;
name = llvm::demangle("sub");
EXPECT_TRUE(name == "sub") << "Mangle name error: " << name;
}
|
4b961e96ff1a522f3681c8d1aa607b546e948e24
|
f62cc9117828ad14520d379c956c3e9d14148542
|
/umihook/umihookdll/umihookdll.cpp
|
2640403145bf012820464dd77efc1342ed2f6074
|
[] |
no_license
|
07th-mod/umineko-question
|
6948e30d4dd6180bb87dc1751f3e3ba37a1559c7
|
6be42f875897629813c6f4537c578f7d0c7e3256
|
refs/heads/master
| 2023-08-16T19:19:29.936575
| 2023-01-28T02:43:59
| 2023-01-28T02:43:59
| 62,870,075
| 117
| 24
| null | 2023-01-26T10:47:10
| 2016-07-08T07:59:32
|
C#
|
UTF-8
|
C++
| false
| false
| 6,136
|
cpp
|
umihookdll.cpp
|
// umihookdll.cpp : Defines the exported functions for the DLL application.
/* Note on MPV
Was previously using pipes to communicate with an external MPV provcess
but now directly use libmpv as it is easier. I had a problem before where
if the pipe was not read from, MPV's side of the pipe would become full
and stop working.
However, using libmpv directly states that it will silently discard events
>The internal event queue has a limited size (per client handle). If you
>don't empty the event queue quickly enough with mpv_wait_event(), it will
>overflow and silently discard further events. If this happens, making
>asynchronous requests will fail as well (with MPV_ERROR_EVENT_QUEUE_FULL).
>> from https://github.com/mpv-player/mpv/blob/master/libmpv/client.h
Therefore a discard thread is not necessary.
*/
#define RUN_MPV_CODE 1
#define RUN_DISCARD_THREAD 0
//#include "stdafx.h"
#include "../shared/easyhook.h"
#include <Windows.h>
#include "stdio.h"
#include <malloc.h> //needed for single "malloca" call
#include "../shared/shared_functions.h"
#include "mpv/client.h"
typedef FILE * (*FOPEN_FN_TYPE)(const char *, const char *);
typedef int (*FCLOSE_FN_TYPE)(FILE *);
typedef int (*FPUTS_FN_TYPE)(const char *, FILE *);
typedef int(*FFLUSH_FN_TYPE)(FILE *);
typedef int(*ATEXIT_FN_TYPE)(void(*func)(void));
FOPEN_FN_TYPE original_fopen;
FPUTS_FN_TYPE original_fputs;
FCLOSE_FN_TYPE original_fclose;
FFLUSH_FN_TYPE original_fflush;
ATEXIT_FN_TYPE original_atexit;
FILE * fDebug;
mpv_handle * ctx;
#define DPRINTF(x) fprintf(fDebug, x)
#if RUN_MPV_CODE
static inline void check_error(int status)
{
if (status < 0) {
original_fputs("mpv API error: ", fDebug);
original_fputs(mpv_error_string(status), fDebug);
}
}
#endif
void on_game_exit()
{
#if RUN_MPV_CODE
mpv_terminate_destroy(ctx);
#endif
original_fclose(fDebug);
FreeConsole();
}
// file_path: .\voice\10\10100041.ogg
// atrac3p_path: .\voice\10\10100041.at3
// if not an .ogg file, file path and ext may be invalid (but that's OK)
// String manipulation in C is :-( could just use C++ strings for this bit
void intercept_file_access(const char * filename)
{
unsigned int filename_length = strlen(filename);
//exit if you get some bogus filename which is huge
if (filename_length > 1000)
return;
//just assume the file extension is the last 3 characters, even if it's not
const char * file_ext = str_end(filename, 3);
//if not an ogg file, exit
if (strncmp(file_ext, "ogg", 3) != 0)
return;
//allocate space to store the new filename/path (plus null terminator)
char * atrac3p_path = (char *) _alloca(filename_length + 1);
strncpy(atrac3p_path, filename, filename_length+1);
//overwrite the file extension, eg ".\voice\10\10100041.at3"
strncpy(&atrac3p_path[filename_length - 3], "at3", 3);
//check if the .at3 file exists before trying to play it. Required as otherwise
//mpv will stop the current track and "play" the non-existent file instead
FILE * fptr = original_fopen(atrac3p_path, "r");
if (fptr == NULL)
return;
else
original_fclose(fptr);
#if RUN_MPV_CODE
//call mpv to play voice here
const char *cmd[] = { "loadfile", atrac3p_path, NULL };
check_error(mpv_command(ctx, cmd));
#endif
#ifdef ENABLE_LOGGING
original_fputs(cmd[0], fDebug);
original_fputs(cmd[1], fDebug);
original_fputs("\n", fDebug);
original_fflush(fDebug);
#endif
}
// This function is called whenever the game calls 'fopen'
FILE * myFopen(const char * filename, const char * mode)
{
intercept_file_access(filename);
FILE * fp = original_fopen(filename, mode);
return fp;
}
// EasyHook will be looking for this export to support DLL injection
extern "C" void __declspec(dllexport) __stdcall NativeInjectionEntryPoint(REMOTE_ENTRY_INFO* inRemoteInfo);
void __stdcall NativeInjectionEntryPoint(REMOTE_ENTRY_INFO* inRemoteInfo)
{
//game uses "msvcrt" while we use a different runtime (or something like that)
HMODULE msvcrt_handle = GetModuleHandle(TEXT("msvcrt"));
// must use the game's version of these functions, using our own versions seems
// to conflict and cause the game to crash/functions to not work correctly
original_fopen = (FOPEN_FN_TYPE)GetProcAddress(msvcrt_handle, "fopen");
original_fputs = (FPUTS_FN_TYPE)GetProcAddress(msvcrt_handle, "fputs");
original_fclose = (FCLOSE_FN_TYPE)GetProcAddress(msvcrt_handle, "fclose");
original_fflush = (FFLUSH_FN_TYPE)GetProcAddress(msvcrt_handle, "fflush");
original_atexit = (ATEXIT_FN_TYPE)GetProcAddress(msvcrt_handle, "atexit");
//create a console for debugging. Close handle when game exits.
AllocConsole();
fDebug = original_fopen("CONOUT$", "w");
// Perform hooking
HOOK_TRACE_INFO hHook = { NULL }; // keep track of our hook
// Install hook - game uses "msvcrt" not "ucrtbased"
// This part had to be changed from the default EasyHook example
NTSTATUS result = LhInstallHook(
GetProcAddress(msvcrt_handle, "fopen"),
myFopen,
NULL,
&hHook);
#if RUN_MPV_CODE
//create an mpv instance
ctx = mpv_create();
if (ctx)
{
// Done setting up options.
check_error(mpv_initialize(ctx));
original_fputs("Sucess creating mpv instance!\n", fDebug);
}
else
{
original_fputs("failed to create mpv instance!\n", fDebug);
}
//desired volume was passed in remotely
DWORD volume = 100;
if (inRemoteInfo->UserDataSize == sizeof(DWORD))
{
volume = ((DWORD *)inRemoteInfo->UserData)[0];
}
char vol_str[10];
snprintf(vol_str, 10, "%d", volume);
const char *cmd[] = { "set", "volume", vol_str, NULL };
check_error(mpv_command(ctx, cmd));
original_fputs("Setting volume to: ", fDebug);
original_fputs(vol_str, fDebug);
original_fputs("\n", fDebug);
#endif
//register our cleanup function to be called when game exits
original_atexit(on_game_exit);
// If the threadId in the ACL is set to 0,
// then internally EasyHook uses GetCurrentThreadId()
ULONG ACLEntries[1] = { 0 };
// Disable the hook for the provided threadIds, enable for all others
LhSetExclusiveACL(ACLEntries, 1, &hHook);
original_fputs("Hooking Finished\n", fDebug);
original_fflush(fDebug);
return;
}
|
87bc16d27ca792791db9fe30268dcbe88c8ae2b2
|
cedc3a9cd87c19d41bef0e07e103ee878e6c0f2d
|
/src/inner_product.h
|
b0d46ab5b0c64edc0973e4e08b1f16c3296fa5f3
|
[
"MIT"
] |
permissive
|
jewettaij/ndautocrr
|
593e5c7a276e0d45b4f808a14d0d1a7aded776fc
|
c19f5efb3bd7d75b2d49b6d8c89924e0f670abae
|
refs/heads/master
| 2021-06-25T02:12:22.037511
| 2021-03-28T04:13:54
| 2021-03-28T04:13:54
| 209,857,697
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 572
|
h
|
inner_product.h
|
#ifndef CUSTOM_INNER_PRODUCT_H
#define CUSTOM_INNER_PRODUCT_H
#include <vector>
#include <cmath>
using namespace std;
// This function is used to multiply entries together (eg. x(i) and x(i+j))
// whcn computing the correlation function
// C(j) = ⟨(**x**(i)-⟨**x**⟩)⋅(**x**(i+j)-⟨**x**⟩)⟩
inline double
inner_product(const vector<double> &vXa_d,
const vector<double> &vXb_d)
{
long D = vXa_d.size();
double total = 0.0;
for (long d=0; d < D; ++d)
total += vXa_d[d] * vXb_d[d];
return total;
}
#endif //#ifndef CUSTOM_INNER_PRODUCT_H
|
f1bfe58289ed7e7af4eb950b9bbd413929b7bbab
|
6b15219ec3382030f7cbc98a29eea209dd3b5957
|
/uno/linear_algebra/SymmetricMatrix.hpp
|
19d4912c9b649871dbf5a691140491b02f5cfae3
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
cvanaret/Uno
|
3fce70c16aa067bf66b9726e22913980d124936a
|
5b1d9527dc1922c54be1d12c1729f945a0fddbca
|
refs/heads/main
| 2023-08-31T11:26:07.717455
| 2023-08-26T21:04:36
| 2023-08-26T21:04:36
| 411,774,531
| 73
| 7
|
MIT
| 2023-03-07T10:45:36
| 2021-09-29T17:46:08
|
C++
|
UTF-8
|
C++
| false
| false
| 2,836
|
hpp
|
SymmetricMatrix.hpp
|
// Copyright (c) 2018-2023 Charlie Vanaret
// Licensed under the MIT license. See LICENSE file in the project directory for details.
#ifndef UNO_SYMMETRICMATRIX_H
#define UNO_SYMMETRICMATRIX_H
#include <vector>
#include <functional>
#include <cassert>
#include "Vector.hpp"
#include "SparseVector.hpp"
template <typename T>
class SymmetricMatrix {
public:
size_t dimension;
size_t number_nonzeros{0};
size_t capacity;
SymmetricMatrix(size_t max_dimension, size_t original_capacity, bool use_regularization);
virtual ~SymmetricMatrix() = default;
virtual void reset();
T quadratic_product(const std::vector<T>& x, const std::vector<T>& y) const;
virtual void for_each(const std::function<void (size_t, size_t, T)>& f) const = 0;
// build the matrix incrementally
virtual void insert(T term, size_t row_index, size_t column_index) = 0;
// this method will be used by the CSCSymmetricMatrix subclass
virtual void finalize_column(size_t column_index) = 0;
[[nodiscard]] virtual T smallest_diagonal_entry() const = 0;
virtual void set_regularization(const std::function<T(size_t index)>& regularization_function) = 0;
[[nodiscard]] const T* data_raw_pointer() const;
virtual void print(std::ostream& stream) const = 0;
template <typename U>
friend std::ostream& operator<<(std::ostream& stream, const SymmetricMatrix<U>& matrix);
protected:
std::vector<T> entries{};
// regularization
const bool use_regularization;
};
// implementation
template <typename T>
SymmetricMatrix<T>::SymmetricMatrix(size_t max_dimension, size_t original_capacity, bool use_regularization) :
dimension(max_dimension),
// if regularization is used, allocate the necessary space
capacity(original_capacity + (use_regularization ? max_dimension : 0)),
use_regularization(use_regularization) {
this->entries.reserve(this->capacity);
}
template <typename T>
void SymmetricMatrix<T>::reset() {
this->number_nonzeros = 0;
this->entries.clear();
}
template <typename T>
T SymmetricMatrix<T>::quadratic_product(const std::vector<T>& x, const std::vector<T>& y) const {
assert(x.size() == y.size() && "SymmetricMatrix::quadratic_product: the two vectors x and y do not have the same size");
T result = T(0);
this->for_each([&](size_t i, size_t j, T entry) {
result += (i == j ? T(1) : T(2)) * entry * x[i] * y[j];
});
return result;
}
template <typename T>
const T* SymmetricMatrix<T>::data_raw_pointer() const {
return this->entries.data();
}
template <typename T>
std::ostream& operator<<(std::ostream& stream, const SymmetricMatrix<T>& matrix) {
stream << "Dimension: " << matrix.dimension << ", number of nonzeros: " << matrix.number_nonzeros << '\n';
matrix.print(stream);
return stream;
}
#endif // UNO_SYMMETRICMATRIX_H
|
f27938318ebb45f84331a7b37b77700e481eb973
|
94293b2a221e9d163e886f387a52f341ebf85a78
|
/speedcc/stage/SCFSMMacros.h
|
aba6d3727d02527c384c802900515d5fd824b53d
|
[
"MIT"
] |
permissive
|
kevinwu1024/SpeedCC
|
241b149c31f7b781bebd5bf3837369029a56d3ea
|
7b32e3444236d8aebf8198ebc3fede8faf201dee
|
refs/heads/master
| 2021-02-06T10:09:51.839219
| 2020-02-29T09:38:23
| 2020-02-29T09:38:23
| 105,417,184
| 4
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,456
|
h
|
SCFSMMacros.h
|
/****************************************************************************
Copyright (c) 2017-2020 Kevin Wu (Wu Feng)
github: http://github.com/kevinwu1024
Licensed under the MIT License (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://opensource.org/licenses/MIT
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __SPEEDCC__SCFLOWMACROS_H__
#define __SPEEDCC__SCFLOWMACROS_H__
#include "SCFSMRunner.h"
#define SC_BEGIN_FSM(_runner_,_state_comp_) \
do{\
_state_comp_* pSCMacroFSMProperty = nullptr;\
auto ptrSCMacroFSMBuilder = SpeedCC::SCFSMBuilder::create(); \
auto ptrSCRunner = ptrSCMacroFSMBuilder->begin<_state_comp_>((SCID::State::kStateInvalid)); \
(*_runner_) = ptrSCRunner; \
pSCMacroFSMProperty = nullptr;
#define SC_BEGIN_FSM_LITE(_runner_) \
do{\
auto ptrSCMacroFSMBuilder = SpeedCC::SCFSMBuilder::create(); \
auto ptrSCRunner = ptrSCMacroFSMBuilder->beginSingle(); \
(*_runner_) = ptrSCRunner; \
#define AT_STATE(_state_id_) \
do{\
pSCMacroFSMProperty = nullptr; \
ptrSCMacroFSMBuilder->beginState((_state_id_));
#define ENDAT_STATE \
ptrSCMacroFSMBuilder->endState();\
}while(0);
#define SC_END_FSM \
ptrSCMacroFSMBuilder->end();\
}while(0);
#define ON_ENTER_STATE(_state_id_) \
ptrSCMacroFSMBuilder->insertEnterBehavior((_state_id_));
#define ON_EXIT_STATE(_state_id_) \
ptrSCMacroFSMBuilder->insertExitBehavior((_state_id_));
#define ON_MSG_NEXT_STATE(_msg_,_state_id_) \
do{\
auto bvrPtr = SpeedCC::SCBehaviorSwitchFSMStateT<std::remove_pointer<decltype(pSCMacroFSMProperty)>::type>::create((_state_id_));\
ON_MSG_BEHAVIOR(_msg_,bvrPtr)\
}while(0);
#define ON_MSG_BEHAVIOR(_msg_,_behavior_) \
ptrSCMacroFSMBuilder->insertBehaviorWithMsg((_msg_),(_behavior_));
#define ON_CMD_BEHAVIOR(_cmd_,_behavior_) \
ptrSCMacroFSMBuilder->insertBehaviorWithCmd((_cmd_),(_behavior_));
#define ON_MSG_ENTITY_ACTIVE(_msg_,_entity_id_,_active_) \
do{\
auto ptrBvr = SpeedCC::SCBehaviorEntityActive::create((_entity_id_),(_active_)); \
ON_MSG_BEHAVIOR((_msg_),ptrBvr)\
}while(0);
#define ON_MSG_STRATEGY_ACTIVE(_msg_,_strategy_id_,_active_) \
do{\
auto ptrBvr = SpeedCC::SCBehaviorStrategyActive::create((_strategy_id_),(_active_)); \
ON_MSG_BEHAVIOR((_msg_),ptrBvr)\
}while(0);
#define ON_MSG_SCENE(_msg_,_scene_class_,_switch_type_,_trans_class_) \
do{\
auto ptrBvr = SpeedCC::SCBehaviorSceneSwitch::create<_scene_class_,_trans_class_>((_switch_type_));\
ON_MSG_BEHAVIOR((_msg_),ptrBvr)\
}while(0);
#define ON_CMD_SCENE(_cmd_,_scene_class_,_switch_type_,_trans_class_) \
do{\
auto ptrBvr = SpeedCC::SCBehaviorSceneSwitch::create<_scene_class_,_trans_class_>((_switch_type_));\
ON_CMD_BEHAVIOR((_cmd_),ptrBvr)\
}while(0);
#define ON_MSG(_msg_) \
ON_MSG_BEHAVIOR((_msg_),nullptr)
#endif // __SPEEDCC__SCFLOWMACROS_H__
|
ed6de4ed928363aacf0301377e5ad589c6d756c0
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_5686275109552128_0/C++/vishalkarve15/B.cpp
|
d51075077eebcf317a778008776412aad5a47427
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 900
|
cpp
|
B.cpp
|
#include<bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define ll long long
int a[1010];
int main()
{
int t;
scanf("%d",&t);
for(int tt=1;tt<=t;tt++)
{
int n;
scanf("%d",&n);
for(int i=0;i<n;i++)
scanf("%d",&a[i]);
int mx=-1;
for(int i=0;i<n;i++)
mx=max(mx,a[i]);
int ans=mx;
for(int m=1;m<=mx;m++)
{
if(m>ans)
break;
int newans=m;
for(int i=0;i<n;i++)
{
if(a[i]%m==0)
newans+=a[i]/m-1;
else
newans+=a[i]/m+1-1;
}
if(newans<ans)
ans=newans;
}
printf("Case #%d: %d\n",tt,ans);
}
return 0;
}
|
52e847e1dad1e82079449877857490c374383b0f
|
58c93a9db049501b175a7aa99d37f7d6fca44c28
|
/pat/pat_1116.cpp
|
55a6800dcec6094313c58bde786048ca1b20a9f1
|
[] |
no_license
|
sunlggggg/patest
|
1454ac4528de11a495e21b009e38cc4be2f88439
|
351d3196a91cccce75327a4561571584be56c8bc
|
refs/heads/master
| 2020-05-25T05:22:49.278517
| 2018-03-19T16:32:48
| 2018-03-19T16:32:48
| 84,914,353
| 7
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 869
|
cpp
|
pat_1116.cpp
|
#include<iostream>
#include<map>
#include<set>
#include<cmath>
using namespace std;
int n;
map<int , int> _map;
set<int> _set;
bool isPrime(int num){
if(num == 2)
return true;
for(int i = 2; i < (int)sqrt(1.0*num) +2;i++){
if(num%i == 0 ){
return false;
}
}
return true;
}
int main(){
#ifdef _DEBUG
freopen("data.txt","r",stdin);
#endif
cin>>n;
int num;
for(int i =1 ; i<= n; i++){
cin>>num;
_map.insert(make_pair(num,i));
}
int t;
cin>>t;
while(t--){
cin>>num;
printf("%04d",num);
cout<<": ";
if(_map.count(num) == 0 ){
cout<<"Are you kidding?"<<endl;
}else if(_set.count(num) == 1){
cout<<"Checked"<<endl;
}else if(_map.find(num)->second == 1){
cout<<"Mystery Award"<<endl;
}else if(isPrime(_map.find(num)->second) ){
cout<<"Minion"<<endl;
}else{
cout<<"Chocolate"<<endl;
}
_set.insert(num);
}
return 0;
}
|
72b8ffa49ab9e7be9fe56ecd0eefbe45855b201c
|
1ff79195e466c8684a0a319e2c8eb37522457ad5
|
/test/xml_parser_test.cpp
|
07c705917265649b1fb53e4057224b16fbd34b6c
|
[
"Apache-2.0"
] |
permissive
|
eric5488/cppagent
|
ccc6245c2dc12b5abbc1232c21d34d359c48f047
|
2aa3dc54c959aeae0bb73db3dafde251dc05e0e3
|
refs/heads/master
| 2023-08-24T02:05:33.677410
| 2021-10-04T05:38:25
| 2021-10-04T05:38:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 12,778
|
cpp
|
xml_parser_test.cpp
|
//
// Copyright Copyright 2009-2021, AMT – The Association For Manufacturing Technology (“AMT”)
// All rights reserved.
//
// 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.
//
// Ensure that gtest is the first header otherwise Windows raises an error
#include <gtest/gtest.h>
// Keep this comment to keep gtest.h above. (clang-format off/on is not working here!)
#include "test_utilities.hpp"
#include "xml_parser.hpp"
#include "xml_printer.hpp"
#include <fstream>
#include <iostream>
#include <stdexcept>
using namespace std;
using namespace mtconnect;
class XmlParserTest : public testing::Test
{
protected:
void SetUp() override
{
m_xmlParser = nullptr;
try
{
std::unique_ptr<XmlPrinter> printer(new XmlPrinter());
m_xmlParser = new XmlParser();
m_devices =
m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/test_config.xml", printer.get());
}
catch (exception &)
{
FAIL() << "Could not locate test xml: " << PROJECT_ROOT_DIR << " /samples/test_config.xml";
}
}
void TearDown() override
{
if (m_xmlParser)
{
delete m_xmlParser;
m_xmlParser = nullptr;
}
}
XmlParser *m_xmlParser{nullptr};
std::list<Device *> m_devices;
};
TEST_F(XmlParserTest, Constructor)
{
if (m_xmlParser)
{
delete m_xmlParser;
m_xmlParser = nullptr;
}
std::unique_ptr<XmlPrinter> printer(new XmlPrinter());
m_xmlParser = new XmlParser();
ASSERT_THROW(m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/badPath.xml", printer.get()),
std::runtime_error);
delete m_xmlParser;
m_xmlParser = nullptr;
m_xmlParser = new XmlParser();
ASSERT_NO_THROW(
m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/test_config.xml", printer.get()));
}
TEST_F(XmlParserTest, GetDevices)
{
ASSERT_EQ((size_t)1, m_devices.size());
const auto device = m_devices.front();
// Check for Description
ASSERT_EQ((string) "Linux CNC Device", device->getDescriptionBody());
vector<DataItem *> dataItems;
const auto &dataItemsMap = device->getDeviceDataItems();
for (auto const &mapItem : dataItemsMap)
dataItems.emplace_back(mapItem.second);
bool hasExec = false, hasZcom = false;
for (auto const &dataItem : dataItems)
{
if (dataItem->getId() == "p5" && dataItem->getName() == "execution")
hasExec = true;
if (dataItem->getId() == "z2" && dataItem->getName() == "Zcom")
hasZcom = true;
}
ASSERT_TRUE(hasExec);
ASSERT_TRUE(hasZcom);
}
TEST_F(XmlParserTest, Condition)
{
ASSERT_EQ((size_t)1, m_devices.size());
const auto device = m_devices.front();
auto dataItemsMap = device->getDeviceDataItems();
const auto item = dataItemsMap.at("clc");
ASSERT_TRUE(item);
ASSERT_EQ((string) "clc", item->getId());
ASSERT_TRUE(item->isCondition());
}
TEST_F(XmlParserTest, GetDataItems)
{
std::set<string> filter;
m_xmlParser->getDataItems(filter, "//Linear");
ASSERT_EQ(13, (int)filter.size());
filter.clear();
m_xmlParser->getDataItems(filter, "//Linear//DataItem[@category='CONDITION']");
ASSERT_EQ(3, (int)filter.size());
filter.clear();
m_xmlParser->getDataItems(filter, "//Controller/electric/*");
ASSERT_EQ(0, (int)filter.size());
filter.clear();
m_xmlParser->getDataItems(filter, "//Device/DataItems");
ASSERT_EQ(2, (int)filter.size());
filter.clear();
m_xmlParser->getDataItems(filter, "//Device/DataItems/");
ASSERT_EQ(0, (int)filter.size());
filter.clear();
m_xmlParser->getDataItems(filter, R"(//Rotary[@name="C"]//DataItem[@type="LOAD"])");
ASSERT_EQ(2, (int)filter.size());
filter.clear();
m_xmlParser->getDataItems(
filter, R"(//Rotary[@name="C"]//DataItem[@category="CONDITION" or @category="SAMPLE"])");
ASSERT_EQ(5, (int)filter.size());
}
TEST_F(XmlParserTest, GetDataItemsExt)
{
std::set<string> filter;
if (m_xmlParser)
{
delete m_xmlParser;
m_xmlParser = nullptr;
}
// For the rest we will check with the extended schema
try
{
std::unique_ptr<XmlPrinter> printer(new XmlPrinter());
m_xmlParser = new XmlParser();
m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/extension.xml", printer.get());
}
catch (exception &)
{
FAIL() << "Could not locate test xml: " << PROJECT_ROOT_DIR << "/samples/extension.xml";
}
filter.clear();
m_xmlParser->getDataItems(filter, "//Device//Pump");
ASSERT_EQ(0, (int)filter.size());
filter.clear();
m_xmlParser->getDataItems(filter, "//Device//x:Pump");
ASSERT_EQ(1, (int)filter.size());
}
TEST_F(XmlParserTest, ExtendedSchema)
{
if (m_xmlParser)
{
delete m_xmlParser;
m_xmlParser = nullptr;
}
try
{
std::unique_ptr<XmlPrinter> printer(new XmlPrinter());
m_xmlParser = new XmlParser();
m_devices = m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/extension.xml", printer.get());
}
catch (exception &)
{
FAIL() << "Could not locate test xml: " << PROJECT_ROOT_DIR << "/samples/extension.xml";
}
ASSERT_EQ((size_t)1, m_devices.size());
const auto device = m_devices.front();
// Check for Description
ASSERT_EQ((string) "Extended Schema.", device->getDescriptionBody());
mtconnect::Component *pump = device->getChildren().front();
ASSERT_EQ((string) "pump", pump->getName());
ASSERT_EQ((string) "Pump", pump->getClass());
ASSERT_EQ((string) "x", pump->getPrefix());
DataItem *item = pump->getDataItems().front();
ASSERT_EQ((string) "x:FLOW", item->getType());
ASSERT_EQ((string) "Flow", item->getElementName());
ASSERT_EQ((string) "x", item->getPrefix());
}
TEST_F(XmlParserTest, TimeSeries)
{
const auto dev = m_devices.front();
ASSERT_TRUE(dev);
auto item = dev->getDeviceDataItem("Xact");
ASSERT_TRUE(item);
item->getAttributes();
ASSERT_EQ((string) "AVERAGE", item->getStatistic());
const auto &attrs1 = item->getAttributes();
ASSERT_EQ(string("AVERAGE"), attrs1.at("statistic"));
item = dev->getDeviceDataItem("Xts");
ASSERT_TRUE(item);
item->getAttributes();
ASSERT_TRUE(item->isTimeSeries());
ASSERT_EQ(DataItem::TIME_SERIES, item->getRepresentation());
const auto &attrs2 = item->getAttributes();
ASSERT_EQ(string("TIME_SERIES"), attrs2.at("representation"));
}
TEST_F(XmlParserTest, Configuration)
{
const auto dev = m_devices.front();
ASSERT_TRUE(dev);
mtconnect::Component *power = nullptr;
const auto &children = dev->getChildren();
for (auto const &iter : children)
{
if (iter->getName() == "power")
power = iter;
}
ASSERT_TRUE(power);
ASSERT_FALSE(power->getConfiguration().empty());
}
TEST_F(XmlParserTest, NoNamespace)
{
if (m_xmlParser)
{
delete m_xmlParser;
m_xmlParser = nullptr;
}
unique_ptr<XmlPrinter> printer(new XmlPrinter());
m_xmlParser = new XmlParser();
ASSERT_NO_THROW(
m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/NoNamespace.xml", printer.get()));
}
TEST_F(XmlParserTest, FilteredDataItem13)
{
delete m_xmlParser;
m_xmlParser = nullptr;
try
{
unique_ptr<XmlPrinter> printer(new XmlPrinter());
m_xmlParser = new XmlParser();
m_devices =
m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/filter_example_1.3.xml", printer.get());
}
catch (exception &)
{
FAIL() << "Could not locate test xml: " << PROJECT_ROOT_DIR
<< "/samples/filter_example_1.3.xml";
}
Device *dev = m_devices.front();
DataItem *di = dev->getDeviceDataItem("c1");
ASSERT_EQ(di->getFilterValue(), 5.0);
ASSERT_TRUE(di->hasMinimumDelta());
}
TEST_F(XmlParserTest, FilteredDataItem)
{
if (m_xmlParser)
{
delete m_xmlParser;
m_xmlParser = nullptr;
}
try
{
unique_ptr<XmlPrinter> printer(new XmlPrinter());
m_xmlParser = new XmlParser();
m_devices =
m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/filter_example.xml", printer.get());
}
catch (exception &)
{
FAIL() << "Could not locate test xml: " << PROJECT_ROOT_DIR << "/samples/filter_example.xml";
}
auto di = m_devices.front()->getDeviceDataItem("c1");
ASSERT_EQ(di->getFilterValue(), 5.0);
ASSERT_TRUE(di->hasMinimumDelta());
di = m_devices.front()->getDeviceDataItem("c2");
ASSERT_EQ(di->getFilterPeriod(), 10.0);
ASSERT_TRUE(di->hasMinimumPeriod());
}
TEST_F(XmlParserTest, References)
{
if (m_xmlParser)
{
delete m_xmlParser;
m_xmlParser = nullptr;
}
try
{
unique_ptr<XmlPrinter> printer(new XmlPrinter());
m_xmlParser = new XmlParser();
m_devices =
m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/reference_example.xml", printer.get());
}
catch (exception &)
{
FAIL() << "Could not locate test xml: " << PROJECT_ROOT_DIR << "/samples/reference_example.xml";
}
string id = "mf";
const auto item = m_devices.front()->getDeviceDataItem(id);
const auto comp = item->getComponent();
comp->resolveReferences();
const auto refs = comp->getReferences();
const auto &ref = refs[0];
ASSERT_EQ((string) "c4", ref.m_id);
ASSERT_EQ((string) "chuck", ref.m_name);
ASSERT_TRUE(ref.m_dataItem) << "DataItem was not resolved.";
const auto &ref2 = refs[1];
ASSERT_EQ((string) "d2", ref2.m_id);
ASSERT_EQ((string) "door", ref2.m_name);
ASSERT_TRUE(ref2.m_dataItem) << "DataItem was not resolved.";
const auto &ref3 = refs[2];
ASSERT_EQ((string) "ele", ref3.m_id);
ASSERT_EQ((string) "electric", ref3.m_name);
ASSERT_TRUE(ref3.m_component) << "DataItem was not resolved.";
std::set<string> filter;
m_xmlParser->getDataItems(filter, "//BarFeederInterface");
ASSERT_EQ((size_t)5, filter.size());
ASSERT_EQ((size_t)1, filter.count("mf"));
ASSERT_EQ((size_t)1, filter.count("c4"));
ASSERT_EQ((size_t)1, filter.count("bfc"));
ASSERT_EQ((size_t)1, filter.count("d2"));
ASSERT_EQ((size_t)1, filter.count("eps"));
}
TEST_F(XmlParserTest, SourceReferences)
{
if (m_xmlParser)
{
delete m_xmlParser;
m_xmlParser = nullptr;
}
try
{
unique_ptr<XmlPrinter> printer(new XmlPrinter());
m_xmlParser = new XmlParser();
m_devices =
m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/reference_example.xml", printer.get());
}
catch (exception &)
{
FAIL() << "Could not locate test xml: " << PROJECT_ROOT_DIR << "/samples/reference_example.xml";
}
const auto item = m_devices.front()->getDeviceDataItem("bfc");
ASSERT_TRUE(item != nullptr);
ASSERT_EQ(string(""), item->getSource());
ASSERT_EQ(string("mf"), item->getSourceDataItemId());
ASSERT_EQ(string("ele"), item->getSourceComponentId());
ASSERT_EQ(string("xxx"), item->getSourceCompositionId());
}
TEST_F(XmlParserTest, DataItemRelationships)
{
if (m_xmlParser)
{
delete m_xmlParser;
m_xmlParser = nullptr;
}
unique_ptr<XmlPrinter> printer(new XmlPrinter());
m_xmlParser = new XmlParser();
m_devices = m_xmlParser->parseFile(PROJECT_ROOT_DIR "/samples/relationship_test.xml", printer.get());
const auto &device = m_devices.front();
auto &dataItemsMap = device->getDeviceDataItems();
const auto item1 = dataItemsMap.at("xlc");
ASSERT_TRUE(item1 != nullptr);
const auto &relations = item1->getRelationships();
ASSERT_EQ((size_t) 2, relations.size());
auto rel = relations.begin();
ASSERT_EQ(string("DataItemRelationship"),
rel->m_relation);
ASSERT_EQ(string("LIMIT"),
rel->m_type);
ASSERT_EQ(string("archie"),
rel->m_name);
ASSERT_EQ(string("xlcpl"),
rel->m_idRef);
rel++;
ASSERT_EQ(string("SpecificationRelationship"),
rel->m_relation);
ASSERT_EQ(string("LIMIT"),
rel->m_type);
ASSERT_TRUE(rel->m_name.empty());
ASSERT_EQ(string("spec1"),
rel->m_idRef);
const auto item2 = dataItemsMap.at("xlcpl");
ASSERT_TRUE(item2 != nullptr);
const auto &relations2 = item2->getRelationships();
ASSERT_EQ((size_t) 1, relations2.size());
auto rel2 = relations2.begin();
ASSERT_EQ(string("DataItemRelationship"), rel2->m_relation);
ASSERT_EQ(string("OBSERVATION"), rel2->m_type);
ASSERT_EQ(string("bob"), rel2->m_name);
ASSERT_EQ(string("xlc"), rel2->m_idRef);
}
TEST_F(XmlParserTest, ParseDeviceMTConnectVersion)
{
const auto dev = m_devices.front();
ASSERT_TRUE(dev);
ASSERT_EQ(string("1.7"), dev->getMTConnectVersion());
}
|
d4034aefba9a12ad5db5ad8b4eeb5056e2503bc6
|
24d856d98c85a319d53be2768ccc176a50873fa3
|
/xproxy/ServerCache.H
|
6a2f808ed90d11b172542406460559e02430e8e7
|
[
"BSD-2-Clause"
] |
permissive
|
dozenow/shortcut
|
a4803b59c95e72a01d73bb30acaae45cf76b0367
|
b140082a44c58f05af3495259c1beaaa9a63560b
|
refs/heads/jumpstart-php
| 2020-06-29T11:41:05.842760
| 2019-03-28T17:28:56
| 2019-03-28T17:28:56
| 200,405,626
| 2
| 2
|
BSD-2-Clause
| 2019-08-03T19:45:44
| 2019-08-03T17:57:58
|
C
|
UTF-8
|
C++
| false
| false
| 4,417
|
h
|
ServerCache.H
|
#ifndef ServerCache_H
# define ServerCache_H
# include "IntCache.H"
# include "CharCache.H"
# include "TextCompressor.H"
# include "BlockCache.H"
# include "BlockCacheSet.H"
static const unsigned int SERVER_TEXT_CACHE_SIZE = 9999;
class ServerCache
{
public:
ServerCache();
~ServerCache();
// General-purpose caches:
CharCache textCache[SERVER_TEXT_CACHE_SIZE];
unsigned int lastSequenceNum;
IntCache replySequenceNumCache;
IntCache eventSequenceNumCache;
unsigned int lastTimestamp;
CharCache depthCache;
IntCache visualCache;
IntCache colormapCache;
// Opcode prediction caches (predict next opcode based on previous one)
CharCache opcodeCache[256];
unsigned char lastOpcode;
// X connection startup
static BlockCache lastInitReply;
// X errors
CharCache errorCodeCache;
IntCache errorMinorCache;
CharCache errorMajorCache;
// ButtonPress and ButtonRelease events
CharCache buttonCache;
// ColormapNotify event
IntCache colormapNotifyWindowCache;
IntCache colormapNotifyColormapCache;
// ConfigureNotify event
IntCache *configureNotifyWindowCache[3];
IntCache *configureNotifyGeomCache[5];
// CreateNotify event
IntCache createNotifyWindowCache;
unsigned int createNotifyLastWindow;
// Expose event
IntCache exposeWindowCache;
IntCache *exposeGeomCache[5];
// FocusIn event
// (also used for FocusOut)
IntCache focusInWindowCache;
// KeymapNotify event
static BlockCache lastKeymap;
// KeyPress event
unsigned char keyPressLastKey;
unsigned char keyPressCache[23];
// MapNotify event
// (also used for UnmapNotify)
IntCache mapNotifyEventCache;
IntCache mapNotifyWindowCache;
// MotionNotify event
// (also used for KeyPress, KeyRelease, ButtonPress, ButtonRelease,
// EnterNotify, and LeaveNotify events and QueryPointer reply)
IntCache motionNotifyTimestampCache;
unsigned int motionNotifyLastRootX;
unsigned int motionNotifyLastRootY;
IntCache motionNotifyRootXCache;
IntCache motionNotifyRootYCache;
IntCache motionNotifyEventXCache;
IntCache motionNotifyEventYCache;
IntCache motionNotifyStateCache;
IntCache *motionNotifyWindowCache[3];
// NoExpose event
IntCache noExposeDrawableCache;
IntCache noExposeMinorCache;
CharCache noExposeMajorCache;
// PropertyNotify event
IntCache propertyNotifyWindowCache;
IntCache propertyNotifyAtomCache;
// ReparentNotify event
IntCache reparentNotifyWindowCache;
// SelectionClear event
IntCache selectionClearWindowCache;
IntCache selectionClearAtomCache;
// VisibilityNotify event
IntCache visibilityNotifyWindowCache;
// GetGeometry reply
IntCache getGeometryRootCache;
IntCache *getGeometryGeomCache[5];
// GetInputFocus reply
IntCache getInputFocusWindowCache;
// GetKeyboardMapping reply
static unsigned char getKeyboardMappingLastKeysymsPerKeycode;
static BlockCache getKeyboardMappingLastMap;
IntCache getKeyboardMappingKeysymCache;
CharCache getKeyboardMappingLastByteCache;
// GetModifierMapping reply
static BlockCache getModifierMappingLastMap;
// GetProperty reply
CharCache getPropertyFormatCache;
IntCache getPropertyTypeCache;
TextCompressor getPropertyTextCompressor;
static BlockCache xResources;
// GetSelection reply
IntCache getSelectionOwnerCache;
// GetWindowAttributes reply
IntCache getWindowAttributesClassCache;
CharCache getWindowAttributesBitGravityCache;
CharCache getWindowAttributesWinGravityCache;
IntCache getWindowAttributesPlanesCache;
IntCache getWindowAttributesPixelCache;
IntCache getWindowAttributesAllEventsCache;
IntCache getWindowAttributesYourEventsCache;
IntCache getWindowAttributesDontPropagateCache;
// QueryColors reply
BlockCache queryColorsLastReply;
// QueryFont reply
static BlockCacheSet queryFontFontCache;
IntCache *queryFontCharInfoCache[6];
unsigned int queryFontLastCharInfo[6];
// QueryPointer reply
IntCache queryPointerRootCache;
IntCache queryPointerChildCache;
// TranslateCoords reply
IntCache translateCoordsChildCache;
IntCache translateCoordsXCache;
IntCache translateCoordsYCache;
};
#endif /* ServerCache_H */
|
7a7c9781b26a63b89cab34314f3e66bbd35eaf1d
|
986488f6b6c63988dfc0a623985d8676af743cf5
|
/9.4/Time.h
|
db84ff21cb01100c5ca8f0eaf43e5dc7beb8cc7b
|
[] |
no_license
|
QianheZhang/zhang_qianhe
|
1d9fe47af0623e01de53b76beeea970ee1fc16d3
|
f71baa52f2595a5277ca3938bf4e84b4addf7017
|
refs/heads/master
| 2020-04-27T06:44:39.537485
| 2019-06-09T03:52:15
| 2019-06-09T03:52:15
| 174,116,661
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 282
|
h
|
Time.h
|
#ifndef TIME_H
#define TIME_H
class Time
{
public:
explicit Time(int=0, int=0, int=0);
void setTime(int, int, int);
void printUniversal() const;
void printStandard() const;
private:
unsigned int hour;
unsigned int minute;
unsigned int second;
};
#endif
|
7e5fdd08b1b63869497cf094e20039987c834797
|
c484e4f21571166e212e9bb453f199c27e9b0b33
|
/test/MatrixBufferTiming.cpp
|
4917424d96c0d3bfeb01d40931a1c03839c03560
|
[] |
no_license
|
rock-data-processing/data_processing-type_to_vector
|
da7aa32c5c52d4af9ae65d68bea5da0b4f363ccc
|
2ed131ed27ee078b7e3e0238136bbb4579e0457d
|
refs/heads/master
| 2021-06-04T05:49:55.044542
| 2018-03-13T11:49:23
| 2018-03-13T11:49:23
| 32,155,300
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 9,315
|
cpp
|
MatrixBufferTiming.cpp
|
// \file MatrixBufferTiming.cpp
#include <list>
#include <vector>
#include <iostream>
#include <string>
#include <Eigen/Core>
// Build: g++ MatrixBufferTiming.cpp -o matrix_buffer_timing -I/usr/include/eigen3
using namespace Eigen;
using std::list;
struct Buffer {
int vectorCount;
int vectorSize;
Buffer(int vsize, int vcnt) : vectorCount(vcnt), vectorSize(vsize) {}
virtual void push(const VectorXd& v) = 0;
virtual MatrixXd getMatrixRawIndices(int from, int to) = 0;
MatrixXd getMatrix(int from, int to=1) {
if ( to < 0 ) to = vectorCount + to;
assert(from <= to);
from = vectorCount - from - 1;
to = vectorCount - to - 1;
return getMatrixRawIndices(to,from).reverse();
}
virtual std::string name() = 0;
int getVectorCount() { return vectorCount; }
int getVectorSize() { return vectorSize; }
};
struct MatrixBuffer : public Buffer {
MatrixXd mat;
int idx;
MatrixBuffer(int n, int m) : mat(MatrixXd::Zero(n,m)), idx(-1), Buffer(n,m) {}
void push(const VectorXd& v) {
assert ( v.rows() == mat.rows() );
int m = mat.cols();
if (idx < m-1 ) idx++;
else {
mat.leftCols(m-1) = mat.rightCols(m-1);
}
mat.col(idx) = v;
}
MatrixXd getMatrixRawIndices( int from, int to) {
return mat.block(0,from,mat.rows(),to-from+1);
}
std::string name() { return "MatrixBuffer"; }
};
struct QueueBuffer : public Buffer, protected list<VectorXd> {
QueueBuffer(int n, int m) : Buffer(n,m) {}
void push(const VectorXd& v) {
push_back(v);
if ( size() > vectorCount ) pop_front();
}
MatrixXd getMatrixRawIndices(int from, int to=-1) {
MatrixXd mat = MatrixXd::Zero(vectorSize,to-from+1);
const_iterator it = begin();
for ( int i=0; i<from; i++,it++);
for ( int i=0; it != end() && i < to-from+1; i++,it++) {
mat.col(i) = *it;
}
return mat;
}
virtual std::string name() { return "QueueBuffer"; }
};
struct QueueCacheBuffer : public QueueBuffer {
MatrixBuffer mB;
QueueCacheBuffer(int n, int m) : mB(n,m), QueueBuffer(n,m) {}
void push(const VectorXd& v) {
QueueBuffer::push(v);
const_iterator it = begin();
for ( int i=0; it != end(); i++, it++)
mB.mat.col(vectorCount-i-1) = *it;
}
MatrixXd getMatrixRawIndices(int from, int to) {
return mB.getMatrix(from,to);
}
std::string name() { return "QueueCacheBuffer"; }
};
struct Matrix2mBuffer : public Buffer {
MatrixXd mat;
int mat_idx, idx;
Matrix2mBuffer(int n, int m) : mat_idx(0), idx(-1), Buffer(n,m) {
mat = MatrixXd::Zero(n,2*m);
}
void push(const VectorXd& v) {
assert ( v.rows() == mat.rows() );
if (idx < vectorCount-1) idx++;
else {
idx = 0;
}
mat.col(idx) = v;
mat.col(idx+vectorCount) = v;
}
MatrixXd getMatrixRawIndices(int from, int to) {
assert(idx >= 0 && idx < vectorCount);
from += idx+1;
to += idx+1;
return mat.block(0,from,vectorSize,to-from+1);
}
std::string name() { return "Matrix2mBuffer"; }
};
struct CircleMatrixBuffer : public Buffer {
MatrixXd mat;
int idx;
CircleMatrixBuffer(int n, int m) : idx(-1), Buffer(n,m) {
mat = MatrixXd::Zero(n,m);
}
void push(const VectorXd& v) {
assert ( v.rows() == mat.rows() );
if (idx < vectorCount-1) idx++;
else {
idx = 0;
}
mat.col(idx) = v;
}
MatrixXd getMatrixRawIndices(int from, int to) {
assert(idx >= 0 && idx < vectorCount);
from += idx+1;
to += idx+1;
if (from > vectorCount-1) {
return mat.block(0,from-vectorCount,vectorSize,to-from+1);
} else if ( to > vectorCount-1 ) {
return (MatrixXd(vectorSize,to-from+1) << mat.block(0,from,vectorSize,vectorCount-from),mat.block(0,0,vectorSize,to-vectorCount+1)).finished();
} else
return mat.block(0,from,vectorSize,to-from+1);
}
std::string name() { return "CircleMatrixBuffer"; }
};
struct ColumnCircleMatrixBuffer : public Buffer {
MatrixXd mat;
int idx;
ColumnCircleMatrixBuffer(int n, int m) : idx(-1), Buffer(n,m) {
mat = MatrixXd::Zero(m,n);
}
void push(const VectorXd& v) {
assert ( v.rows() == mat.cols() );
if (idx < vectorCount-1) idx++;
else {
idx = 0;
}
mat.row(idx) = v;
}
MatrixXd getMatrixRawIndices(int from, int to) {
assert(idx >= 0 && idx < vectorCount);
from += idx+1;
to += idx+1;
if (from > vectorCount-1) {
return mat.block(from-vectorCount,0,to-from+1,vectorSize).transpose();
} else if ( to > vectorCount-1 ) {
return (MatrixXd(vectorSize,to-from+1) <<
mat.block(from,0,vectorCount-from,vectorSize).transpose(),
mat.block(0,0,to-vectorCount+1,vectorSize).transpose()).finished();
} else
return mat.block(from,0,to-from+1,vectorSize).transpose();
}
std::string name() { return "ColumnCircleMatrixBuffer"; }
};
int main (void) {
std::vector<Buffer*> bufs;
bufs.push_back(new MatrixBuffer(3,5));
bufs.push_back(new QueueBuffer(3,5));
bufs.push_back(new Matrix2mBuffer(3,5));
bufs.push_back(new CircleMatrixBuffer(3,5));
bufs.push_back(new ColumnCircleMatrixBuffer(3,5));
for ( int ib = 0; ib < bufs.size(); ib++ ) {
std::cout << "Buffer " << ib << ": " << bufs.at(ib)->name() << std::endl;
for ( int i = 0; i< 8; i++) {
VectorXd v = VectorXd::Constant(3,i);
bufs.at(ib)->push(v);
std::cout << bufs.at(ib)->getMatrix(0,-1) << std::endl;
}
}
for ( int ib = 0; ib < bufs.size(); ib++ ) {
std::cout << "Buffer " << ib << " --- " << std::endl;
for ( int i = 0; i< 3; i++) {
std::cout << bufs.at(ib)->getMatrix(i,-2) << std::endl;
}
}
for (int ib=0; ib < bufs.size(); ib++ ) {
delete bufs.at(ib);
bufs.at(ib) = 0;
}
bufs.clear();
bufs.push_back(new MatrixBuffer(5,7));
bufs.push_back(new MatrixBuffer(7,20));
bufs.push_back(new QueueBuffer(5,7));
bufs.push_back(new QueueBuffer(7,20));
bufs.push_back(new Matrix2mBuffer(5,7));
bufs.push_back(new Matrix2mBuffer(7,20));
bufs.push_back(new CircleMatrixBuffer(5,7));
bufs.push_back(new CircleMatrixBuffer(7,20));
bufs.push_back(new ColumnCircleMatrixBuffer(5,7));
bufs.push_back(new ColumnCircleMatrixBuffer(7,20));
std::vector<double> sums;
sums.resize(bufs.size(),0);
std::cout << "Times for push:" << std::endl;
int N = CLOCKS_PER_SEC;
int start,end;
for ( int ib=0; ib < bufs.size(); ib++) {
Buffer* buf = bufs.at(ib);
int n = buf->vectorSize;
int m = buf->vectorCount;
start = clock();
VectorXd v = VectorXd::Zero(n);
for (int i=0; i<N; i++) {
v = VectorXd::Constant(n,i);
buf->push(v);
}
end = clock();
std::cout << buf->name() << "(" << n << "," << m << ") needed " <<
double(end-start)/1e6 << " us per push" << std::endl;
sums.at(ib) += double(end-start)/1e6;
}
std::cout << "Times for getMatrix:" << std::endl;
for ( int ib=0; ib < bufs.size(); ib++) {
Buffer* buf = bufs.at(ib);
int n = buf->vectorSize;
int m = buf->vectorCount;
start = clock();
for (int i=0; i<N; i++) {
MatrixXd mat = buf->getMatrix(m/2,-2);
}
end = clock();
std::cout << buf->name() << "(" << n << "," << m << ") needed " <<
double(end-start)/1e6 << " us per get" << std::endl;
sums.at(ib) += double(end-start)/1e6;
}
std::cout << "Times for getMatrix after push:" << std::endl;
for ( int ib=0; ib < bufs.size(); ib++) {
Buffer* buf = bufs.at(ib);
int n = buf->vectorSize;
int m = buf->vectorCount;
VectorXd v = VectorXd::Zero(n);
start = clock();
for (int i=0; i<N; i++) {
v = VectorXd::Constant(n,i+N);
buf->push(v);
MatrixXd mat = buf->getMatrix(m/2,-2);
}
end = clock();
std::cout << buf->name() << "(" << n << "," << m << ") needed " <<
double(end-start)/1e6 << " us per push/get" << std::endl;
sums.at(ib) += double(end-start)/1e6;
}
std::cout << "Times in total:" << std::endl;
for ( int ib=0; ib < bufs.size(); ib++) {
Buffer* buf = bufs.at(ib);
int n = buf->vectorSize;
int m = buf->vectorCount;
std::cout << buf->name() << "(" << n << "," << m << ") needed " <<
sums.at(ib) << " us in total" << std::endl;
}
for (int ib=0; ib < bufs.size(); ib++ ) {
delete bufs.at(ib);
bufs.at(ib) = 0;
}
bufs.clear();
return 0;
}
|
b16762ea2b5d0119d4828df03001cc075dd7cbac
|
13b14c9c75143bf2eda87cb4a41006a52dd6f02b
|
/AOJ/convert.cpp
|
d33f96c063fdc76c2e5015b4a0a80517103ab197
|
[] |
no_license
|
yutaka-watanobe/problem-solving
|
2c311ac856c79c20aef631938140118eb3bc3835
|
f0b92125494fbd3c8d203989ec9fef53f52ad4b4
|
refs/heads/master
| 2021-06-03T12:58:39.881107
| 2020-12-16T14:34:16
| 2020-12-16T14:34:16
| 94,963,754
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 178
|
cpp
|
convert.cpp
|
#include<iostream>
#include<string>
using namespace std;
main(){
string line;
while( getline(cin, line) ){
if ( cin.eof() ) break;
cout << " " + line << endl;
}
}
|
ddfae63d635f5127cec6f54027a5afff60b134df
|
425fc049f95262e0006a2e194f85aa666aff54fc
|
/Kattis-Problems/C++/harshadNumbers.cpp
|
b96e144c76733a565fba094cf2b9ceaa6ee2dd95
|
[] |
no_license
|
eykassa/Competitive-Programming
|
53fa029578c3c476327c6d2ad91312d2e24341f7
|
3bdd8030cd7d1a4a4ddf171d47bf5e99162620f3
|
refs/heads/main
| 2023-02-15T20:37:38.936214
| 2021-01-07T15:40:22
| 2021-01-07T15:40:22
| 324,785,519
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 347
|
cpp
|
harshadNumbers.cpp
|
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n; cin >> n;
while(true){
long long next=n;
long long sum=0;
while(next>0){
sum+=next%10;
next/=10;
}
if(n%sum==0){
cout << n << endl;
return 0;
}
n++;
}
}
|
b15d442844e903d83e97d0e92e66ab28e7863b68
|
05db1c5eaea391b353855db449aa6445082b9541
|
/test/test_entanglement_fidelity.cxx
|
831c295f752957d2e2658e51d90a1677f63baffc
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
Tomographer/QPtomographer
|
d2117b57778d9cdf39a5538c2bdf4ba1e4f75858
|
337f0ba1069c8cef30e80a6719e8df9ce1c68997
|
refs/heads/master
| 2020-03-24T21:36:02.927071
| 2018-08-04T15:22:56
| 2018-08-04T15:22:56
| 143,041,209
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,403
|
cxx
|
test_entanglement_fidelity.cxx
|
#include <cmath>
#include <string>
#include <iostream>
#include <random>
#include <algorithm>
#include <boost/math/constants/constants.hpp>
#define EIGEN_INITIALIZE_MATRICES_BY_NAN
#include <cmath>
#include <cstdlib>
#include <complex>
#include <type_traits>
#include <iostream>
#include <iomanip>
// define the exception class, but don't override eigen's eigen_assert() macro itself
#include <tomographer/tools/eigen_assert_exception.h>
#include <Eigen/Core>
#include <unsupported/Eigen/MatrixFunctions> // matrix sqrt()
#define BOOST_TEST_MODULE test_entanglement_fidelity
#include <boost/test/unit_test.hpp>
#include "testutils.h"
#include "entglfidelity_figofmerit.h"
#include "channelspace.h"
#include <tomographer/tools/boost_test_logger.h>
#include <tomographer/mathtools/pos_semidef_util.h>
#include <tomographer/densedm/dmtypes.h>
// -----------------------------------------------------------------------------
// fixture(s)
template<int QuDim_>
struct identdefs
{
static constexpr int QuDim = QuDim_;
static constexpr int QuDim2 = QuDim*QuDim;
typedef Eigen::Matrix<std::complex<double>,QuDim2,1> PureKetType;
typedef Eigen::Matrix<std::complex<double>,QuDim2,QuDim2> ChoiMatrixType;
typedef Eigen::Matrix<std::complex<double>,QuDim,QuDim> ReducedDMType;
PureKetType Psi;
ChoiMatrixType Eident;
ChoiMatrixType Eclassident;
identdefs()
: Psi(PureKetType::Zero())
{
BOOST_TEST_MESSAGE("identdefs(), QuDim="<<QuDim<<", QuDim2="<<QuDim2);
// initialize Psi
for (std::size_t j = 0; j < QuDim; ++j) {
Psi(j+QuDim*j) = 1;
}
// initialize Eident
Eident = Psi * Psi.adjoint();
validate_channel<double>(Eident, QuDim, QuDim, "Eident");
// initialize Eclassident (classical identity channel == fully depolarizing)
Eclassident = ChoiMatrixType::Zero();
for (std::size_t j = 0; j < QuDim; ++j) {
Eclassident(QuDim*j+j, QuDim*j+j) = 1;
}
validate_channel<double>(Eclassident, QuDim, QuDim, "Eclassident");
BOOST_TEST_MESSAGE("identdefs() done");
}
};
template<int QuDim_> constexpr int identdefs<QuDim_>::QuDim;
template<int QuDim_> constexpr int identdefs<QuDim_>::QuDim2;
// -----------------------------------------------------------------------------
// test suites
BOOST_AUTO_TEST_SUITE(test_entanglement_fidelity)
// =============================================================================
BOOST_AUTO_TEST_SUITE(examples)
BOOST_FIXTURE_TEST_CASE(simple_qubit, identdefs<2>)
{
// This is now a test channel which is hopefully close to Eclassident.
ChoiMatrixType E;
E <<
0.9, 0, 0, 0,
0, 0.1, 0, 0,
0, 0, 0, 0,
0, 0, 0, 1;
// value calculated manually
BOOST_CHECK_CLOSE( entanglement_fidelity(E, 2), 0.475, 1e-4/*percent*/ );
}
BOOST_FIXTURE_TEST_CASE(qutrit_case, identdefs<3>)
{
// This is now a test of another channel
ChoiMatrixType E;
E <<
0.9,0, 0, 0, 0.5,0, 0, 0,0.2,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,0.1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0.5,0, 0, 0, 1, 0, 0, 0,0.8,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0.2, 0, 0, 0,0.8, 0, 0, 0, 1 ;
ChoiMatrixType Delta = E - Eident;
// value calculated manually
BOOST_CHECK_CLOSE( entanglement_fidelity(E, 3), 5.9/9, 1e-4/*percent*/ );
}
BOOST_FIXTURE_TEST_CASE(qutrit_case_close, identdefs<3>)
{
// This is now a test channel which is hopefully close to Eident.
ChoiMatrixType E;
E <<
0.9,0, 0, 0, 0.9,0, 0, 0,0.9,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,0.1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0.9,0, 0, 0, 0.9,0, 0, 0,0.9,
0, 0, 0, 0, 0,0.1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0.9,0, 0, 0,0.9, 0, 0, 0, 1 ;
// value calculated manually
BOOST_CHECK_CLOSE( entanglement_fidelity(E, 3), 8.2/9, 1e-4/*percent*/ );
}
BOOST_FIXTURE_TEST_CASE(qutrit_case_ideal, identdefs<3>)
{
// This is now an ideal test channel
ChoiMatrixType E;
E <<
1, 0, 0, 0, 1, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0, 0, 0, 1 ;
// value calculated manually
BOOST_CHECK_CLOSE( entanglement_fidelity(E, 3), 1.0, 1e-4/*percent*/ );
}
BOOST_AUTO_TEST_SUITE_END(); // examples
BOOST_FIXTURE_TEST_SUITE(entanglement_fidelity_valcalc, identdefs<2>)
BOOST_FIXTURE_TEST_CASE(simple_qubit, identdefs<2>)
{
// process matrix of the channel diag(0.9,0.1,0,1) applied to the state (0.8,0.2)
ChoiMatrixType E;
E <<
0.72, 0, 0, 0,
0, 0.08, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0.2;
ChoiMatrixType T = E.sqrt(); // a square root of E, to test the value calculator's getValue()
typedef Tomographer::DenseDM::DMTypes<4> DMTypes;
DMTypes dmt(4);
EntglFidelityValueCalculator<DMTypes> efidcalc(dmt,2);
// value calculated manually
BOOST_CHECK_CLOSE( efidcalc.getValue(T), 0.475, 1e-4/*percent*/ );
}
BOOST_FIXTURE_TEST_CASE(simple_qubit_channelspace, identdefs<2>)
{
// Choi matrix = [ 0.9 0.3 0 0
// 0.3 0 0 0
// 0 0 0 0
// 0 0 0 1 ]
//
// Here we need a Stinespring isometry:
//
// |0> --> sqrt(0.9) * |0>_out |0>_ref + sqrt(0.1) * |1>_out |0>_ref
// |1> --> |1>_out |1>_ref
//
// ref actually has four dimensions (that's what's needed in general) but we
// don't need all of them for this particular channel.
Eigen::Matrix<std::complex<double>,8,2> Vpt;
Vpt.col(0)
<< std::sqrt(0.9),0,0,0, std::sqrt(0.1),0,0,0 ;
Vpt.col(1)
<< 0,0,0,0, 0,1.0,0,0 ;
typedef ChannelTypes<double> MyChannelTypes;
MyChannelTypes cht(2,2);
EntglFidelityChannelSpaceValueCalculator<MyChannelTypes> efidcalc(cht);
// value calculated manually
BOOST_CHECK_CLOSE( efidcalc.getValue(Vpt), 0.475, 1e-4/*percent*/ );
}
BOOST_AUTO_TEST_SUITE_END() ;
// =============================================================================
BOOST_AUTO_TEST_SUITE_END() ;
|
8f91c0329116840e4a43e3fc20b430e209fffc5b
|
db3eb5e4e57bcc08406bc3dc8449b0074696542b
|
/HW15/webhits.cpp
|
2be3700e5514273a762605cef085f9a4760847d1
|
[] |
no_license
|
brianalexander/fullerton-csci-123
|
ff47bacd13fdcc241a02e68e7a571c8e9791127f
|
1fe6e5c876a5f5886de40cdace90ff742d97e41e
|
refs/heads/master
| 2020-04-09T00:43:53.295964
| 2018-12-01T01:36:34
| 2018-12-01T01:36:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,700
|
cpp
|
webhits.cpp
|
// ============================================================================
// File: webhits.cpp (Fall 2018)
// ============================================================================
// Programmer: ???
// Date: ???
// Class: CSCI 123 ("Intro to Programming Using C++")
// Time: ???
// Instructor: Mr. Edwards
// Project: WebHits
//
// Description:
// ???
// ???
// ???
//
// ============================================================================
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <cstdlib>
using namespace std;
// defined constants
const int LEN = 256;
const int MAXDAYS = 365;
const int DAY_NUM_WIDTH = 3;
const char GRAPH_CHAR = '-';
// function prototypes
void DispData(const int dayints[], int numdays, char graphChar = 'x'
, ostream &outStream = cout);
int ReadData(istream &inStream, int daysArray[], int maxDays);
// ==== main ==================================================================
//
// ============================================================================
int main()
{
char inFname[LEN];
char outFname[LEN];
ifstream inFile;
ofstream outFile;
int totalDays;
int days[MAXDAYS] = {};
// get the input filename from the user and open the file
cout << "Please enter the name of the input file: ";
cin.getline(inFname, LEN);
inFile.open(inFname);
if (inFile.fail())
{
cout << "Failed to open the input file: " << inFname << endl;
exit(EXIT_FAILURE);
}
else
{
totalDays = ReadData(inFile, days, MAXDAYS);
if (totalDays <= 0)
{
cout << "No data to process..." << endl;
exit(EXIT_FAILURE);
}
}
// if the user wants the bar graph written to an output file, get the
// filename
cout << "Enter the name of the output file, or just\n press \"Enter\" to "
<< "write the results to the screen: ";
cin.getline(outFname, LEN);
// the .getline() function copies a cstring to the destination
// buffer, so if the first char in the filename buffer is not NULL,
// then we must have an actual filename, so let's use it to open
// an output file
if (outFname[0])
{
// open the output file
outFile.open(outFname);
if (outFile.fail())
{
// display an error message and close the input file
cout << "Failed to open the output file: " << outFname << endl;
inFile.close();
exit(EXIT_FAILURE);
}
// write the graph data to the output file and close the file
DispData(days, totalDays, GRAPH_CHAR, outFile);
outFile.close();
}
else
{
// write the graph data to stdout
DispData(days, totalDays, GRAPH_CHAR);
}
// tell the user how many days were processed
cout << totalDays << " days processed." << endl;
return 0;
} // end of main
void DispData(const int dayints[], int numdays, char graphChar
, ostream &outStream)
{
for (int i = 0; i < numdays; i++)
{
outStream << "Day " << setfill('0') << setw(3)
<< i+1 << ": ";
for (int j = 0; j < dayints[i]; j++)
{
outStream << graphChar;
}
outStream << endl;
}
}
int ReadData(istream &inStream, int daysArray[], int maxDays)
{
int i = 0;
while ( (inStream >> daysArray[i]) && (i < maxDays))
{
i++;
}
return i;
}
|
ce02a8e7a8aedcdc081cb1a911e064e977c273a1
|
cbaaa3b84b6b993a25dea3f1ac4fa432a5e4ff39
|
/GeneratorParam/GeneratorParamMUONlib.cxx
|
f78f9ea0f88ea23bfed0a53e3704cee2f7603e0c
|
[] |
no_license
|
AliceO2Group/AEGIS
|
e441e188848165bdc1f6c9a2bc8658cb0e052e74
|
53ec5c489db7c972b874490200775547b763396c
|
refs/heads/master
| 2023-06-08T20:38:56.813388
| 2023-06-06T12:31:21
| 2023-06-06T12:31:21
| 181,861,037
| 1
| 8
| null | 2023-03-28T14:15:31
| 2019-04-17T09:36:27
|
C++
|
UTF-8
|
C++
| false
| false
| 151,797
|
cxx
|
GeneratorParamMUONlib.cxx
|
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//
// Realisation of GenerarorParamLibBase for muon studies
//
#include "TDatabasePDG.h"
#include "TMath.h"
#include "TRandom.h"
#include "GeneratorParamMUONlib.h"
ClassImp(GeneratorParamMUONlib)
//
// Pions
Double_t GeneratorParamMUONlib::PtPion(const Double_t *px,
const Double_t * /*dummy*/) {
//
// PT-PARAMETERIZATION CDF, PRL 61(88) 1819
// POWER LAW FOR PT > 500 MEV
// MT SCALING BELOW (T=160 MEV)
//
const Double_t kp0 = 1.3;
const Double_t kxn = 8.28;
const Double_t kxlim = 0.5;
const Double_t kt = 0.160;
const Double_t kxmpi = 0.139;
const Double_t kb = 1.;
Double_t y, y1, xmpi2, ynorm, a;
Double_t x = *px;
//
y1 = TMath::Power(kp0 / (kp0 + kxlim), kxn);
xmpi2 = kxmpi * kxmpi;
ynorm = kb * (TMath::Exp(-sqrt(kxlim * kxlim + xmpi2) / kt));
a = ynorm / y1;
if (x > kxlim)
y = a * TMath::Power(kp0 / (kp0 + x), kxn);
else
y = kb * TMath::Exp(-sqrt(x * x + xmpi2) / kt);
return y * x;
}
//
// y-distribution
//
Double_t GeneratorParamMUONlib::YPion(const Double_t *py,
const Double_t * /*dummy*/) {
// Pion y
Double_t y = TMath::Abs(*py);
/*
const Double_t ka = 7000.;
const Double_t kdy = 4.;
Double_t ex = y*y/(2*kdy*kdy);
return ka*TMath::Exp(-ex);
*/
return 1.16526e+04 + y * -3.79886e+03 + y * y * 4.31130e+02;
}
// particle composition
//
Int_t GeneratorParamMUONlib::IpPion(TRandom *ran) {
// Pion composition
if (ran->Rndm() < 0.5) {
return 211;
} else {
return -211;
}
}
//____________________________________________________________
//
// Mt-scaling
Double_t GeneratorParamMUONlib::PtScal(Double_t pt, Int_t np) {
// SCALING EN MASSE PAR RAPPORT A PTPI
// MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
const Double_t khm[10] = {.13957, .493, .5488, .769, .7826,
.958, 1.02, 0, 0, 0};
// VALUE MESON/PI AT 5 GEV
const Double_t kfmax[10] = {1., 0.3, 0.55, 1.0, 1.0, 1.0, 1.0, 0, 0, 0};
np--;
Double_t f5 = TMath::Power(
((sqrt(100.018215) + 2.) / (sqrt(100. + khm[np] * khm[np]) + 2.0)), 12.3);
Double_t fmax2 = f5 / kfmax[np];
// PIONS
Double_t ptpion = 100. * PtPion(&pt, (Double_t *)0);
Double_t fmtscal = TMath::Power(((sqrt(pt * pt + 0.018215) + 2.) /
(sqrt(pt * pt + khm[np] * khm[np]) + 2.0)),
12.3) /
fmax2;
return fmtscal * ptpion;
}
//
// kaon
//
// pt-distribution
//____________________________________________________________
Double_t GeneratorParamMUONlib::PtKaon(const Double_t *px,
const Double_t * /*dummy*/) {
// Kaon pT
return PtScal(*px, 2);
}
// y-distribution
//____________________________________________________________
Double_t GeneratorParamMUONlib::YKaon(const Double_t *py,
const Double_t * /*dummy*/) {
// Kaon y
Double_t y = TMath::Abs(*py);
/*
const Double_t ka = 1000.;
const Double_t kdy = 4.;
//
Double_t ex = y*y/(2*kdy*kdy);
return ka*TMath::Exp(-ex);
*/
return 1.16526e+04 + y * -3.79886e+03 + y * y * 4.31130e+02;
}
// particle composition
//
Int_t GeneratorParamMUONlib::IpKaon(TRandom *ran) {
// Kaon composition
if (ran->Rndm() < 0.5) {
return 321;
} else {
return -321;
}
}
// J/Psi
//
//
// pt-distribution
//____________________________________________________________
Double_t GeneratorParamMUONlib::PtJpsiPPdummy(Double_t x, Double_t energy) {
// J/Psi pT
// pp
// from the fit of RHIC, CDF & LHC data, see arXiv:1103.2394
//
const Double_t kpt0 = 1.04 * TMath::Power(energy, 0.101);
const Double_t kxn = 3.9;
//
Double_t pass1 = 1. + 0.363 * (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtJpsiPP7000(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
// pp 7 TeV
//
return PtJpsiPPdummy(*px, 7000);
}
Double_t GeneratorParamMUONlib::PtJpsiPP8000(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
// pp 7 TeV
//
return PtJpsiPPdummy(*px, 8000);
}
Double_t GeneratorParamMUONlib::PtJpsiPP2760(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
// pp 2.76 TeV
//
return PtJpsiPPdummy(*px, 2760);
}
Double_t GeneratorParamMUONlib::PtJpsiPP4400(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
// pp 4.4 TeV
//
return PtJpsiPPdummy(*px, 4400);
}
Double_t GeneratorParamMUONlib::PtJpsiPP5030(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
// pp 5.03 TeV
//
return PtJpsiPPdummy(*px, 5030);
}
Double_t GeneratorParamMUONlib::PtJpsiPP8800(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
// pp 8.8 TeV
//
return PtJpsiPPdummy(*px, 8800);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760ShFdummy(Double_t x, Int_t n) {
// J/Psi shadowing factor vs pT for PbPb min. bias and 11 centr. bins
// (in 2.5<y<4)
//
// PbPb 2.76 TeV, for EKS98, minimum bias shadowing factor = 0.66 in 4pi
// S.Grigoryan, details presented at the PWG3-Muon meeting (05.10.2011)
// https://indico.cern.ch/conferenceDisplay.py?confId=157367
//
const Double_t f1[12] = {1, 1.128, 1.097, 1.037, 0.937, 0.821,
0.693, 0.558, 0.428, 0.317, 0.231, 0.156};
const Double_t f2[12] = {1, 1.313, 1.202, 1.039, 0.814, 0.593,
0.391, 0.224, 0.106, 0.041, 0.013, 0.002};
const Double_t c1[7] = {1.6077e+00, 7.6300e-02, -7.1880e-03, 3.4067e-04,
-9.2776e-06, 1.5138e-07, 1.4652e-09};
const Double_t c2[7] = {6.2047e-01, 5.7653e-02, -4.1414e-03, 1.0301e-04,
9.6205e-07, -7.4098e-08, 5.0946e-09};
Double_t y1, y2;
Int_t j;
y1 = c1[j = 6];
y2 = c2[6];
while (j > 0) {
y1 = y1 * x + c1[--j];
y2 = y2 * x + c2[j];
}
y1 /= 1. + c1[6] * TMath::Power(x, 6);
y2 /= 1. + c2[6] * TMath::Power(x, 6);
//
y1 = 1 + (y1 - 2) * f1[n] + (y2 + 1 - y1) * f2[n];
if (y1 < 0)
y1 = 0;
return y1;
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, minimum bias 0-100 %
//
return PtJpsiPbPb2760ShFdummy(*px, 0) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c1(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 1st centrality bin 0-5 %
//
return PtJpsiPbPb2760ShFdummy(*px, 1) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c2(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 2nd centrality bin 5-10 %
//
return PtJpsiPbPb2760ShFdummy(*px, 2) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c3(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 3rd centrality bin 10-20 %
//
return PtJpsiPbPb2760ShFdummy(*px, 3) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c4(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 4th centrality bin 20-30 %
//
return PtJpsiPbPb2760ShFdummy(*px, 4) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c5(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 5th centrality bin 30-40 %
//
return PtJpsiPbPb2760ShFdummy(*px, 5) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c6(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 6th centrality bin 40-50 %
//
return PtJpsiPbPb2760ShFdummy(*px, 6) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c7(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 7th centrality bin 50-60 %
//
return PtJpsiPbPb2760ShFdummy(*px, 7) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c8(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 8th centrality bin 60-70 %
//
return PtJpsiPbPb2760ShFdummy(*px, 8) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c9(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 9th centrality bin 70-80 %
//
return PtJpsiPbPb2760ShFdummy(*px, 9) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c10(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 10th centrality bin 80-90 %
//
return PtJpsiPbPb2760ShFdummy(*px, 10) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb2760c11(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// PbPb 2.76 TeV, 11th centrality bin 90-100 %
//
return PtJpsiPbPb2760ShFdummy(*px, 11) * PtJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPPb5030ShFdummy(Double_t x, Int_t n) {
// J/Psi shadowing factor vs pT for pPb min. bias and 4 centr. bins
// (in 2.5<y<4)
//
// pPb 5.03 TeV, for EPS09-LO, minimum bias shadowing factor = 0.81 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[7] = {6.675e-01, 1.808e-02, 2.721e-03, -7.793e-04,
7.504e-05, -3.884e-06, 5.759e-07};
Double_t y;
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
y /= 1 + c[6] * TMath::Power(x, 6);
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::PtJpsiPPb5030(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// pPb 5.03 TeV, minimum bias 0-100 %
//
return PtJpsiPPb5030ShFdummy(*px, 0) * PtJpsiPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPPb5030c1(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// pPb 5.03 TeV, 1st centrality bin 0-20 %
//
return PtJpsiPPb5030ShFdummy(*px, 1) * PtJpsiPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPPb5030c2(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// pPb 5.03 TeV, 2nd centrality bin 20-40 %
//
return PtJpsiPPb5030ShFdummy(*px, 2) * PtJpsiPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPPb5030c3(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// pPb 5.03 TeV, 3rd centrality bin 40-60 %
//
return PtJpsiPPb5030ShFdummy(*px, 3) * PtJpsiPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPPb5030c4(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// pPb 5.03 TeV, 4th centrality bin 60-100 %
//
return PtJpsiPPb5030ShFdummy(*px, 4) * PtJpsiPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbP5030ShFdummy(Double_t x, Int_t n) {
// J/Psi shadowing factor vs pT for Pbp min. bias and 4 centr. bins
// (in 2.5<y<4)
//
// Pbp 5.03 TeV, for EPS09-LO, minimum bias shadowing factor = 0.81 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[7] = {8.966e-01, 3.498e-02, 6.637e-03, -1.765e-03,
1.240e-04, -2.086e-06, 4.062e-07};
Double_t y;
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
y /= 1 + c[6] * TMath::Power(x, 6);
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::PtJpsiPbP5030(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// Pbp 5.03 TeV, minimum bias 0-100 %
//
return PtJpsiPbP5030ShFdummy(*px, 0) * PtJpsiPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbP5030c1(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// Pbp 5.03 TeV, 1st centrality bin 0-20 %
//
return PtJpsiPbP5030ShFdummy(*px, 1) * PtJpsiPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbP5030c2(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// Pbp 5.03 TeV, 2nd centrality bin 20-40 %
//
return PtJpsiPbP5030ShFdummy(*px, 2) * PtJpsiPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbP5030c3(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// Pbp 5.03 TeV, 3rd centrality bin 40-60 %
//
return PtJpsiPbP5030ShFdummy(*px, 3) * PtJpsiPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbP5030c4(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// Pbp 5.03 TeV, 4th centrality bin 60-100 %
//
return PtJpsiPbP5030ShFdummy(*px, 4) * PtJpsiPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPPb8800ShFdummy(Double_t x, Int_t n) {
// J/Psi shadowing factor vs pT for pPb min. bias and 4 centr. bins
// (in 2.5<y<4)
//
// pPb 8.8 TeV, for EKS98, minimum bias shadowing factor = 0.78 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[7] = {6.4922e-01, 6.4857e-03, 4.7268e-03, -9.5075e-04,
8.4075e-05, -4.2006e-06, 4.9970e-07};
Double_t y;
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
y /= 1 + c[6] * TMath::Power(x, 6);
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::PtJpsiPPb8800(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// pPb 8.8 TeV, minimum bias 0-100 %
//
return PtJpsiPPb8800ShFdummy(*px, 0) * PtJpsiPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPPb8800c1(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// pPb 8.8 TeV, 1st centrality bin 0-20 %
//
return PtJpsiPPb8800ShFdummy(*px, 1) * PtJpsiPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPPb8800c2(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// pPb 8.8 TeV, 2nd centrality bin 20-40 %
//
return PtJpsiPPb8800ShFdummy(*px, 2) * PtJpsiPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPPb8800c3(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// pPb 8.8 TeV, 3rd centrality bin 40-60 %
//
return PtJpsiPPb8800ShFdummy(*px, 3) * PtJpsiPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPPb8800c4(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// pPb 8.8 TeV, 4th centrality bin 60-100 %
//
return PtJpsiPPb8800ShFdummy(*px, 4) * PtJpsiPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbP8800ShFdummy(Double_t x, Int_t n) {
// J/Psi shadowing factor vs pT for Pbp min. bias and 4 centr. bins
// (in 2.5<y<4)
//
// Pbp 8.8 TeV, for EKS98, minimum bias shadowing factor = 0.78 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[7] = {8.7562e-01, 2.1944e-02, 7.8509e-03, -1.3979e-03,
3.8513e-05, 4.2008e-06, 1.7088e-06};
Double_t y;
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
y /= 1 + c[6] * TMath::Power(x, 6);
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::PtJpsiPbP8800(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// Pbp 8.8 TeV, minimum bias 0-100 %
//
return PtJpsiPbP8800ShFdummy(*px, 0) * PtJpsiPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbP8800c1(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// Pbp 8.8 TeV, 1st centrality bin 0-20 %
//
return PtJpsiPbP8800ShFdummy(*px, 1) * PtJpsiPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbP8800c2(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// Pbp 8.8 TeV, 2nd centrality bin 20-40 %
//
return PtJpsiPbP8800ShFdummy(*px, 2) * PtJpsiPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbP8800c3(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// Pbp 8.8 TeV, 3rd centrality bin 40-60 %
//
return PtJpsiPbP8800ShFdummy(*px, 3) * PtJpsiPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiPbP8800c4(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
// Pbp 8.8 TeV, 4th centrality bin 60-100 %
//
return PtJpsiPbP8800ShFdummy(*px, 4) * PtJpsiPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsi(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
const Double_t kpt0 = 4.;
const Double_t kxn = 3.6;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtJpsiCDFscaled(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
//
// PbPb 5.5 TeV
// scaled from CDF data at 2 TeV
// see S.Grigoryan, PWG3 Meeting, 27th Oct 2008
const Double_t kpt0 = 5.100;
const Double_t kxn = 4.102;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtJpsiCDFscaledPP(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
//
// pp 14 TeV
// scaled from CDF data at 2 TeV
const Double_t kpt0 = 5.630;
const Double_t kxn = 4.071;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t
GeneratorParamMUONlib::PtJpsiCDFscaledPP10(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
//
// pp 10 TeV
// scaled from CDF data at 2 TeV
const Double_t kpt0 = 5.334;
const Double_t kxn = 4.071;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtJpsiCDFscaledPP9(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
//
// pp 8.8 TeV
// scaled from CDF data at 2 TeV
//
const Double_t kpt0 = 5.245;
const Double_t kxn = 4.071;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtJpsiCDFscaledPP7(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
//
// pp 7 TeV
// scaled from CDF data at 2 TeV
const Double_t kpt0 = 5.072;
const Double_t kxn = 4.071;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtJpsiCDFscaledPP4(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
//
// pp 3.94 TeV
// scaled from CDF data at 2 TeV
//
const Double_t kpt0 = 4.647;
const Double_t kxn = 4.071;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtJpsiCDFscaledPP3(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
//
// pp 2.76 TeV
// scaled from CDF data at 1.9 TeV
//
const Double_t kpt0 = 4.435;
const Double_t kxn = 4.071;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtJpsiCDFscaledPP2(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT
//
// pp 1.96 TeV
// fit of the CDF data at 1.96 TeV
//
const Double_t kpt0 = 4.233;
const Double_t kxn = 4.071;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtJpsiCDFscaledPPb9(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
//
// pPb 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.79
//
Double_t c[5] = {6.42774e-01, 1.86168e-02, -6.77296e-04, 8.93512e-06,
1.31586e-07};
Double_t x = *px;
Double_t y;
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
//
Double_t d = 1. + c[4] * TMath::Power(x, 4);
return y / d * GeneratorParamMUONlib::PtJpsiCDFscaledPP9(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiCDFscaledPbP9(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
//
// Pbp 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.79
//
Double_t c[5] = {8.58557e-01, 5.39791e-02, -4.75180e-03, 2.49463e-04,
5.52396e-05};
Double_t x = *px;
Double_t y;
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
//
Double_t d = 1. + c[4] * TMath::Power(x, 4);
return y / d * GeneratorParamMUONlib::PtJpsiCDFscaledPP9(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiCDFscaledPbPb4(const Double_t *px,
const Double_t *dummy) {
// J/Psi pT
//
// PbPb 3.94 TeV, for EKS98 with minimum bias shadowing factor 0.66
//
Double_t c[5] = {6.01022e-01, 4.70988e-02, -2.27917e-03, 3.09885e-05,
1.31955e-06};
Double_t x = *px;
Double_t y;
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
//
Double_t d = 1. + c[4] * TMath::Power(x, 4);
return y / d * GeneratorParamMUONlib::PtJpsiCDFscaledPP4(px, dummy);
}
Double_t GeneratorParamMUONlib::PtJpsiFlat(const Double_t * /*px*/,
const Double_t * /*dummy*/) {
return 1.;
}
Double_t GeneratorParamMUONlib::PtJpsiPbPb(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT spectrum
//
// R. Vogt 2002
// PbPb 5.5 TeV
// MRST HO
// mc = 1.4 GeV, pt-kick 1 GeV
//
Float_t x = px[0];
Float_t c[8] = {-2.13098e+00, 9.46552e+00, -5.06799e+00, 1.27260e+00,
-1.83806e-01, 1.55853e-02, -7.23241e-04, 1.42105e-05};
Double_t y;
if (x < 10.) {
Int_t j;
y = c[j = 7];
while (j > 0)
y = y * x + c[--j];
y = x * TMath::Exp(y);
} else {
y = 0.;
}
return y;
}
Double_t GeneratorParamMUONlib::PtJpsiBPbPb(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT spectrum
// B -> J/Psi X
Double_t x0 = 4.0384;
Double_t n = 3.0288;
Double_t x = px[0];
Double_t y = x / TMath::Power((1. + (x / x0) * (x / x0)), n);
return y;
}
Double_t GeneratorParamMUONlib::PtJpsiPP(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi pT spectrum
//
// R. Vogt 2002
// pp 14 TeV
// MRST HO
// mc = 1.4 GeV, pt-kick 1 GeV
//
Float_t x = px[0];
Float_t c[4] = {8.47471e+00, -1.93567e+00, 1.50271e-01, -5.51212e-03};
Double_t y;
if (x < 10.) {
Int_t j;
y = c[j = 3];
while (j > 0)
y = y * x + c[--j];
y = x * TMath::Exp(y);
} else {
y = 0.;
}
return y;
}
//
// y-distribution
//____________________________________________________________
Double_t GeneratorParamMUONlib::YJpsiPPdummy(Double_t x, Double_t energy) {
// J/Psi y
// pp
// from the fit of RHIC + LHC data, see arXiv:1103.2394
//
x = x / TMath::Log(energy / 3.097);
x = x * x;
Double_t y = TMath::Exp(-x / 0.4 / 0.4 / 2);
if (x > 1)
y = 0;
return y;
}
Double_t GeneratorParamMUONlib::YJpsiPPpoly(Double_t x, Double_t energy) {
// J/Psi y
// pp
// from the fit of RHIC + LHC data, see arXiv:1103.2394
//
x = x / TMath::Log(energy / 3.097);
x = x * x;
Double_t y = 1 - 6.9 * x * x;
if (y < 0)
y = 0;
return y;
}
Double_t GeneratorParamMUONlib::YJpsiPP7000(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pp 7 TeV
//
return YJpsiPPdummy(*px, 7000);
}
Double_t GeneratorParamMUONlib::YJpsiPP8000(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pp 7 TeV
//
return YJpsiPPdummy(*px, 8000);
}
Double_t GeneratorParamMUONlib::YJpsiPP2760(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pp 2.76 TeV
//
return YJpsiPPdummy(*px, 2760);
}
Double_t GeneratorParamMUONlib::YJpsiPP4400(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pp 4.4 TeV
//
return YJpsiPPdummy(*px, 4400);
}
Double_t GeneratorParamMUONlib::YJpsiPP5030(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pp 5.03 TeV
//
return YJpsiPPdummy(*px, 5030);
}
Double_t GeneratorParamMUONlib::YJpsiPP8800(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pp 8.8 TeV
//
return YJpsiPPdummy(*px, 8800);
}
Double_t GeneratorParamMUONlib::YJpsiPPpoly7000(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pp 7 TeV
//
return YJpsiPPpoly(*px, 7000);
}
Double_t GeneratorParamMUONlib::YJpsiPPpoly2760(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pp 2.76 TeV
//
return YJpsiPPpoly(*px, 2760);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760ShFdummy(Double_t x, Int_t n) {
// J/Psi shadowing factor vs y for PbPb min. bias and 11 centr. bins
//
// PbPb 2.76 TeV, for EKS98, minimum bias shadowing factor = 0.66 in 4pi
//
const Double_t f1[12] = {1, 1.128, 1.097, 1.037, 0.937, 0.821,
0.693, 0.558, 0.428, 0.317, 0.231, 0.156};
const Double_t f2[12] = {1, 1.313, 1.202, 1.039, 0.814, 0.593,
0.391, 0.224, 0.106, 0.041, 0.013, 0.002};
const Double_t c1[5] = {1.5591e+00, 7.5827e-03, 2.0676e-03, -1.1717e-04,
1.5237e-06};
const Double_t c2[5] = {6.0861e-01, 4.8854e-03, 1.3685e-03, -7.9182e-05,
1.0475e-06};
x = x * x;
Double_t y1, y2;
Int_t j;
y1 = c1[j = 4];
y2 = c2[4];
while (j > 0) {
y1 = y1 * x + c1[--j];
y2 = y2 * x + c2[j];
}
y1 = 1 + (y1 - 2) * f1[n] + (y2 + 1 - y1) * f2[n];
if (y1 < 0)
y1 = 0;
return y1;
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, minimum bias 0-100 %
//
return YJpsiPbPb2760ShFdummy(*px, 0) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c1(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 1st centrality bin 0-5 %
//
return YJpsiPbPb2760ShFdummy(*px, 1) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c2(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 2nd centrality bin 5-10 %
//
return YJpsiPbPb2760ShFdummy(*px, 2) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c3(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 3rd centrality bin 10-20 %
//
return YJpsiPbPb2760ShFdummy(*px, 3) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c4(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 4th centrality bin 20-30 %
//
return YJpsiPbPb2760ShFdummy(*px, 4) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c5(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 5th centrality bin 30-40 %
//
return YJpsiPbPb2760ShFdummy(*px, 5) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c6(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 6th centrality bin 40-50 %
//
return YJpsiPbPb2760ShFdummy(*px, 6) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c7(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 7th centrality bin 50-60 %
//
return YJpsiPbPb2760ShFdummy(*px, 7) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c8(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 8th centrality bin 60-70 %
//
return YJpsiPbPb2760ShFdummy(*px, 8) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c9(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 9th centrality bin 70-80 %
//
return YJpsiPbPb2760ShFdummy(*px, 9) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c10(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 10th centrality bin 80-90 %
//
return YJpsiPbPb2760ShFdummy(*px, 10) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPbPb2760c11(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
// PbPb 2.76 TeV, 11th centrality bin 90-100 %
//
return YJpsiPbPb2760ShFdummy(*px, 11) * YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiPP5030dummy(Double_t px) {
return GeneratorParamMUONlib::YJpsiPP5030(&px, (Double_t *)0);
}
Double_t GeneratorParamMUONlib::YJpsiPPb5030ShFdummy(Double_t x, Int_t n) {
// J/Psi shadowing factor vs y for pPb min. bias and 4 centr. bins
//
// pPb 5.03 TeV, for EPS09-LO, minimum bias shadowing factor = 0.81 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[7] = {7.641e-01, 1.611e-02, 4.109e-03, 2.818e-03,
3.359e-04, -6.376e-05, -9.717e-06};
Double_t y;
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
if (y < 0)
y = 0;
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::YJpsiPPb5030(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pPb 5.03 TeV, minimum bias 0-100 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YJpsiPPb5030ShFdummy(x, 0) * YJpsiPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPPb5030c1(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pPb 5.03 TeV, 1st centrality bin 0-20 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YJpsiPPb5030ShFdummy(x, 1) * YJpsiPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPPb5030c2(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pPb 5.03 TeV, 2nd centrality bin 20-40 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YJpsiPPb5030ShFdummy(x, 2) * YJpsiPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPPb5030c3(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pPb 5.03 TeV, 3rd centrality bin 40-60 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YJpsiPPb5030ShFdummy(x, 3) * YJpsiPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPPb5030c4(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pPb 5.03 TeV, 4th centrality bin 60-100 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YJpsiPPb5030ShFdummy(x, 4) * YJpsiPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPbP5030(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// Pbp 5.03 TeV, minimum bias 0-100 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YJpsiPPb5030ShFdummy(x, 0) * YJpsiPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPbP5030c1(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// Pbp 5.03 TeV, 1st centrality bin 0-20 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YJpsiPPb5030ShFdummy(x, 1) * YJpsiPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPbP5030c2(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// Pbp 5.03 TeV, 2nd centrality bin 20-40 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YJpsiPPb5030ShFdummy(x, 2) * YJpsiPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPbP5030c3(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// Pbp 5.03 TeV, 3rd centrality bin 40-60 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YJpsiPPb5030ShFdummy(x, 3) * YJpsiPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPbP5030c4(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// Pbp 5.03 TeV, 4th centrality bin 60-100 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YJpsiPPb5030ShFdummy(x, 4) * YJpsiPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPP8800dummy(Double_t px) {
return GeneratorParamMUONlib::YJpsiPP8800(&px, (Double_t *)0);
}
Double_t GeneratorParamMUONlib::YJpsiPPb8800ShFdummy(Double_t x, Int_t n) {
// J/Psi shadowing factor vs y for pPb min. bias and 4 centr. bins
//
// pPb 8.8 TeV, for EKS98, minimum bias shadowing factor = 0.78 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[7] = {7.4372e-01, 2.3299e-02, 2.8678e-03, 1.9595e-03,
3.2849e-04, -4.0547e-05, -7.9732e-06};
Double_t y;
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
if (y < 0)
y = 0;
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::YJpsiPPb8800(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pPb 8.8 TeV, minimum bias 0-100 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YJpsiPPb8800ShFdummy(x, 0) * YJpsiPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPPb8800c1(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pPb 8.8 TeV, 1st centrality bin 0-20 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YJpsiPPb8800ShFdummy(x, 1) * YJpsiPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPPb8800c2(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pPb 8.8 TeV, 2nd centrality bin 20-40 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YJpsiPPb8800ShFdummy(x, 2) * YJpsiPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPPb8800c3(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pPb 8.8 TeV, 3rd centrality bin 40-60 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YJpsiPPb8800ShFdummy(x, 3) * YJpsiPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPPb8800c4(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pPb 8.8 TeV, 4th centrality bin 60-100 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YJpsiPPb8800ShFdummy(x, 4) * YJpsiPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPbP8800(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// Pbp 8.8 TeV, minimum bias 0-100 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YJpsiPPb8800ShFdummy(x, 0) * YJpsiPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPbP8800c1(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// Pbp 8.8 TeV, 1st centrality bin 0-20 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YJpsiPPb8800ShFdummy(x, 1) * YJpsiPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPbP8800c2(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// Pbp 8.8 TeV, 2nd centrality bin 20-40 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YJpsiPPb8800ShFdummy(x, 2) * YJpsiPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPbP8800c3(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// Pbp 8.8 TeV, 3rd centrality bin 40-60 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YJpsiPPb8800ShFdummy(x, 3) * YJpsiPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiPbP8800c4(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// Pbp 8.8 TeV, 4th centrality bin 60-100 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YJpsiPPb8800ShFdummy(x, 4) * YJpsiPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsi(const Double_t *py,
const Double_t * /*dummy*/) {
// J/psi y
const Double_t ky0 = 4.;
const Double_t kb = 1.;
Double_t yj;
Double_t y = TMath::Abs(*py);
//
if (y < ky0)
yj = kb;
else
yj = kb * TMath::Exp(-(y - ky0) * (y - ky0) / 2);
return yj;
}
Double_t GeneratorParamMUONlib::YJpsiFlat(const Double_t * /*py*/,
const Double_t * /*dummy*/) {
return 1.;
}
Double_t GeneratorParamMUONlib::YJpsiPbPb(const Double_t *px,
const Double_t * /*dummy*/) {
//
// J/Psi y
//
//
// R. Vogt 2002
// PbPb 5.5 TeV
// MRST HO
// mc = 1.4 GeV, pt-kick 1 GeV
//
Double_t c[5] = {-6.03425e+02, 4.98257e+02, -1.38794e+02, 1.62209e+01,
-6.85955e-01};
Double_t x = TMath::Abs(px[0]);
Double_t y;
if (x < 4.) {
y = 31.754;
} else if (x < 6) {
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
} else {
y = 0.;
}
return y;
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaled(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
return GeneratorParamMUONlib::YJpsiPbPb(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPP(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
return GeneratorParamMUONlib::YJpsiPP(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPP10(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
//
// pp 10 TeV
// scaled from YJpsiPP(14 TeV) using 10 TeV / 14 TeV ratio of y-spectra in LO
// pQCD. see S.Grigoryan, PWG3 Meeting, 27th Oct 2008
//
Double_t c[5] = {2.46681e+01, 8.91486e+01, -3.21227e+01, 3.63075e+00,
-1.32047e-01};
Double_t x = TMath::Abs(px[0]);
Double_t y;
if (x < 3.2) {
y = 98.523 - 1.3664 * x * x;
} else if (x < 7.5) {
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
} else {
y = 0.;
}
if (y < 0)
y = 0;
return y;
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPP9(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
//
// pp 8.8 TeV
// rescaling of YJpsiPP(14 TeV) using 8.8 TeV / 14 TeV ratio of y-spectra in
// LO QCD
//
Double_t c[5] = {3.33882e+02, -1.30980e+02, 2.59082e+01, -3.08935e+00,
1.56375e-01};
Double_t x = TMath::Abs(px[0]);
Double_t y;
if (x < 3.7) {
y = 99.236 - 1.5498 * x * x;
} else if (x < 7.4) {
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
} else {
y = 0.;
}
if (y < 0)
y = 0;
return y;
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPP9dummy(Double_t px) {
return GeneratorParamMUONlib::YJpsiCDFscaledPP9(&px, (Double_t *)0);
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPP7(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
//
// pp 7 TeV
// scaled from YJpsiPP(14 TeV) using 7 TeV / 14 TeV ratio of y-spectra in LO
// pQCD.
//
Double_t c[5] = {6.71181e+02, -3.69240e+02, 8.89644e+01, -1.04937e+01,
4.80959e-01};
Double_t x = TMath::Abs(px[0]);
Double_t y;
if (x < 4.0) {
y = 100.78 - 1.8353 * x * x;
} else if (x < 7.3) {
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
} else {
y = 0.;
}
if (y < 0)
y = 0;
return y;
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPP4(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
//
// pp 3.94 TeV
// rescaling of YJpsiPP(14 TeV) using 3.94 TeV / 14 TeV ratio of y-spectra in
// LO QCD
//
Double_t c[5] = {4.00785e+02, -1.41159e+01, -3.28599e+01, 5.53048e+00,
-2.45151e-01};
Double_t x = TMath::Abs(px[0]);
Double_t y;
if (x < 5.5) {
y = 107.389 - 2.7454 * x * x;
} else if (x < 7.0) {
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
} else {
y = 0.;
}
if (y < 0)
y = 0;
return y;
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPP3(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
return GeneratorParamMUONlib::YJpsiPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPP2(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
// pp 1.96 TeV
//
return YJpsiPPdummy(*px, 1960);
}
Double_t GeneratorParamMUONlib::YJpsiPP(const Double_t *px,
const Double_t * /*dummy*/) {
//
// J/Psi y
//
//
// R. Vogt 2002
// pp 14 TeV
// MRST HO
// mc = 1.4 GeV, pt-kick 1 GeV
//
Double_t c[5] = {1.38532e+00, 1.00596e+02, -3.46378e+01, 3.94172e+00,
-1.48319e-01};
Double_t x = TMath::Abs(px[0]);
Double_t y;
if (x < 2.5) {
y = 96.455 - 0.8483 * x * x;
} else if (x < 7.9) {
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
} else {
y = 0.;
}
return y;
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPPb9(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
//
// pPb 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.79
//
Double_t c[7] = {7.52296e-01, 2.49917e-02, 3.36500e-03, 1.91187e-03,
2.92154e-04, -4.16509e-05, -7.62709e-06};
Double_t y;
Double_t x = px[0] + 0.47; // rapidity shift
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
if (y < 0)
y = 0;
return y * GeneratorParamMUONlib::YJpsiCDFscaledPP9dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPbP9(const Double_t *px,
const Double_t * /*dummy*/) {
// J/Psi y
//
// Pbp 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.79
//
Double_t c[7] = {7.52296e-01, 2.49917e-02, 3.36500e-03, 1.91187e-03,
2.92154e-04, -4.16509e-05, -7.62709e-06};
Double_t y;
Double_t x = -px[0] + 0.47; // rapidity shift
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
if (y < 0)
y = 0;
return y * GeneratorParamMUONlib::YJpsiCDFscaledPP9dummy(x);
}
Double_t GeneratorParamMUONlib::YJpsiCDFscaledPbPb4(const Double_t *px,
const Double_t *dummy) {
// J/Psi y
//
// PbPb 3.94 TeV, for EKS98 with minimum bias shadowing factor 0.66
//
Double_t c[4] = {5.95228e-01, 9.45069e-03, 2.44710e-04, -1.32894e-05};
Double_t x = px[0] * px[0];
Double_t y;
Int_t j;
y = c[j = 3];
while (j > 0)
y = y * x + c[--j];
if (y < 0)
y = 0;
return y * GeneratorParamMUONlib::YJpsiCDFscaledPP4(px, dummy);
}
Double_t GeneratorParamMUONlib::YJpsiBPbPb(const Double_t *px,
const Double_t * /*dummy*/) {
//
// J/Psi from B->J/Psi X
//
//
Double_t c[7] = {7.37025e-02, 0., -2.94487e-03, 0.,
6.07953e-06, 0., 5.39219e-07};
Double_t x = TMath::Abs(px[0]);
Double_t y;
if (x > 6.) {
y = 0.;
} else {
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
}
return y;
}
// particle composition
//
Int_t GeneratorParamMUONlib::IpJpsi(TRandom *) {
// J/Psi composition
return 443;
}
Int_t GeneratorParamMUONlib::IpPsiP(TRandom *) {
// Psi prime composition
return 100443;
}
Int_t GeneratorParamMUONlib::IpJpsiFamily(TRandom *) {
// J/Psi composition
Int_t ip;
Float_t r = gRandom->Rndm();
if (r < 0.98) {
ip = 443;
} else {
ip = 100443;
}
return ip;
}
// Upsilon
//
//
// pt-distribution
//____________________________________________________________
Double_t GeneratorParamMUONlib::PtUpsilonPPdummy(Double_t x, Double_t energy) {
// Upsilon pT
// pp
// from the fit of CDF & LHC data, like for J/Psi in arXiv:1103.2394
//
const Double_t kpt0 = 1.96 * TMath::Power(energy, 0.095);
const Double_t kxn = 3.4;
//
Double_t pass1 = 1. + 0.471 * (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtUpsilonPP7000(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
// pp 7 TeV
//
return PtUpsilonPPdummy(*px, 7000);
}
Double_t GeneratorParamMUONlib::PtUpsilonPP8000(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
// pp 8 TeV
//
return PtUpsilonPPdummy(*px, 8000);
}
Double_t GeneratorParamMUONlib::PtUpsilonPP2760(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
// pp 2.76 TeV
//
return PtUpsilonPPdummy(*px, 2760);
}
Double_t GeneratorParamMUONlib::PtUpsilonPP4400(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
// pp 4.4 TeV
//
return PtUpsilonPPdummy(*px, 4400);
}
Double_t GeneratorParamMUONlib::PtUpsilonPP5030(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
// pp 5.03 TeV
//
return PtUpsilonPPdummy(*px, 5030);
}
Double_t GeneratorParamMUONlib::PtUpsilonPP8800(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
// pp 8.8 TeV
//
return PtUpsilonPPdummy(*px, 8800);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760ShFdummy(Double_t x, Int_t n) {
// Usilon shadowing factor vs pT for PbPb min. bias and 11 centr. bins
// (in 2.5<y<4)
//
// PbPb 2.76 TeV, for EKS98, minimum bias shadowing factor = 0.87 in 4pi
//
const Double_t f1[12] = {1, 1.128, 1.097, 1.037, 0.937, 0.821,
0.693, 0.558, 0.428, 0.317, 0.231, 0.156};
const Double_t f2[12] = {1, 1.313, 1.202, 1.039, 0.814, 0.593,
0.391, 0.224, 0.106, 0.041, 0.013, 0.002};
const Double_t c1[7] = {1.9089e+00, 1.2969e-03, 8.9786e-05, -5.3062e-06,
-1.0046e-06, 6.1446e-08, 1.0885e-09};
const Double_t c2[7] = {8.8423e-01, -8.7488e-05, 5.9857e-04, -5.7959e-05,
2.0059e-06, -2.7343e-08, 6.6053e-10};
Double_t y1, y2;
Int_t j;
y1 = c1[j = 6];
y2 = c2[6];
while (j > 0) {
y1 = y1 * x + c1[--j];
y2 = y2 * x + c2[j];
}
y1 /= 1. + c1[6] * TMath::Power(x, 6);
y2 /= 1. + c2[6] * TMath::Power(x, 6);
//
y1 = 1 + (y1 - 2) * f1[n] + (y2 + 1 - y1) * f2[n];
if (y1 < 0)
y1 = 0;
return y1;
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, minimum bias 0-100 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 0) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c1(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 1st centrality bin 0-5 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 1) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c2(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 2nd centrality bin 5-10 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 2) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c3(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 3rd centrality bin 10-20 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 3) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c4(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 4th centrality bin 20-30 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 4) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c5(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 5th centrality bin 30-40 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 5) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c6(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 6th centrality bin 40-50 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 6) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c7(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 7th centrality bin 50-60 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 7) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c8(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 8th centrality bin 60-70 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 8) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c9(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 9th centrality bin 70-80 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 9) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c10(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 10th centrality bin 80-90 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 10) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb2760c11(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// PbPb 2.76 TeV, 11th centrality bin 90-100 %
//
return PtUpsilonPbPb2760ShFdummy(*px, 11) * PtUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb5030ShFdummy(Double_t x, Int_t n) {
// Upsilon shadowing factor vs pT for pPb min. bias and 4 centr. bins
// (in 2.5<y<4)
//
// pPb 5.03 TeV, for EPS09-LO, minimum bias shadowing factor = 0.92 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[5] = {8.069e-01, 1.407e-04, 4.372e-04, -2.797e-05,
4.405e-06};
Double_t y;
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
y /= 1 + c[4] * TMath::Power(x, 4);
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb5030(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// pPb 5.03 TeV, minimum bias 0-100 %
//
return PtUpsilonPPb5030ShFdummy(*px, 0) * PtUpsilonPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb5030c1(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// pPb 5.03 TeV, 1st centrality bin 0-20 %
//
return PtUpsilonPPb5030ShFdummy(*px, 1) * PtUpsilonPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb5030c2(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// pPb 5.03 TeV, 2nd centrality bin 20-40 %
//
return PtUpsilonPPb5030ShFdummy(*px, 2) * PtUpsilonPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb5030c3(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// pPb 5.03 TeV, 3rd centrality bin 40-60 %
//
return PtUpsilonPPb5030ShFdummy(*px, 3) * PtUpsilonPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb5030c4(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// pPb 5.03 TeV, 4th centrality bin 60-100 %
//
return PtUpsilonPPb5030ShFdummy(*px, 4) * PtUpsilonPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP5030ShFdummy(Double_t x, Int_t n) {
// Upsilon shadowing factor vs pT for Pbp min. bias and 4 centr. bins
// (in 2.5<y<4)
//
// Pbp 5.03 TeV, for EPS09-LO, minimum bias shadowing factor = 0.92 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[5] = {1.122, 2.565e-03, -3.025e-04, 4.113e-06, 6.140e-07};
Double_t y;
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
y /= 1 + c[4] * TMath::Power(x, 4);
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP5030(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// Pbp 5.03 TeV, minimum bias 0-100 %
//
return PtUpsilonPbP5030ShFdummy(*px, 0) * PtUpsilonPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP5030c1(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// Pbp 5.03 TeV, 1st centrality bin 0-20 %
//
return PtUpsilonPbP5030ShFdummy(*px, 1) * PtUpsilonPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP5030c2(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// Pbp 5.03 TeV, 2nd centrality bin 20-40 %
//
return PtUpsilonPbP5030ShFdummy(*px, 2) * PtUpsilonPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP5030c3(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// Pbp 5.03 TeV, 3rd centrality bin 40-60 %
//
return PtUpsilonPbP5030ShFdummy(*px, 3) * PtUpsilonPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP5030c4(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// Pbp 5.03 TeV, 4th centrality bin 60-100 %
//
return PtUpsilonPbP5030ShFdummy(*px, 4) * PtUpsilonPP5030(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb8800ShFdummy(Double_t x, Int_t n) {
// Upsilon shadowing factor vs pT for pPb min. bias and 4 centr. bins
// (in 2.5<y<4)
//
// pPb 8.8 TeV, for EKS98, minimum bias shadowing factor = 0.89 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[5] = {7.6561e-01, 1.1360e-04, 4.9596e-04, -3.0287e-05,
3.7555e-06};
Double_t y;
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
y /= 1 + c[4] * TMath::Power(x, 4);
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb8800(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// pPb 8.8 TeV, minimum bias 0-100 %
//
return PtUpsilonPPb8800ShFdummy(*px, 0) * PtUpsilonPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb8800c1(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// pPb 8.8 TeV, 1st centrality bin 0-20 %
//
return PtUpsilonPPb8800ShFdummy(*px, 1) * PtUpsilonPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb8800c2(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// pPb 8.8 TeV, 2nd centrality bin 20-40 %
//
return PtUpsilonPPb8800ShFdummy(*px, 2) * PtUpsilonPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb8800c3(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// pPb 8.8 TeV, 3rd centrality bin 40-60 %
//
return PtUpsilonPPb8800ShFdummy(*px, 3) * PtUpsilonPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPPb8800c4(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// pPb 8.8 TeV, 4th centrality bin 60-100 %
//
return PtUpsilonPPb8800ShFdummy(*px, 4) * PtUpsilonPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP8800ShFdummy(Double_t x, Int_t n) {
// Upsilon shadowing factor vs pT for Pbp min. bias and 4 centr. bins
// (in 2.5<y<4)
//
// Pbp 8.8 TeV, for EKS98, minimum bias shadowing factor = 0.89 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[5] = {1.0975, 3.1905e-03, -2.0477e-04, 8.5270e-06,
2.5343e-06};
Double_t y;
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
y /= 1 + c[4] * TMath::Power(x, 4);
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP8800(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// Pbp 8.8 TeV, minimum bias 0-100 %
//
return PtUpsilonPbP8800ShFdummy(*px, 0) * PtUpsilonPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP8800c1(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// Pbp 8.8 TeV, 1st centrality bin 0-20 %
//
return PtUpsilonPbP8800ShFdummy(*px, 1) * PtUpsilonPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP8800c2(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// Pbp 8.8 TeV, 2nd centrality bin 20-40 %
//
return PtUpsilonPbP8800ShFdummy(*px, 2) * PtUpsilonPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP8800c3(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// Pbp 8.8 TeV, 3rd centrality bin 40-60 %
//
return PtUpsilonPbP8800ShFdummy(*px, 3) * PtUpsilonPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonPbP8800c4(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
// Pbp 8.8 TeV, 4th centrality bin 60-100 %
//
return PtUpsilonPbP8800ShFdummy(*px, 4) * PtUpsilonPP8800(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilon(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
const Double_t kpt0 = 5.3;
const Double_t kxn = 2.5;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtUpsilonCDFscaled(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
const Double_t kpt0 = 7.753;
const Double_t kxn = 3.042;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t
GeneratorParamMUONlib::PtUpsilonCDFscaledPP(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
//
// pp 14 TeV
//
// scaled from CDF data at 2 TeV
const Double_t kpt0 = 8.610;
const Double_t kxn = 3.051;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t
GeneratorParamMUONlib::PtUpsilonCDFscaledPP10(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
//
// pp 10 TeV
//
// scaled from CDF data at 2 TeV
const Double_t kpt0 = 8.235;
const Double_t kxn = 3.051;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t
GeneratorParamMUONlib::PtUpsilonCDFscaledPP9(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
//
// pp 8.8 TeV
// scaled from CDF data at 2 TeV
//
const Double_t kpt0 = 8.048;
const Double_t kxn = 3.051;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t
GeneratorParamMUONlib::PtUpsilonCDFscaledPP7(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
//
// pp 7 TeV
//
// scaled from CDF data at 2 TeV
const Double_t kpt0 = 7.817;
const Double_t kxn = 3.051;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t
GeneratorParamMUONlib::PtUpsilonCDFscaledPP4(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon pT
//
// pp 3.94 TeV
// scaled from CDF data at 2 TeV
//
const Double_t kpt0 = 7.189;
const Double_t kxn = 3.051;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtUpsilonCDFscaledPPb9(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
//
// pPb 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.89
//
Double_t c[5] = {7.64952e-01, 1.12501e-04, 4.96038e-04, -3.03198e-05,
3.74035e-06};
Double_t x = *px;
Double_t y;
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
//
Double_t d = 1. + c[4] * TMath::Power(x, 4);
return y / d * GeneratorParamMUONlib::PtUpsilonCDFscaledPP9(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonCDFscaledPbP9(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
//
// Pbp 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.89
//
Double_t c[5] = {1.09881e+00, 3.08329e-03, -2.00356e-04, 8.28991e-06,
2.52576e-06};
Double_t x = *px;
Double_t y;
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
//
Double_t d = 1. + c[4] * TMath::Power(x, 4);
return y / d * GeneratorParamMUONlib::PtUpsilonCDFscaledPP9(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonCDFscaledPbPb4(const Double_t *px,
const Double_t *dummy) {
// Upsilon pT
//
// PbPb 3.94 TeV, for EKS98 with minimum bias shadowing factor 0.85
//
Double_t c[5] = {8.65872e-01, 2.05465e-03, 2.56063e-04, -1.65598e-05,
2.29209e-06};
Double_t x = *px;
Double_t y;
Int_t j;
y = c[j = 4];
while (j > 0)
y = y * x + c[--j];
//
Double_t d = 1. + c[4] * TMath::Power(x, 4);
return y / d * GeneratorParamMUONlib::PtUpsilonCDFscaledPP4(px, dummy);
}
Double_t GeneratorParamMUONlib::PtUpsilonFlat(const Double_t * /*px*/,
const Double_t * /*dummy*/) {
return 1.;
}
Double_t GeneratorParamMUONlib::PtUpsilonPbPb(const Double_t *px,
const Double_t * /*dummy*/) {
//
// Upsilon pT
//
//
// R. Vogt 2002
// PbPb 5.5 TeV
// MRST HO
// mc = 1.4 GeV, pt-kick 1 GeV
//
Float_t x = px[0];
Double_t c[8] = {-1.03488e+01, 1.28065e+01, -6.60500e+00, 1.66140e+00,
-2.34293e-01, 1.86925e-02, -7.80708e-04, 1.30610e-05};
Double_t y;
if (x < 10.) {
Int_t j;
y = c[j = 7];
while (j > 0)
y = y * x + c[--j];
y = x * TMath::Exp(y);
} else {
y = 0.;
}
return y;
}
Double_t GeneratorParamMUONlib::PtUpsilonPP(const Double_t *px,
const Double_t * /*dummy*/) {
//
// Upsilon pT
//
//
// R. Vogt 2002
// pp 14 TeV
// MRST HO
// mc = 1.4 GeV, pt-kick 1 GeV
//
Float_t x = px[0];
Double_t c[8] = {-7.93955e+00, 1.06306e+01, -5.21392e+00, 1.19703e+00,
-1.45718e-01, 8.95151e-03, -2.04806e-04, -1.13053e-06};
Double_t y;
if (x < 10.) {
Int_t j;
y = c[j = 7];
while (j > 0)
y = y * x + c[--j];
y = x * TMath::Exp(y);
} else {
y = 0.;
}
return y;
}
//
// y-distribution
//
//____________________________________________________________
Double_t GeneratorParamMUONlib::YUpsilonPPdummy(Double_t x, Double_t energy) {
// Upsilon y
// pp
// from the fit of CDF & LHC data, like for J/Psi in arXiv:1103.2394
//
x = x / TMath::Log(energy / 9.46);
x = x * x;
Double_t y = TMath::Exp(-x / 0.4 / 0.4 / 2);
if (x > 1)
y = 0;
return y;
}
Double_t GeneratorParamMUONlib::YUpsilonPPpoly(Double_t x, Double_t energy) {
// Upsilon y
// pp
// from the fit of CDF & LHC data, like for J/Psi in arXiv:1103.2394
//
x = x / TMath::Log(energy / 9.46);
x = x * x;
Double_t y = 1 - 6.9 * x * x;
if (y < 0)
y = 0;
return y;
}
Double_t GeneratorParamMUONlib::YUpsilonPP7000(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pp 7 TeV
//
return YUpsilonPPdummy(*px, 7000);
}
Double_t GeneratorParamMUONlib::YUpsilonPP8000(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pp 7 TeV
//
return YUpsilonPPdummy(*px, 8000);
}
Double_t GeneratorParamMUONlib::YUpsilonPP2760(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pp 2.76 TeV
//
return YUpsilonPPdummy(*px, 2760);
}
Double_t GeneratorParamMUONlib::YUpsilonPP4400(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pp 4.4 TeV
//
return YUpsilonPPdummy(*px, 4400);
}
Double_t GeneratorParamMUONlib::YUpsilonPP5030(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pp 5.03 TeV
//
return YUpsilonPPdummy(*px, 5030);
}
Double_t GeneratorParamMUONlib::YUpsilonPP8800(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pp 8.8 TeV
//
return YUpsilonPPdummy(*px, 8800);
}
Double_t GeneratorParamMUONlib::YUpsilonPPpoly7000(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pp 7 TeV
//
return YUpsilonPPpoly(*px, 7000);
}
Double_t GeneratorParamMUONlib::YUpsilonPPpoly2760(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pp 2.76 TeV
//
return YUpsilonPPpoly(*px, 2760);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760ShFdummy(Double_t x, Int_t n) {
// Upsilon shadowing factor vs y for PbPb min. bias and 11 centr. bins
//
// PbPb 2.76 TeV, for EKS98, minimum bias shadowing factor = 0.87 in 4pi
//
const Double_t f1[12] = {1, 1.128, 1.097, 1.037, 0.937, 0.821,
0.693, 0.558, 0.428, 0.317, 0.231, 0.156};
const Double_t f2[12] = {1, 1.313, 1.202, 1.039, 0.814, 0.593,
0.391, 0.224, 0.106, 0.041, 0.013, 0.002};
const Double_t c1[5] = {1.8547e+00, 1.6717e-02, -2.1285e-04, -9.7662e-05,
2.5768e-06};
const Double_t c2[5] = {8.6029e-01, 1.1742e-02, -2.7944e-04, -6.7973e-05,
1.8838e-06};
x = x * x;
Double_t y1, y2;
Int_t j;
y1 = c1[j = 4];
y2 = c2[4];
while (j > 0) {
y1 = y1 * x + c1[--j];
y2 = y2 * x + c2[j];
}
y1 = 1 + (y1 - 2) * f1[n] + (y2 + 1 - y1) * f2[n];
if (y1 < 0)
y1 = 0;
return y1;
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, minimum bias 0-100 %
//
return YUpsilonPbPb2760ShFdummy(*px, 0) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c1(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 1st centrality bin 0-5 %
//
return YUpsilonPbPb2760ShFdummy(*px, 1) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c2(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 2nd centrality bin 5-10 %
//
return YUpsilonPbPb2760ShFdummy(*px, 2) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c3(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 3rd centrality bin 10-20 %
//
return YUpsilonPbPb2760ShFdummy(*px, 3) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c4(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 4th centrality bin 20-30 %
//
return YUpsilonPbPb2760ShFdummy(*px, 4) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c5(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 5th centrality bin 30-40 %
//
return YUpsilonPbPb2760ShFdummy(*px, 5) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c6(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 6th centrality bin 40-50 %
//
return YUpsilonPbPb2760ShFdummy(*px, 6) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c7(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 7th centrality bin 50-60 %
//
return YUpsilonPbPb2760ShFdummy(*px, 7) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c8(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 8th centrality bin 60-70 %
//
return YUpsilonPbPb2760ShFdummy(*px, 8) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c9(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 9th centrality bin 70-80 %
//
return YUpsilonPbPb2760ShFdummy(*px, 9) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c10(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 10th centrality bin 80-90 %
//
return YUpsilonPbPb2760ShFdummy(*px, 10) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb2760c11(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
// PbPb 2.76 TeV, 11th centrality bin 90-100 %
//
return YUpsilonPbPb2760ShFdummy(*px, 11) * YUpsilonPP2760(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonPP5030dummy(Double_t px) {
return GeneratorParamMUONlib::YUpsilonPP5030(&px, (Double_t *)0);
}
Double_t GeneratorParamMUONlib::YUpsilonPPb5030ShFdummy(Double_t x, Int_t n) {
// Upsilon shadowing factor vs y for pPb min. bias and 4 centr. bins
//
// pPb 5.03 TeV, for EPS09-LO, minimum bias shadowing factor = 0.92 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[7] = {8.885e-01, 4.620e-02, 1.158e-02, 4.959e-04,
-4.422e-04, -5.345e-05, 0.};
Double_t y;
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
if (y < 0)
y = 0;
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::YUpsilonPPb5030(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pPb 5.03 TeV, minimum bias 0-100 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YUpsilonPPb5030ShFdummy(x, 0) * YUpsilonPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPPb5030c1(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pPb 5.03 TeV, 1st centrality bin 0-20 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YUpsilonPPb5030ShFdummy(x, 1) * YUpsilonPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPPb5030c2(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pPb 5.03 TeV, 2nd centrality bin 20-40 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YUpsilonPPb5030ShFdummy(x, 2) * YUpsilonPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPPb5030c3(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pPb 5.03 TeV, 3rd centrality bin 40-60 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YUpsilonPPb5030ShFdummy(x, 3) * YUpsilonPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPPb5030c4(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pPb 5.03 TeV, 4th centrality bin 60-100 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YUpsilonPPb5030ShFdummy(x, 4) * YUpsilonPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPbP5030(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// Pbp 5.03 TeV, minimum bias 0-100 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YUpsilonPPb5030ShFdummy(x, 0) * YUpsilonPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPbP5030c1(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// Pbp 5.03 TeV, 1st centrality bin 0-20 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YUpsilonPPb5030ShFdummy(x, 1) * YUpsilonPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPbP5030c2(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// Pbp 5.03 TeV, 2nd centrality bin 20-40 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YUpsilonPPb5030ShFdummy(x, 2) * YUpsilonPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPbP5030c3(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// Pbp 5.03 TeV, 3rd centrality bin 40-60 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YUpsilonPPb5030ShFdummy(x, 3) * YUpsilonPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPbP5030c4(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// Pbp 5.03 TeV, 4th centrality bin 60-100 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YUpsilonPPb5030ShFdummy(x, 4) * YUpsilonPP5030dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPP8800dummy(Double_t px) {
return GeneratorParamMUONlib::YUpsilonPP8800(&px, (Double_t *)0);
}
Double_t GeneratorParamMUONlib::YUpsilonPPb8800ShFdummy(Double_t x, Int_t n) {
// Upsilon shadowing factor vs y for pPb min. bias and 4 centr. bins
//
// pPb 8.8 TeV, for EKS98, minimum bias shadowing factor = 0.89 in 4pi
//
const Double_t f[5] = {1, 1.33, 1.05, 0.67, 0.23};
const Double_t c[7] = {8.6581e-01, 4.6111e-02, 7.6911e-03, 8.7313e-04,
-1.4700e-04, -5.0975e-05, -3.5718e-06};
Double_t y;
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
if (y < 0)
y = 0;
//
return 1 + (y - 1) * f[n];
}
Double_t GeneratorParamMUONlib::YUpsilonPPb8800(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pPb 8.8 TeV, minimum bias 0-100 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YUpsilonPPb8800ShFdummy(x, 0) * YUpsilonPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPPb8800c1(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pPb 8.8 TeV, 1st centrality bin 0-20 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YUpsilonPPb8800ShFdummy(x, 1) * YUpsilonPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPPb8800c2(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pPb 8.8 TeV, 2nd centrality bin 20-40 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YUpsilonPPb8800ShFdummy(x, 2) * YUpsilonPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPPb8800c3(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pPb 8.8 TeV, 3rd centrality bin 40-60 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YUpsilonPPb8800ShFdummy(x, 3) * YUpsilonPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPPb8800c4(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// pPb 8.8 TeV, 4th centrality bin 60-100 %
//
Double_t x = px[0] + 0.47; // rapidity shift
return YUpsilonPPb8800ShFdummy(x, 4) * YUpsilonPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPbP8800(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// Pbp 8.8 TeV, minimum bias 0-100 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YUpsilonPPb8800ShFdummy(x, 0) * YUpsilonPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPbP8800c1(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// Pbp 8.8 TeV, 1st centrality bin 0-20 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YUpsilonPPb8800ShFdummy(x, 1) * YUpsilonPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPbP8800c2(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// Pbp 8.8 TeV, 2nd centrality bin 20-40 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YUpsilonPPb8800ShFdummy(x, 2) * YUpsilonPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPbP8800c3(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// Pbp 8.8 TeV, 3rd centrality bin 40-60 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YUpsilonPPb8800ShFdummy(x, 3) * YUpsilonPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonPbP8800c4(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
// Pbp 8.8 TeV, 4th centrality bin 60-100 %
//
Double_t x = -px[0] + 0.47; // rapidity shift
return YUpsilonPPb8800ShFdummy(x, 4) * YUpsilonPP8800dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilon(const Double_t *py,
const Double_t * /*dummy*/) {
// Upsilon y
const Double_t ky0 = 3.;
const Double_t kb = 1.;
Double_t yu;
Double_t y = TMath::Abs(*py);
//
if (y < ky0)
yu = kb;
else
yu = kb * TMath::Exp(-(y - ky0) * (y - ky0) / 2);
return yu;
}
Double_t GeneratorParamMUONlib::YUpsilonPbPb(const Double_t *px,
const Double_t * /*dummy*/) {
//
// Upsilon y
//
//
// R. Vogt 2002
// PbPb 5.5 TeV
// MRST HO
// mc = 1.4 GeV, pt-kick 1 GeV
//
Double_t c[7] = {3.40036e-01, -3.98882e-07, -4.48398e-03, 8.46411e-08,
-6.10854e-04, -2.99753e-09, 1.28895e-05};
Double_t x = TMath::Abs(px[0]);
if (x > 5.55)
return 0.;
Int_t j;
Double_t y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
return y;
}
Double_t GeneratorParamMUONlib::YUpsilonCDFscaled(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
return GeneratorParamMUONlib::YUpsilonPbPb(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonCDFscaledPP(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
return GeneratorParamMUONlib::YUpsilonPP(px, dummy);
}
Double_t GeneratorParamMUONlib::YUpsilonFlat(const Double_t * /*px*/,
const Double_t * /*dummy*/) {
// Upsilon y
return 1.;
}
Double_t
GeneratorParamMUONlib::YUpsilonCDFscaledPP10(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
//
// pp 10 TeV
// scaled from YUpsilonPP(14 TeV) using 10 TeV / 14 TeV ratio of y-spectra in
// LO pQCD. see S.Grigoryan, PWG3 Meeting, 27th Oct 2008
//
Double_t c[4] = {1., -2.17877e-02, -6.52830e-04, 1.40578e-05};
Double_t x = TMath::Abs(px[0]);
if (x > 6.1)
return 0.;
Int_t j;
Double_t y = c[j = 3];
while (j > 0)
y = y * x * x + c[--j];
return y;
}
Double_t
GeneratorParamMUONlib::YUpsilonCDFscaledPP9(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
//
// pp 8.8 TeV
// rescaling of YUpsilonPP(14 TeV) using 8.8 TeV / 14 TeV ratio of y-spectra
// in LO QCD
//
Double_t c[4] = {1., -2.37621e-02, -6.29610e-04, 1.47976e-05};
Double_t x = TMath::Abs(px[0]);
if (x > 6.1)
return 0.;
Int_t j;
Double_t y = c[j = 3];
while (j > 0)
y = y * x * x + c[--j];
return y;
}
Double_t GeneratorParamMUONlib::YUpsilonCDFscaledPP9dummy(Double_t px) {
return GeneratorParamMUONlib::YUpsilonCDFscaledPP9(&px, (Double_t *)0);
}
Double_t
GeneratorParamMUONlib::YUpsilonCDFscaledPP7(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
//
// pp 7 TeV
// scaled from YUpsilonPP(14 TeV) using 7 TeV / 14 TeV ratio of y-spectra in
// LO pQCD.
//
Double_t c[4] = {1., -2.61009e-02, -6.83937e-04, 1.78451e-05};
Double_t x = TMath::Abs(px[0]);
if (x > 6.0)
return 0.;
Int_t j;
Double_t y = c[j = 3];
while (j > 0)
y = y * x * x + c[--j];
return y;
}
Double_t
GeneratorParamMUONlib::YUpsilonCDFscaledPP4(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
//
// pp 3.94 TeV
// rescaling of YUpsilonPP(14 TeV) using 3.94 TeV / 14 TeV ratio of y-spectra
// in LO QCD
//
Double_t c[4] = {1., -3.91924e-02, -4.26184e-04, 2.10914e-05};
Double_t x = TMath::Abs(px[0]);
if (x > 5.7)
return 0.;
Int_t j;
Double_t y = c[j = 3];
while (j > 0)
y = y * x * x + c[--j];
return y;
}
Double_t GeneratorParamMUONlib::YUpsilonPP(const Double_t *px,
const Double_t * /*dummy*/) {
//
// Upsilon y
//
//
// R. Vogt 2002
// p p 14. TeV
// MRST HO
// mc = 1.4 GeV, pt-kick 1 GeV
//
Double_t c[7] = {8.91936e-01, -6.46645e-07, -1.52774e-02, 4.28677e-08,
-7.01517e-04, -6.20539e-10, 1.29943e-05};
Double_t x = TMath::Abs(px[0]);
if (x > 6.2)
return 0.;
Int_t j;
Double_t y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
return y;
}
Double_t
GeneratorParamMUONlib::YUpsilonCDFscaledPPb9(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
//
// pPb 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.89
//
Double_t c[7] = {8.71829e-01, 4.77467e-02, 8.09671e-03, 6.45294e-04,
-2.15730e-04, -4.67538e-05, -2.11683e-06};
Double_t y;
Double_t x = px[0] + 0.47; // rapidity shift
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
if (y < 0)
y = 0;
return y * GeneratorParamMUONlib::YUpsilonCDFscaledPP9dummy(x);
}
Double_t
GeneratorParamMUONlib::YUpsilonCDFscaledPbP9(const Double_t *px,
const Double_t * /*dummy*/) {
// Upsilon y
//
// Pbp 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.89
//
Double_t c[7] = {8.71829e-01, 4.77467e-02, 8.09671e-03, 6.45294e-04,
-2.15730e-04, -4.67538e-05, -2.11683e-06};
Double_t y;
Double_t x = -px[0] + 0.47; // rapidity shift
Int_t j;
y = c[j = 6];
while (j > 0)
y = y * x + c[--j];
if (y < 0)
y = 0;
return y * GeneratorParamMUONlib::YUpsilonCDFscaledPP9dummy(x);
}
Double_t GeneratorParamMUONlib::YUpsilonCDFscaledPbPb4(const Double_t *px,
const Double_t *dummy) {
// Upsilon y
//
// PbPb 3.94 TeV, for EKS98 with minimum bias shadowing factor 0.85
//
Double_t c[4] = {8.27837e-01, 1.70115e-02, -1.26046e-03, 1.52091e-05};
Double_t x = px[0] * px[0];
Double_t y;
Int_t j;
y = c[j = 3];
while (j > 0)
y = y * x + c[--j];
if (y < 0)
y = 0;
return y * GeneratorParamMUONlib::YUpsilonCDFscaledPP4(px, dummy);
}
// particle composition
//
Int_t GeneratorParamMUONlib::IpUpsilon(TRandom *) {
// y composition
return 553;
}
Int_t GeneratorParamMUONlib::IpUpsilonP(TRandom *) {
// y composition
return 100553;
}
Int_t GeneratorParamMUONlib::IpUpsilonPP(TRandom *) {
// y composition
return 200553;
}
Int_t GeneratorParamMUONlib::IpUpsilonFamily(TRandom *) {
// y composition
// Using the LHCb pp data at 7 TeV: CERN-PH-EP-2012-051
// (L. Manceau, S. Grigoryan)
Int_t ip;
Float_t r = gRandom->Rndm();
if (r < 0.687) {
// if (r < 0.712) {
ip = 553;
} else if (r < 0.903) {
// } else if (r < 0.896) {
ip = 100553;
} else {
ip = 200553;
}
return ip;
}
//
// Phi
//
//
// pt-distribution (by scaling of pion distribution)
//____________________________________________________________
Double_t GeneratorParamMUONlib::PtPhi(const Double_t *px,
const Double_t * /*dummy*/) {
// Phi pT
return PtScal(*px, 7);
}
// y-distribution
Double_t GeneratorParamMUONlib::YPhi(const Double_t *px,
const Double_t * /*dummy*/) {
// Phi y
Double_t *dum = 0;
return YJpsi(px, dum);
}
// particle composition
//
Int_t GeneratorParamMUONlib::IpPhi(TRandom *) {
// Phi composition
return 333;
}
//
// omega
//
//
// pt-distribution (by scaling of pion distribution)
//____________________________________________________________
Double_t GeneratorParamMUONlib::PtOmega(const Double_t *px,
const Double_t * /*dummy*/) {
// Omega pT
return PtScal(*px, 5);
}
// y-distribution
Double_t GeneratorParamMUONlib::YOmega(const Double_t *px,
const Double_t * /*dummy*/) {
// Omega y
Double_t *dum = 0;
return YJpsi(px, dum);
}
// particle composition
//
Int_t GeneratorParamMUONlib::IpOmega(TRandom *) {
// Omega composition
return 223;
}
//
// omega
//
//
// pt-distribution (by scaling of pion distribution)
//____________________________________________________________
Double_t GeneratorParamMUONlib::PtRho(const Double_t *px,
const Double_t * /*dummy*/) {
// Rho pT
return PtScal(*px, 5);
}
// y-distribution
Double_t GeneratorParamMUONlib::YRho(const Double_t *px,
const Double_t * /*dummy*/) {
// Rho y
Double_t *dum = 0;
return YJpsi(px, dum);
}
// particle composition
//
Int_t GeneratorParamMUONlib::IpRho(TRandom *) {
// Rho composition
return 113;
}
//
// Eta
//
//
// pt-distribution (by scaling of pion distribution)
//____________________________________________________________
Double_t GeneratorParamMUONlib::PtEta(const Double_t *px,
const Double_t * /*dummy*/) {
// Eta pT
return PtScal(*px, 3);
}
// y-distribution
Double_t GeneratorParamMUONlib::YEta(const Double_t *px,
const Double_t * /*dummy*/) {
// Eta y
Double_t *dum = 0;
return YJpsi(px, dum);
}
// particle composition
//
Int_t GeneratorParamMUONlib::IpEta(TRandom *) {
// Eta composition
return 221;
}
//
// Charm
//
//
// pt-distribution
//____________________________________________________________
Double_t GeneratorParamMUONlib::PtCharm(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
const Double_t kpt0 = 2.25;
const Double_t kxn = 3.17;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtCharmCentral(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
const Double_t kpt0 = 2.12;
const Double_t kxn = 2.78;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtCharmF0M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
// PtCharmFiMjSkPP = PtCharmF0M0S0PP * (dN(i,j,k)/dpt / dN(0,0,0)/dpt)_MNR
// i=0,1,2; j=0,1,2; k=0,1,...,6
// dN(i,j,k)/dpt - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
// http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
// calculations for the following inputs:
// Peterson fragmentation function (F) with \epsilon_c = 0.02, 0.002 & 0.11
// for i=0,1 & 2 respectively; quark mass (M) of 1.5, 1.3 & 1.7 GeV
// for j=0,1 & 2 respectively;
// factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
// with a/b = 1/1, 1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2
// for k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
// (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
// June 2008, Smbat.Grigoryan@cern.ch
// Charm pT
// Pythia6.214 (kCharmppMNRwmi, PDF = CTEQ5L, quark mass = 1.2 GeV, PtHard
// > 2.76 GeV/c) for pp collisions at 14 TeV with one c-cbar pair per event.
// Corresponding NLO total cross section is 5.68 mb
const Double_t kpt0 = 2.2930;
const Double_t kxn = 3.1196;
Double_t c[3] = {-5.2180e-01, 1.8753e-01, 2.8669e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
Double_t GeneratorParamMUONlib::PtCharmF1M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
// Corresponding NLO total cross section is 6.06 mb
const Double_t kpt0 = 2.8669;
const Double_t kxn = 3.1044;
Double_t c[3] = {-4.6714e-01, 1.5005e-01, 4.5003e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
Double_t GeneratorParamMUONlib::PtCharmF2M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
// Corresponding NLO total cross section is 6.06 mb
const Double_t kpt0 = 1.8361;
const Double_t kxn = 3.2966;
Double_t c[3] = {-6.1550e-01, 2.6498e-01, 1.0728e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
Double_t GeneratorParamMUONlib::PtCharmF0M1S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
// Corresponding NLO total cross section is 7.69 mb
const Double_t kpt0 = 2.1280;
const Double_t kxn = 3.1397;
Double_t c[3] = {-5.4021e-01, 2.0944e-01, 2.5211e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
Double_t GeneratorParamMUONlib::PtCharmF0M2S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
// Corresponding NLO total cross section is 4.81 mb
const Double_t kpt0 = 2.4579;
const Double_t kxn = 3.1095;
Double_t c[3] = {-5.1497e-01, 1.7532e-01, 3.2429e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
Double_t GeneratorParamMUONlib::PtCharmF0M0S1PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
// Corresponding NLO total cross section is 14.09 mb
const Double_t kpt0 = 2.1272;
const Double_t kxn = 3.1904;
Double_t c[3] = {-4.6088e-01, 2.1918e-01, 2.3055e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
Double_t GeneratorParamMUONlib::PtCharmF0M0S2PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
// Corresponding NLO total cross section is 1.52 mb
const Double_t kpt0 = 2.8159;
const Double_t kxn = 3.0857;
Double_t c[3] = {-6.4691e-01, 2.0289e-01, 2.4922e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
Double_t GeneratorParamMUONlib::PtCharmF0M0S3PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
// Corresponding NLO total cross section is 3.67 mb
const Double_t kpt0 = 2.7297;
const Double_t kxn = 3.3019;
Double_t c[3] = {-6.2216e-01, 1.9031e-01, 1.5341e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
Double_t GeneratorParamMUONlib::PtCharmF0M0S4PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
// Corresponding NLO total cross section is 3.38 mb
const Double_t kpt0 = 2.3894;
const Double_t kxn = 3.1075;
Double_t c[3] = {-4.9742e-01, 1.7032e-01, 2.5994e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
Double_t GeneratorParamMUONlib::PtCharmF0M0S5PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
// Corresponding NLO total cross section is 10.37 mb
const Double_t kpt0 = 2.0187;
const Double_t kxn = 3.3011;
Double_t c[3] = {-3.9869e-01, 2.9248e-01, 1.1763e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
Double_t GeneratorParamMUONlib::PtCharmF0M0S6PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm pT
// Corresponding NLO total cross section is 7.22 mb
const Double_t kpt0 = 2.1089;
const Double_t kxn = 3.1848;
Double_t c[3] = {-4.6275e-01, 1.8114e-01, 2.1363e-02};
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn) * (1. + c[0] * x + c[1] * x * x) /
(1. + c[2] * x * x);
}
// y-distribution
Double_t GeneratorParamMUONlib::YCharm(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y :: Carrer & Dainese : ALICE-INT-2003-019 v.3 (hep-ph/0311225)
// Pythia tuned to reproduce the distribution given by the HVQMNR program
// based on NLO calculations (pQCD) shadowing + kt broadening
Double_t x = px[0];
Double_t c[2] = {-2.42985e-03, -2.31001e-04};
Double_t y = 1 + (c[0] * TMath::Power(x, 2)) + (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 8) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF0M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
// YCharmFiMjSkPP = YCharmF0M0S0PP * (dN(i,j,k)/dy / dN(0,0,0)/dy)_MNR
// i=0,1,2; j=0,1,2; k=0,1,...,6
// dN(i,j,k)/dy - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
// http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
// calculations for the following inputs:
// Peterson fragmentation function (F) with \epsilon_c = 0.02, 0.002 & 0.11
// for i=0,1 & 2 respectively; quark mass (M) of 1.5, 1.3 & 1.7 GeV
// for j=0,1 & 2 respectively;
// factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
// with a/b = 1/1,1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2 for
// k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
// (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
// June 2008, Smbat.Grigoryan@cern.ch
// Charm y
// Pythia6.214 (kCharmppMNRwmi, PDF = CTEQ5L, quark mass = 1.2 GeV, PtHard
// > 2.76 GeV/c) for pp collisions at 14 TeV with one c-cbar pair per event.
// Corresponding NLO total cross section is 5.68 mb
Double_t x = px[0];
Double_t c[2] = {7.0909e-03, 6.1967e-05};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF1M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y
// Corresponding NLO total cross section is 6.06 mb
Double_t x = px[0];
Double_t c[2] = {6.9707e-03, 6.0971e-05};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF2M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y
// Corresponding NLO total cross section is 6.06 mb
Double_t x = px[0];
Double_t c[2] = {7.1687e-03, 6.5303e-05};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF0M1S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y
// Corresponding NLO total cross section is 7.69 mb
Double_t x = px[0];
Double_t c[2] = {5.9090e-03, 7.1854e-05};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF0M2S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y
// Corresponding NLO total cross section is 4.81 mb
Double_t x = px[0];
Double_t c[2] = {8.0882e-03, 5.5872e-05};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF0M0S1PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y
// Corresponding NLO total cross section is 14.09 mb
Double_t x = px[0];
Double_t c[2] = {7.2520e-03, 6.2691e-05};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF0M0S2PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y
// Corresponding NLO total cross section is 1.52 mb
Double_t x = px[0];
Double_t c[2] = {1.1040e-04, 1.4498e-04};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF0M0S3PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y
// Corresponding NLO total cross section is 3.67 mb
Double_t x = px[0];
Double_t c[2] = {-3.1328e-03, 1.8270e-04};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF0M0S4PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y
// Corresponding NLO total cross section is 3.38 mb
Double_t x = px[0];
Double_t c[2] = {7.0865e-03, 6.2532e-05};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF0M0S5PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y
// Corresponding NLO total cross section is 10.37 mb
Double_t x = px[0];
Double_t c[2] = {7.7070e-03, 5.3533e-05};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Double_t GeneratorParamMUONlib::YCharmF0M0S6PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Charm y
// Corresponding NLO total cross section is 7.22 mb
Double_t x = px[0];
Double_t c[2] = {7.9195e-03, 5.3823e-05};
Double_t y = 1 - (c[0] * TMath::Power(x, 2)) - (c[1] * TMath::Power(x, 4));
Double_t ycharm;
if (TMath::Abs(x) > 9) {
ycharm = 0.;
} else {
ycharm = TMath::Power(y, 3);
}
return ycharm;
}
Int_t GeneratorParamMUONlib::IpCharm(TRandom *ran) {
// Charm composition
Float_t random;
Int_t ip;
// 411,421,431,4122
random = ran->Rndm();
// Taux de production Carrer & Dainese : ALICE-INT-2003-019 v.3
// >>>>> cf. tab 4 p 11
if (random < 0.30) {
ip = 421;
} else if (random < 0.60) {
ip = -421;
} else if (random < 0.70) {
ip = 411;
} else if (random < 0.80) {
ip = -411;
} else if (random < 0.86) {
ip = 431;
} else if (random < 0.92) {
ip = -431;
} else if (random < 0.96) {
ip = 4122;
} else {
ip = -4122;
}
return ip;
}
//
// Beauty
//
//
// pt-distribution
//____________________________________________________________
Double_t GeneratorParamMUONlib::PtBeauty(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
const Double_t kpt0 = 6.53;
const Double_t kxn = 3.59;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyCentral(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
const Double_t kpt0 = 6.14;
const Double_t kxn = 2.93;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF0M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
// PtBeautyFiMjSkPP = PtBeautyF0M0S0PP * (dN(i,j,k)/dpt / dN(0,0,0)/dpt)_MNR
// i=0,1,2; j=0,1,2; k=0,1,...,6
// dN(i,j,k)/dpt - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
// http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
// calculations for the following inputs:
// Peterson fragmentation function (F) with \epsilon_b = 0.001, 0.0002 & 0.004
// for i=0,1 & 2 respectively; quark mass (M) of 4.75, 4.5 & 5.0 GeV
// for j=0,1 & 2 respectively;
// factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
// with a/b = 1/1, 1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2 for
// k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
// (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
// June 2008, Smbat.Grigoryan@cern.ch
// Beauty pT
// Pythia6.214 (kBeautyppMNRwmi, PDF = CTEQ5L, quark mass = 4.75 GeV, PtHard
// > 2.76 GeV/c) for pp collisions at 14 TeV with one b-bbar pair per event.
// Corresponding NLO total cross section is 0.494 mb
const Double_t kpt0 = 8.0575;
const Double_t kxn = 3.1921;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF1M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
// Corresponding NLO total cross section is 0.445 mb
const Double_t kpt0 = 8.6239;
const Double_t kxn = 3.2911;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF2M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
// Corresponding NLO total cross section is 0.445 mb
const Double_t kpt0 = 7.3367;
const Double_t kxn = 3.0692;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF0M1S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
// Corresponding NLO total cross section is 0.518 mb
const Double_t kpt0 = 7.6409;
const Double_t kxn = 3.1364;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF0M2S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
// Corresponding NLO total cross section is 0.384 mb
const Double_t kpt0 = 8.4948;
const Double_t kxn = 3.2546;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF0M0S1PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
// Corresponding NLO total cross section is 0.648 mb
const Double_t kpt0 = 7.6631;
const Double_t kxn = 3.1621;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF0M0S2PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
// Corresponding NLO total cross section is 0.294 mb
const Double_t kpt0 = 8.7245;
const Double_t kxn = 3.2213;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF0M0S3PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
// Corresponding NLO total cross section is 0.475 mb
const Double_t kpt0 = 8.5296;
const Double_t kxn = 3.2187;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF0M0S4PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
// Corresponding NLO total cross section is 0.324 mb
const Double_t kpt0 = 7.9440;
const Double_t kxn = 3.1614;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF0M0S5PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
// Corresponding NLO total cross section is 0.536 mb
const Double_t kpt0 = 8.2408;
const Double_t kxn = 3.3029;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtBeautyF0M0S6PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty pT
// Corresponding NLO total cross section is 0.420 mb
const Double_t kpt0 = 7.8041;
const Double_t kxn = 3.2094;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
// y-distribution
Double_t GeneratorParamMUONlib::YBeauty(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y :: Carrer & Dainese : ALICE-INT-2003-019 v.3 (hep-ph/0311225)
// Pythia tuned to reproduce the distribution given by the HVQMNR program
// based on NLO calculations (pQCD) shadowing + kt broadening
Double_t x = px[0];
Double_t c[2] = {-1.27590e-02, -2.42731e-04};
Double_t y = 1 + c[0] * TMath::Power(x, 2) + c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF0M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
// YBeautyFiMjSkPP = YBeautyF0M0S0PP * (dN(i,j,k)/dy / dN(0,0,0)/dy)_MNR
// i=0,1,2; j=0,1,2; k=0,1,...,6
// dN(i,j,k)/dy - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
// http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
// calculations for the following inputs:
// Peterson fragmentation function (F) with \epsilon_b = 0.001, 0.0002 & 0.004
// for i=0,1 & 2 respectively; quark mass (M) of 4.75, 4.5 & 5.0 GeV
// for j=0,1 & 2 respectively;
// factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
// with a/b = 1/1, 1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2
// for k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
// (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
// June 2008, Smbat.Grigoryan@cern.ch
// Beauty y
// Pythia6.214 (kBeautyppMNRwmi, PDF = CTEQ5L, quark mass = 4.75 GeV, PtHard
// > 2.76 GeV/c) for pp collisions at 14 TeV with one b-bbar pair per event.
// Corresponding NLO total cross section is 0.494 mb
Double_t x = px[0];
Double_t c[2] = {1.2350e-02, 9.2667e-05};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF1M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y
// Corresponding NLO total cross section is 0.445 mb
Double_t x = px[0];
Double_t c[2] = {1.2292e-02, 9.1847e-05};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF2M0S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y
// Corresponding NLO total cross section is 0.445 mb
Double_t x = px[0];
Double_t c[2] = {1.2436e-02, 9.3709e-05};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF0M1S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y
// Corresponding NLO total cross section is 0.518 mb
Double_t x = px[0];
Double_t c[2] = {1.1714e-02, 1.0068e-04};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF0M2S0PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y
// Corresponding NLO total cross section is 0.384 mb
Double_t x = px[0];
Double_t c[2] = {1.2944e-02, 8.5500e-05};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF0M0S1PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y
// Corresponding NLO total cross section is 0.648 mb
Double_t x = px[0];
Double_t c[2] = {1.2455e-02, 9.2713e-05};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF0M0S2PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y
// Corresponding NLO total cross section is 0.294 mb
Double_t x = px[0];
Double_t c[2] = {1.0897e-02, 1.1878e-04};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF0M0S3PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y
// Corresponding NLO total cross section is 0.475 mb
Double_t x = px[0];
Double_t c[2] = {1.0912e-02, 1.1858e-04};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF0M0S4PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y
// Corresponding NLO total cross section is 0.324 mb
Double_t x = px[0];
Double_t c[2] = {1.2378e-02, 9.2490e-05};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF0M0S5PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y
// Corresponding NLO total cross section is 0.536 mb
Double_t x = px[0];
Double_t c[2] = {1.2886e-02, 8.2912e-05};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Double_t GeneratorParamMUONlib::YBeautyF0M0S6PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Beauty y
// Corresponding NLO total cross section is 0.420 mb
Double_t x = px[0];
Double_t c[2] = {1.3106e-02, 8.0115e-05};
Double_t y = 1 - c[0] * TMath::Power(x, 2) - c[1] * TMath::Power(x, 4);
Double_t ybeauty;
if (TMath::Abs(x) > 7.6) {
ybeauty = 0.;
} else {
ybeauty = TMath::Power(y, 3);
}
return ybeauty;
}
Int_t GeneratorParamMUONlib::IpBeauty(TRandom *ran) {
// Beauty Composition
Float_t random;
Int_t ip;
random = ran->Rndm();
// Taux de production Carrer & Dainese : ALICE-INT-2003-019 v.3
// >>>>> cf. tab 4 p 11
if (random < 0.20) {
ip = 511;
} else if (random < 0.40) {
ip = -511;
} else if (random < 0.605) {
ip = 521;
} else if (random < 0.81) {
ip = -521;
} else if (random < 0.87) {
ip = 531;
} else if (random < 0.93) {
ip = -531;
} else if (random < 0.965) {
ip = 5122;
} else {
ip = -5122;
}
return ip;
}
typedef Double_t (*GenFunc)(const Double_t *, const Double_t *);
GenFunc GeneratorParamMUONlib::GetPt(Int_t param, const char *tname) const {
// Return pointer to pT parameterisation
TString sname = TString(tname);
GenFunc func;
switch (param) {
case kPhi:
func = PtPhi;
break;
case kOmega:
func = PtOmega;
break;
case kEta:
func = PtEta;
break;
case kJpsiFamily:
case kPsiP:
case kChic1:
case kChic2:
case kJpsi:
if (sname == "Vogt" || sname == "Vogt PbPb") {
func = PtJpsiPbPb;
} else if (sname == "Vogt pp") {
func = PtJpsiPP;
} else if (sname == "pp 7") {
func = PtJpsiPP7000;
} else if (sname == "pp 8") {
func = PtJpsiPP8000;
} else if (sname == "pp 2.76") {
func = PtJpsiPP2760;
} else if (sname == "pp 4.4") {
func = PtJpsiPP4400;
} else if (sname == "pp 5.03") {
func = PtJpsiPP5030;
} else if (sname == "pp 8.8") {
func = PtJpsiPP8800;
} else if (sname == "pp 7 poly") {
func = PtJpsiPP7000;
} else if (sname == "pp 2.76 poly") {
func = PtJpsiPP2760;
} else if (sname == "PbPb 2.76") {
func = PtJpsiPbPb2760;
} else if (sname == "PbPb 2.76c1") {
func = PtJpsiPbPb2760c1;
} else if (sname == "PbPb 2.76c2") {
func = PtJpsiPbPb2760c2;
} else if (sname == "PbPb 2.76c3") {
func = PtJpsiPbPb2760c3;
} else if (sname == "PbPb 2.76c4") {
func = PtJpsiPbPb2760c4;
} else if (sname == "PbPb 2.76c5") {
func = PtJpsiPbPb2760c5;
} else if (sname == "PbPb 2.76c6") {
func = PtJpsiPbPb2760c6;
} else if (sname == "PbPb 2.76c7") {
func = PtJpsiPbPb2760c7;
} else if (sname == "PbPb 2.76c8") {
func = PtJpsiPbPb2760c8;
} else if (sname == "PbPb 2.76c9") {
func = PtJpsiPbPb2760c9;
} else if (sname == "PbPb 2.76c10") {
func = PtJpsiPbPb2760c10;
} else if (sname == "PbPb 2.76c11") {
func = PtJpsiPbPb2760c11;
} else if (sname == "pPb 5.03") {
func = PtJpsiPPb5030;
} else if (sname == "pPb 5.03c1") {
func = PtJpsiPPb5030c1;
} else if (sname == "pPb 5.03c2") {
func = PtJpsiPPb5030c2;
} else if (sname == "pPb 5.03c3") {
func = PtJpsiPPb5030c3;
} else if (sname == "pPb 5.03c4") {
func = PtJpsiPPb5030c4;
} else if (sname == "Pbp 5.03") {
func = PtJpsiPbP5030;
} else if (sname == "Pbp 5.03c1") {
func = PtJpsiPbP5030c1;
} else if (sname == "Pbp 5.03c2") {
func = PtJpsiPbP5030c2;
} else if (sname == "Pbp 5.03c3") {
func = PtJpsiPbP5030c3;
} else if (sname == "Pbp 5.03c4") {
func = PtJpsiPbP5030c4;
} else if (sname == "pPb 8.8") {
func = PtJpsiPPb8800;
} else if (sname == "pPb 8.8c1") {
func = PtJpsiPPb8800c1;
} else if (sname == "pPb 8.8c2") {
func = PtJpsiPPb8800c2;
} else if (sname == "pPb 8.8c3") {
func = PtJpsiPPb8800c3;
} else if (sname == "pPb 8.8c4") {
func = PtJpsiPPb8800c4;
} else if (sname == "Pbp 8.8") {
func = PtJpsiPbP8800;
} else if (sname == "Pbp 8.8c1") {
func = PtJpsiPbP8800c1;
} else if (sname == "Pbp 8.8c2") {
func = PtJpsiPbP8800c2;
} else if (sname == "Pbp 8.8c3") {
func = PtJpsiPbP8800c3;
} else if (sname == "Pbp 8.8c4") {
func = PtJpsiPbP8800c4;
} else if (sname == "CDF scaled") {
func = PtJpsiCDFscaled;
} else if (sname == "CDF pp") {
func = PtJpsiCDFscaledPP;
} else if (sname == "CDF pp 10") {
func = PtJpsiCDFscaledPP10;
} else if (sname == "CDF pp 8.8") {
func = PtJpsiCDFscaledPP9;
} else if (sname == "CDF pp 7" || sname == "CDF pp 7 flat y") {
func = PtJpsiCDFscaledPP7;
} else if (sname == "CDF pp 3.94") {
func = PtJpsiCDFscaledPP4;
} else if (sname == "CDF pp 2.76") {
func = PtJpsiCDFscaledPP3;
} else if (sname == "CDF pp 1.9") {
func = PtJpsiCDFscaledPP2;
} else if (sname == "CDF pPb 8.8") {
func = PtJpsiCDFscaledPPb9;
} else if (sname == "CDF Pbp 8.8") {
func = PtJpsiCDFscaledPbP9;
} else if (sname == "CDF PbPb 3.94") {
func = PtJpsiCDFscaledPbPb4;
} else if (sname == "Flat" || sname == "CDF pp 7 flat pt") {
func = PtJpsiFlat;
} else {
func = PtJpsi;
}
break;
case kJpsiFromB:
func = PtJpsiBPbPb;
break;
case kUpsilonFamily:
case kUpsilonP:
case kUpsilonPP:
case kUpsilon:
if (sname == "Vogt" || sname == "Vogt PbPb") {
func = PtUpsilonPbPb;
} else if (sname == "Vogt pp") {
func = PtUpsilonPP;
} else if (sname == "pp 7") {
func = PtUpsilonPP7000;
} else if (sname == "pp 8") {
func = PtUpsilonPP8000;
} else if (sname == "pp 2.76") {
func = PtUpsilonPP2760;
} else if (sname == "pp 4.4") {
func = PtUpsilonPP4400;
} else if (sname == "pp 5.03") {
func = PtUpsilonPP5030;
} else if (sname == "pp 8.8") {
func = PtUpsilonPP8800;
} else if (sname == "pp 7 poly") {
func = PtUpsilonPP7000;
} else if (sname == "pp 2.76 poly") {
func = PtUpsilonPP2760;
} else if (sname == "PbPb 2.76") {
func = PtUpsilonPbPb2760;
} else if (sname == "PbPb 2.76c1") {
func = PtUpsilonPbPb2760c1;
} else if (sname == "PbPb 2.76c2") {
func = PtUpsilonPbPb2760c2;
} else if (sname == "PbPb 2.76c3") {
func = PtUpsilonPbPb2760c3;
} else if (sname == "PbPb 2.76c4") {
func = PtUpsilonPbPb2760c4;
} else if (sname == "PbPb 2.76c5") {
func = PtUpsilonPbPb2760c5;
} else if (sname == "PbPb 2.76c6") {
func = PtUpsilonPbPb2760c6;
} else if (sname == "PbPb 2.76c7") {
func = PtUpsilonPbPb2760c7;
} else if (sname == "PbPb 2.76c8") {
func = PtUpsilonPbPb2760c8;
} else if (sname == "PbPb 2.76c9") {
func = PtUpsilonPbPb2760c9;
} else if (sname == "PbPb 2.76c10") {
func = PtUpsilonPbPb2760c10;
} else if (sname == "PbPb 2.76c11") {
func = PtUpsilonPbPb2760c11;
} else if (sname == "pPb 5.03") {
func = PtUpsilonPPb5030;
} else if (sname == "pPb 5.03c1") {
func = PtUpsilonPPb5030c1;
} else if (sname == "pPb 5.03c2") {
func = PtUpsilonPPb5030c2;
} else if (sname == "pPb 5.03c3") {
func = PtUpsilonPPb5030c3;
} else if (sname == "pPb 5.03c4") {
func = PtUpsilonPPb5030c4;
} else if (sname == "Pbp 5.03") {
func = PtUpsilonPbP5030;
} else if (sname == "Pbp 5.03c1") {
func = PtUpsilonPbP5030c1;
} else if (sname == "Pbp 5.03c2") {
func = PtUpsilonPbP5030c2;
} else if (sname == "Pbp 5.03c3") {
func = PtUpsilonPbP5030c3;
} else if (sname == "Pbp 5.03c4") {
func = PtUpsilonPbP5030c4;
} else if (sname == "pPb 8.8") {
func = PtUpsilonPPb8800;
} else if (sname == "pPb 8.8c1") {
func = PtUpsilonPPb8800c1;
} else if (sname == "pPb 8.8c2") {
func = PtUpsilonPPb8800c2;
} else if (sname == "pPb 8.8c3") {
func = PtUpsilonPPb8800c3;
} else if (sname == "pPb 8.8c4") {
func = PtUpsilonPPb8800c4;
} else if (sname == "Pbp 8.8") {
func = PtUpsilonPbP8800;
} else if (sname == "Pbp 8.8c1") {
func = PtUpsilonPbP8800c1;
} else if (sname == "Pbp 8.8c2") {
func = PtUpsilonPbP8800c2;
} else if (sname == "Pbp 8.8c3") {
func = PtUpsilonPbP8800c3;
} else if (sname == "Pbp 8.8c4") {
func = PtUpsilonPbP8800c4;
} else if (sname == "CDF scaled") {
func = PtUpsilonCDFscaled;
} else if (sname == "CDF pp") {
func = PtUpsilonCDFscaledPP;
} else if (sname == "CDF pp 10") {
func = PtUpsilonCDFscaledPP10;
} else if (sname == "CDF pp 8.8") {
func = PtUpsilonCDFscaledPP9;
} else if (sname == "CDF pp 7") {
func = PtUpsilonCDFscaledPP7;
} else if (sname == "CDF pp 3.94") {
func = PtUpsilonCDFscaledPP4;
} else if (sname == "CDF pPb 8.8") {
func = PtUpsilonCDFscaledPPb9;
} else if (sname == "CDF Pbp 8.8") {
func = PtUpsilonCDFscaledPbP9;
} else if (sname == "CDF PbPb 3.94") {
func = PtUpsilonCDFscaledPbPb4;
} else if (sname == "Flat") {
func = PtUpsilonFlat;
} else {
func = PtUpsilon;
}
break;
case kCharm:
if (sname == "F0M0S0 pp") {
func = PtCharmF0M0S0PP;
} else if (sname == "F1M0S0 pp") {
func = PtCharmF1M0S0PP;
} else if (sname == "F2M0S0 pp") {
func = PtCharmF2M0S0PP;
} else if (sname == "F0M1S0 pp") {
func = PtCharmF0M1S0PP;
} else if (sname == "F0M2S0 pp") {
func = PtCharmF0M2S0PP;
} else if (sname == "F0M0S1 pp") {
func = PtCharmF0M0S1PP;
} else if (sname == "F0M0S2 pp") {
func = PtCharmF0M0S2PP;
} else if (sname == "F0M0S3 pp") {
func = PtCharmF0M0S3PP;
} else if (sname == "F0M0S4 pp") {
func = PtCharmF0M0S4PP;
} else if (sname == "F0M0S5 pp") {
func = PtCharmF0M0S5PP;
} else if (sname == "F0M0S6 pp") {
func = PtCharmF0M0S6PP;
} else if (sname == "central") {
func = PtCharmCentral;
} else {
func = PtCharm;
}
break;
case kBeauty:
if (sname == "F0M0S0 pp") {
func = PtBeautyF0M0S0PP;
} else if (sname == "F1M0S0 pp") {
func = PtBeautyF1M0S0PP;
} else if (sname == "F2M0S0 pp") {
func = PtBeautyF2M0S0PP;
} else if (sname == "F0M1S0 pp") {
func = PtBeautyF0M1S0PP;
} else if (sname == "F0M2S0 pp") {
func = PtBeautyF0M2S0PP;
} else if (sname == "F0M0S1 pp") {
func = PtBeautyF0M0S1PP;
} else if (sname == "F0M0S2 pp") {
func = PtBeautyF0M0S2PP;
} else if (sname == "F0M0S3 pp") {
func = PtBeautyF0M0S3PP;
} else if (sname == "F0M0S4 pp") {
func = PtBeautyF0M0S4PP;
} else if (sname == "F0M0S5 pp") {
func = PtBeautyF0M0S5PP;
} else if (sname == "F0M0S6 pp") {
func = PtBeautyF0M0S6PP;
} else if (sname == "central") {
func = PtBeautyCentral;
} else {
func = PtBeauty;
}
break;
case kPion:
if (sname == "2010 Pos PP") {
func = PtPionPos2010PP;
} else if (sname == "2010 Neg PP") {
func = PtPionNeg2010PP;
} else {
func = PtPion;
}
break;
case kKaon:
if (sname == "2010 Pos PP") {
func = PtKaonPos2010PP;
} else if (sname == "2010 Neg PP") {
func = PtKaonNeg2010PP;
} else {
func = PtKaon;
}
break;
case kChic0:
func = PtChic0;
break;
case kChic:
func = PtChic;
break;
case kRho:
func = PtRho;
break;
default:
func = 0;
printf("<GeneratorParamMUONlib::GetPt> unknown parametrisation\n");
}
return func;
}
GenFunc GeneratorParamMUONlib::GetY(Int_t param, const char *tname) const {
//
// Return pointer to y- parameterisation
//
TString sname = TString(tname);
GenFunc func;
switch (param) {
case kPhi:
func = YPhi;
break;
case kEta:
func = YEta;
break;
case kOmega:
func = YOmega;
break;
case kJpsiFamily:
case kPsiP:
case kChic1:
case kChic2:
case kJpsi:
if (sname == "Vogt" || sname == "Vogt PbPb") {
func = YJpsiPbPb;
} else if (sname == "Vogt pp") {
func = YJpsiPP;
} else if (sname == "pp 7") {
func = YJpsiPP7000;
} else if (sname == "pp 8") {
func = YJpsiPP8000;
} else if (sname == "pp 2.76") {
func = YJpsiPP2760;
} else if (sname == "pp 4.4") {
func = YJpsiPP4400;
} else if (sname == "pp 5.03") {
func = YJpsiPP5030;
} else if (sname == "pp 8.8") {
func = YJpsiPP8800;
} else if (sname == "pp 7 poly") {
func = YJpsiPPpoly7000;
} else if (sname == "pp 2.76 poly") {
func = YJpsiPPpoly2760;
} else if (sname == "PbPb 2.76") {
func = YJpsiPbPb2760;
} else if (sname == "PbPb 2.76c1") {
func = YJpsiPbPb2760c1;
} else if (sname == "PbPb 2.76c2") {
func = YJpsiPbPb2760c2;
} else if (sname == "PbPb 2.76c3") {
func = YJpsiPbPb2760c3;
} else if (sname == "PbPb 2.76c4") {
func = YJpsiPbPb2760c4;
} else if (sname == "PbPb 2.76c5") {
func = YJpsiPbPb2760c5;
} else if (sname == "PbPb 2.76c6") {
func = YJpsiPbPb2760c6;
} else if (sname == "PbPb 2.76c7") {
func = YJpsiPbPb2760c7;
} else if (sname == "PbPb 2.76c8") {
func = YJpsiPbPb2760c8;
} else if (sname == "PbPb 2.76c9") {
func = YJpsiPbPb2760c9;
} else if (sname == "PbPb 2.76c10") {
func = YJpsiPbPb2760c10;
} else if (sname == "PbPb 2.76c11") {
func = YJpsiPbPb2760c11;
} else if (sname == "pPb 5.03") {
func = YJpsiPPb5030;
} else if (sname == "pPb 5.03c1") {
func = YJpsiPPb5030c1;
} else if (sname == "pPb 5.03c2") {
func = YJpsiPPb5030c2;
} else if (sname == "pPb 5.03c3") {
func = YJpsiPPb5030c3;
} else if (sname == "pPb 5.03c4") {
func = YJpsiPPb5030c4;
} else if (sname == "Pbp 5.03") {
func = YJpsiPbP5030;
} else if (sname == "Pbp 5.03c1") {
func = YJpsiPbP5030c1;
} else if (sname == "Pbp 5.03c2") {
func = YJpsiPbP5030c2;
} else if (sname == "Pbp 5.03c3") {
func = YJpsiPbP5030c3;
} else if (sname == "Pbp 5.03c4") {
func = YJpsiPbP5030c4;
} else if (sname == "pPb 8.8") {
func = YJpsiPPb8800;
} else if (sname == "pPb 8.8c1") {
func = YJpsiPPb8800c1;
} else if (sname == "pPb 8.8c2") {
func = YJpsiPPb8800c2;
} else if (sname == "pPb 8.8c3") {
func = YJpsiPPb8800c3;
} else if (sname == "pPb 8.8c4") {
func = YJpsiPPb8800c4;
} else if (sname == "Pbp 8.8") {
func = YJpsiPbP8800;
} else if (sname == "Pbp 8.8c1") {
func = YJpsiPbP8800c1;
} else if (sname == "Pbp 8.8c2") {
func = YJpsiPbP8800c2;
} else if (sname == "Pbp 8.8c3") {
func = YJpsiPbP8800c3;
} else if (sname == "Pbp 8.8c4") {
func = YJpsiPbP8800c4;
} else if (sname == "CDF scaled") {
func = YJpsiCDFscaled;
} else if (sname == "CDF pp") {
func = YJpsiCDFscaledPP;
} else if (sname == "CDF pp 10") {
func = YJpsiCDFscaledPP10;
} else if (sname == "CDF pp 8.8") {
func = YJpsiCDFscaledPP9;
} else if (sname == "CDF pp 7" || sname == "CDF pp 7 flat pt") {
func = YJpsiCDFscaledPP7;
} else if (sname == "CDF pp 3.94") {
func = YJpsiCDFscaledPP4;
} else if (sname == "CDF pp 2.76") {
func = YJpsiCDFscaledPP3;
} else if (sname == "CDF pp 1.9") {
func = YJpsiCDFscaledPP2;
} else if (sname == "CDF pPb 8.8") {
func = YJpsiCDFscaledPPb9;
} else if (sname == "CDF Pbp 8.8") {
func = YJpsiCDFscaledPbP9;
} else if (sname == "CDF PbPb 3.94") {
func = YJpsiCDFscaledPbPb4;
} else if (sname == "Flat" || sname == "CDF pp 7 flat y") {
func = YJpsiFlat;
} else {
func = YJpsi;
}
break;
case kJpsiFromB:
func = YJpsiBPbPb;
break;
case kUpsilonFamily:
case kUpsilonP:
case kUpsilonPP:
case kUpsilon:
if (sname == "Vogt" || sname == "Vogt PbPb") {
func = YUpsilonPbPb;
} else if (sname == "Vogt pp") {
func = YUpsilonPP;
} else if (sname == "pp 7") {
func = YUpsilonPP7000;
} else if (sname == "pp 8") {
func = YUpsilonPP8000;
} else if (sname == "pp 2.76") {
func = YUpsilonPP2760;
} else if (sname == "pp 4.4") {
func = YUpsilonPP4400;
} else if (sname == "pp 5.03") {
func = YUpsilonPP5030;
} else if (sname == "pp 8.8") {
func = YUpsilonPP8800;
} else if (sname == "pp 7 poly") {
func = YUpsilonPPpoly7000;
} else if (sname == "pp 2.76 poly") {
func = YUpsilonPPpoly2760;
} else if (sname == "PbPb 2.76") {
func = YUpsilonPbPb2760;
} else if (sname == "PbPb 2.76c1") {
func = YUpsilonPbPb2760c1;
} else if (sname == "PbPb 2.76c2") {
func = YUpsilonPbPb2760c2;
} else if (sname == "PbPb 2.76c3") {
func = YUpsilonPbPb2760c3;
} else if (sname == "PbPb 2.76c4") {
func = YUpsilonPbPb2760c4;
} else if (sname == "PbPb 2.76c5") {
func = YUpsilonPbPb2760c5;
} else if (sname == "PbPb 2.76c6") {
func = YUpsilonPbPb2760c6;
} else if (sname == "PbPb 2.76c7") {
func = YUpsilonPbPb2760c7;
} else if (sname == "PbPb 2.76c8") {
func = YUpsilonPbPb2760c8;
} else if (sname == "PbPb 2.76c9") {
func = YUpsilonPbPb2760c9;
} else if (sname == "PbPb 2.76c10") {
func = YUpsilonPbPb2760c10;
} else if (sname == "PbPb 2.76c11") {
func = YUpsilonPbPb2760c11;
} else if (sname == "pPb 5.03") {
func = YUpsilonPPb5030;
} else if (sname == "pPb 5.03c1") {
func = YUpsilonPPb5030c1;
} else if (sname == "pPb 5.03c2") {
func = YUpsilonPPb5030c2;
} else if (sname == "pPb 5.03c3") {
func = YUpsilonPPb5030c3;
} else if (sname == "pPb 5.03c4") {
func = YUpsilonPPb5030c4;
} else if (sname == "Pbp 5.03") {
func = YUpsilonPbP5030;
} else if (sname == "Pbp 5.03c1") {
func = YUpsilonPbP5030c1;
} else if (sname == "Pbp 5.03c2") {
func = YUpsilonPbP5030c2;
} else if (sname == "Pbp 5.03c3") {
func = YUpsilonPbP5030c3;
} else if (sname == "Pbp 5.03c4") {
func = YUpsilonPbP5030c4;
} else if (sname == "pPb 8.8") {
func = YUpsilonPPb8800;
} else if (sname == "pPb 8.8c1") {
func = YUpsilonPPb8800c1;
} else if (sname == "pPb 8.8c2") {
func = YUpsilonPPb8800c2;
} else if (sname == "pPb 8.8c3") {
func = YUpsilonPPb8800c3;
} else if (sname == "pPb 8.8c4") {
func = YUpsilonPPb8800c4;
} else if (sname == "Pbp 8.8") {
func = YUpsilonPbP8800;
} else if (sname == "Pbp 8.8c1") {
func = YUpsilonPbP8800c1;
} else if (sname == "Pbp 8.8c2") {
func = YUpsilonPbP8800c2;
} else if (sname == "Pbp 8.8c3") {
func = YUpsilonPbP8800c3;
} else if (sname == "Pbp 8.8c4") {
func = YUpsilonPbP8800c4;
} else if (sname == "CDF scaled") {
func = YUpsilonCDFscaled;
} else if (sname == "CDF pp") {
func = YUpsilonCDFscaledPP;
} else if (sname == "CDF pp 10") {
func = YUpsilonCDFscaledPP10;
} else if (sname == "CDF pp 8.8") {
func = YUpsilonCDFscaledPP9;
} else if (sname == "CDF pp 7") {
func = YUpsilonCDFscaledPP7;
} else if (sname == "CDF pp 3.94") {
func = YUpsilonCDFscaledPP4;
} else if (sname == "CDF pPb 8.8") {
func = YUpsilonCDFscaledPPb9;
} else if (sname == "CDF Pbp 8.8") {
func = YUpsilonCDFscaledPbP9;
} else if (sname == "CDF PbPb 3.94") {
func = YUpsilonCDFscaledPbPb4;
} else if (sname == "Flat") {
func = YUpsilonFlat;
} else {
func = YUpsilon;
}
break;
case kCharm:
if (sname == "F0M0S0 pp") {
func = YCharmF0M0S0PP;
} else if (sname == "F1M0S0 pp") {
func = YCharmF1M0S0PP;
} else if (sname == "F2M0S0 pp") {
func = YCharmF2M0S0PP;
} else if (sname == "F0M1S0 pp") {
func = YCharmF0M1S0PP;
} else if (sname == "F0M2S0 pp") {
func = YCharmF0M2S0PP;
} else if (sname == "F0M0S1 pp") {
func = YCharmF0M0S1PP;
} else if (sname == "F0M0S2 pp") {
func = YCharmF0M0S2PP;
} else if (sname == "F0M0S3 pp") {
func = YCharmF0M0S3PP;
} else if (sname == "F0M0S4 pp") {
func = YCharmF0M0S4PP;
} else if (sname == "F0M0S5 pp") {
func = YCharmF0M0S5PP;
} else if (sname == "F0M0S6 pp") {
func = YCharmF0M0S6PP;
} else {
func = YCharm;
}
break;
case kBeauty:
if (sname == "F0M0S0 pp") {
func = YBeautyF0M0S0PP;
} else if (sname == "F1M0S0 pp") {
func = YBeautyF1M0S0PP;
} else if (sname == "F2M0S0 pp") {
func = YBeautyF2M0S0PP;
} else if (sname == "F0M1S0 pp") {
func = YBeautyF0M1S0PP;
} else if (sname == "F0M2S0 pp") {
func = YBeautyF0M2S0PP;
} else if (sname == "F0M0S1 pp") {
func = YBeautyF0M0S1PP;
} else if (sname == "F0M0S2 pp") {
func = YBeautyF0M0S2PP;
} else if (sname == "F0M0S3 pp") {
func = YBeautyF0M0S3PP;
} else if (sname == "F0M0S4 pp") {
func = YBeautyF0M0S4PP;
} else if (sname == "F0M0S5 pp") {
func = YBeautyF0M0S5PP;
} else if (sname == "F0M0S6 pp") {
func = YBeautyF0M0S6PP;
} else {
func = YBeauty;
}
break;
case kPion:
if (sname == "2010 Pos PP") {
func = YKaonPion2010PP;
} else if (sname == "2010 Neg PP") {
func = YKaonPion2010PP;
} else {
func = YPion;
}
break;
case kKaon:
if (sname == "2010 Pos PP") {
func = YKaonPion2010PP;
} else if (sname == "2010 Neg PP") {
func = YKaonPion2010PP;
} else {
func = YKaon;
}
break;
case kChic0:
func = YChic0;
break;
case kChic:
func = YChic;
break;
case kRho:
func = YRho;
break;
default:
func = 0;
printf("<GeneratorParamMUONlib::GetY> unknown parametrisation\n");
}
return func;
}
//
// Chi
//
//
// pt-distribution
//____________________________________________________________
Double_t GeneratorParamMUONlib::PtChic0(const Double_t *px,
const Double_t * /*dummy*/) {
// Chi_c1 pT
const Double_t kpt0 = 4.;
const Double_t kxn = 3.6;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtChic1(const Double_t *px,
const Double_t * /*dummy*/) {
// Chi_c1 pT
const Double_t kpt0 = 4.;
const Double_t kxn = 3.6;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtChic2(const Double_t *px,
const Double_t * /*dummy*/) {
// Chi_c2 pT
const Double_t kpt0 = 4.;
const Double_t kxn = 3.6;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
Double_t GeneratorParamMUONlib::PtChic(const Double_t *px,
const Double_t * /*dummy*/) {
// Chi_c family pT
const Double_t kpt0 = 4.;
const Double_t kxn = 3.6;
Double_t x = *px;
//
Double_t pass1 = 1. + (x / kpt0) * (x / kpt0);
return x / TMath::Power(pass1, kxn);
}
//
// y-distribution
//____________________________________________________________
Double_t GeneratorParamMUONlib::YChic0(const Double_t *py,
const Double_t * /*dummy*/) {
// Chi-1c y
const Double_t ky0 = 4.;
const Double_t kb = 1.;
Double_t yj;
Double_t y = TMath::Abs(*py);
//
if (y < ky0)
yj = kb;
else
yj = kb * TMath::Exp(-(y - ky0) * (y - ky0) / 2);
return yj;
}
Double_t GeneratorParamMUONlib::YChic1(const Double_t *py,
const Double_t * /*dummy*/) {
// Chi-1c y
const Double_t ky0 = 4.;
const Double_t kb = 1.;
Double_t yj;
Double_t y = TMath::Abs(*py);
//
if (y < ky0)
yj = kb;
else
yj = kb * TMath::Exp(-(y - ky0) * (y - ky0) / 2);
return yj;
}
Double_t GeneratorParamMUONlib::YChic2(const Double_t *py,
const Double_t * /*dummy*/) {
// Chi-2c y
const Double_t ky0 = 4.;
const Double_t kb = 1.;
Double_t yj;
Double_t y = TMath::Abs(*py);
//
if (y < ky0)
yj = kb;
else
yj = kb * TMath::Exp(-(y - ky0) * (y - ky0) / 2);
return yj;
}
Double_t GeneratorParamMUONlib::YChic(const Double_t *py,
const Double_t * /*dummy*/) {
// Chi_c family y
const Double_t ky0 = 4.;
const Double_t kb = 1.;
Double_t yj;
Double_t y = TMath::Abs(*py);
//
if (y < ky0)
yj = kb;
else
yj = kb * TMath::Exp(-(y - ky0) * (y - ky0) / 2);
return yj;
}
// particle composition
//
Int_t GeneratorParamMUONlib::IpChic0(TRandom *) {
// Chi composition
return 10441;
}
//
Int_t GeneratorParamMUONlib::IpChic1(TRandom *) {
// Chi composition
return 20443;
}
Int_t GeneratorParamMUONlib::IpChic2(TRandom *) {
// Chi_c2 prime composition
return 445;
}
Int_t GeneratorParamMUONlib::IpChic(TRandom *) {
// Chi composition
Int_t ip;
Float_t r = gRandom->Rndm();
if (r < 0.001) {
ip = 10441;
} else if (r < 0.377) {
ip = 20443;
} else {
ip = 445;
}
return ip;
}
//_____________________________________________________________
typedef Int_t (*GenFuncIp)(TRandom *);
GenFuncIp GeneratorParamMUONlib::GetIp(Int_t param, const char *tname) const {
// Return pointer to particle type parameterisation
TString sname = TString(tname);
GenFuncIp func;
switch (param) {
case kPhi:
func = IpPhi;
break;
case kEta:
func = IpEta;
break;
case kOmega:
func = IpOmega;
break;
case kJpsiFamily:
func = IpJpsiFamily;
break;
case kPsiP:
func = IpPsiP;
break;
case kJpsi:
case kJpsiFromB:
func = IpJpsi;
break;
case kUpsilon:
func = IpUpsilon;
break;
case kUpsilonFamily:
func = IpUpsilonFamily;
break;
case kUpsilonP:
func = IpUpsilonP;
break;
case kUpsilonPP:
func = IpUpsilonPP;
break;
case kCharm:
func = IpCharm;
break;
case kBeauty:
func = IpBeauty;
break;
case kPion:
if (sname == "2010 Pos PP") {
func = IpPionPos;
} else if (sname == "2010 Neg PP") {
func = IpPionNeg;
} else {
func = IpPion;
}
break;
case kKaon:
if (sname == "2010 Pos PP") {
func = IpKaonPos;
} else if (sname == "2010 Neg PP") {
func = IpKaonNeg;
} else {
func = IpKaon;
}
break;
case kChic0:
func = IpChic0;
break;
case kChic1:
func = IpChic1;
break;
case kChic2:
func = IpChic2;
break;
case kChic:
func = IpChic;
break;
case kRho:
func = IpRho;
break;
default:
func = 0;
printf("<GeneratorParamMUONlib::GetIp> unknown parametrisation\n");
}
return func;
}
Float_t GeneratorParamMUONlib::Interpolate(Float_t x, Float_t *y, Float_t x0,
Float_t dx, Int_t n, Int_t no) {
//
// Neville's alorithm for interpolation
//
// x: x-value
// y: Input array
// x0: minimum x
// dx: step size
// n: number of data points
// no: order of polynom
//
Float_t *c = new Float_t[n];
Float_t *d = new Float_t[n];
Int_t m, i;
for (i = 0; i < n; i++) {
c[i] = y[i];
d[i] = y[i];
}
Int_t ns = int((x - x0) / dx);
Float_t y1 = y[ns];
ns--;
for (m = 0; m < no; m++) {
for (i = 0; i < n - m; i++) {
Float_t ho = x0 + Float_t(i) * dx - x;
Float_t hp = x0 + Float_t(i + m + 1) * dx - x;
Float_t w = c[i + 1] - d[i];
Float_t den = ho - hp;
den = w / den;
d[i] = hp * den;
c[i] = ho * den;
}
Float_t dy;
if (2 * ns < (n - m - 1)) {
dy = c[ns + 1];
} else {
dy = d[ns--];
}
y1 += dy;
}
delete[] c;
delete[] d;
return y1;
}
//=============================================================================
Double_t GeneratorParamMUONlib::PtPionPos2010PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Pos pion
const Double_t par[3] = {2.27501, 0.116141, 5.59591};
Double_t pt = px[0];
Double_t m0 = TDatabasePDG::Instance()->GetParticle(211)->Mass();
Double_t mt = TMath::Sqrt(m0 * m0 + pt * pt);
Double_t nc = par[1] * par[2];
Double_t t1 = (par[2] - 1.) / nc / (nc / (par[2] - 2.) + m0);
Double_t t2 = TMath::Power(1. + (mt - m0) / nc, -1. * par[2]);
Double_t fn = par[0] * pt * t1 * t2;
return fn;
}
//=============================================================================
Double_t GeneratorParamMUONlib::PtPionNeg2010PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Neg pion
const Double_t par[3] = {2.25188, 0.12176, 5.91166};
Double_t pt = px[0];
Double_t m0 = TDatabasePDG::Instance()->GetParticle(211)->Mass();
Double_t mt = TMath::Sqrt(m0 * m0 + pt * pt);
Double_t nc = par[1] * par[2];
Double_t t1 = (par[2] - 1.) / nc / (nc / (par[2] - 2.) + m0);
Double_t t2 = TMath::Power(1. + (mt - m0) / nc, -1. * par[2]);
Double_t fn = par[0] * pt * t1 * t2;
return fn;
}
//=============================================================================
Double_t GeneratorParamMUONlib::PtKaonPos2010PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Pos kaons
const Double_t par[3] = {0.279386, 0.195466, 6.59587};
Double_t pt = px[0];
Double_t m0 = TDatabasePDG::Instance()->GetParticle(321)->Mass();
Double_t mt = TMath::Sqrt(m0 * m0 + pt * pt);
Double_t nc = par[1] * par[2];
Double_t t1 = (par[2] - 1.) / nc / (nc / (par[2] - 2.) + m0);
Double_t t2 = TMath::Power(1. + (mt - m0) / nc, -1. * par[2]);
Double_t fn = par[0] * pt * t1 * t2;
return fn;
}
//=============================================================================
Double_t GeneratorParamMUONlib::PtKaonNeg2010PP(const Double_t *px,
const Double_t * /*dummy*/) {
// Neg kaons
const Double_t par[3] = {0.278927, 0.189049, 6.43006};
Double_t pt = px[0];
Double_t m0 = TDatabasePDG::Instance()->GetParticle(321)->Mass();
Double_t mt = TMath::Sqrt(m0 * m0 + pt * pt);
Double_t nc = par[1] * par[2];
Double_t t1 = (par[2] - 1.) / nc / (nc / (par[2] - 2.) + m0);
Double_t t2 = TMath::Power(1. + (mt - m0) / nc, -1. * par[2]);
Double_t fn = par[0] * pt * t1 * t2;
return fn;
}
//=============================================================================
Double_t GeneratorParamMUONlib::YKaonPion2010PP(const Double_t *px,
const Double_t * /*dummy*/) {
// pions and kaons
Double_t y = px[0];
Double_t sigma = 2.35;
Double_t kernal = y / 2. / sigma;
Double_t fxn = TMath::Exp(-1. * kernal * kernal);
return fxn;
}
//=============================================================================
Int_t GeneratorParamMUONlib::IpPionPos(TRandom *) {
// Pos pions
return 211;
}
//=============================================================================
Int_t GeneratorParamMUONlib::IpPionNeg(TRandom *) {
// Neg pions
return -211;
}
//=============================================================================
Int_t GeneratorParamMUONlib::IpKaonPos(TRandom *) {
// pos Kaons
return 321;
}
//=============================================================================
Int_t GeneratorParamMUONlib::IpKaonNeg(TRandom *) {
// neg Kaons
return -321;
}
|
b7303e0fb22c4b8938dacdc1ca0584abd6720b59
|
5bccf2d2118008c0af6a51a92a042e967e4f2abe
|
/Support/Modules/DGLib/DG.h
|
81eb394add883368a1726c404d01da20708f7e12
|
[
"Apache-2.0"
] |
permissive
|
graphisoft-python/DGLib
|
fa42fadebedcd8daaddde1e6173bd8c33545041d
|
66d8717eb4422b968444614ff1c0c6c1bf50d080
|
refs/heads/master
| 2020-06-13T21:38:18.089834
| 2020-06-12T07:27:54
| 2020-06-12T07:27:54
| 194,795,808
| 3
| 0
|
Apache-2.0
| 2020-06-12T07:27:55
| 2019-07-02T05:45:00
|
C++
|
UTF-8
|
C++
| false
| false
| 108,327
|
h
|
DG.h
|
// *********************************************************************************************************************
// File: DG.h
//
// Description: Main include file of the GRAPHISOFT Dialog Manager
//
// Project: GRAPHISOFT Dialog Manager (DGLib)
//
// Contact person: BM
// *********************************************************************************************************************
#ifndef DG_H
#define DG_H
#pragma once
// --- Includes --------------------------------------------------------------------------------------------------------
#include "Color.hpp"
#include "GSGuid.hpp"
#include "GSRoot.hpp"
#include "PlatformDLLExport.hpp"
#include "Ref.hpp"
#include "UniString.hpp"
#include "RSTypes.hpp"
namespace IO {
class Location;
}
namespace DG {
class Image;
class Icon;
class NumericInputLimitHandler;
}
namespace TE {
class CharStyle;
class ICharStyle;
class IParagraph;
class Paragraph;
class FontFamily;
}
//#if defined (__cplusplus)
// extern "C" {
//#endif
#include "DGDefs.h"
// --- Module export defines -------------------------------------------------------------------------------------------
#define DGCALLBACK CCALL
#if defined (DG_DLL_COMPILE)
#define DG_DLL_EXPORT PLATFORM_DLL_EXPORT
#else
#define DG_DLL_EXPORT PLATFORM_DLL_IMPORT
#endif
// --- Macros ----------------------------------------------------------------------------------------------------------
#define DGGetLoShort(longData) ((short) (longData))
#if defined (WINDOWS)
#define DGGetHiShort(longData) ((short) (((ULong) (longData) >> 16) & 0xFFFF))
#endif
#if defined (macintosh)
#define DGGetHiShort(longData) ((short) ((Int32) (longData) >> 16)) // #19942 hg 02.12.03 macen optimalizalasi hiba volt a fenti kifejezesnel
#endif
#define DGGetHGrow DGGetLoShort
#define DGGetVGrow DGGetHiShort
#define DGGetHCoord DGGetLoShort
#define DGGetVCoord DGGetHiShort
#define DGListGetOldDragPos DGGetLoShort
#define DGListGetNewDragPos DGGetHiShort
#define DGGetPrevItemVal DGGetLoShort
#define DGGetPrevMenuItem DGGetHiShort
// === class NativeUnit ================================================================================================
namespace DG
{
class DG_DLL_EXPORT NativeUnit
{
private:
short value;
public:
NativeUnit (): value (0) { }
explicit NativeUnit (short value) { this->value = value; }
explicit NativeUnit (short value, double scale);
bool operator== (const NativeUnit& rightOp) const { return value == rightOp.value; }
bool operator!= (const NativeUnit& rightOp) const { return value != rightOp.value; }
bool operator> (const NativeUnit& rightOp) const { return value > rightOp.value; }
bool operator>= (const NativeUnit& rightOp) const { return value >= rightOp.value; }
bool operator< (const NativeUnit& rightOp) const { return value < rightOp.value; }
bool operator<= (const NativeUnit& rightOp) const { return value <= rightOp.value; }
NativeUnit& operator= (const NativeUnit& rightOp) { value = rightOp.value; return *this; }
NativeUnit& operator+= (const NativeUnit& rightOp) { value += rightOp.value; return *this; }
NativeUnit& operator-= (const NativeUnit& rightOp) { value -= rightOp.value; return *this; }
NativeUnit operator+ (const NativeUnit& rightOp) const { return NativeUnit (value + rightOp.value); }
NativeUnit operator- (const NativeUnit& rightOp) const { return NativeUnit (value - rightOp.value); }
NativeUnit operator/ (short rightOp) const { return NativeUnit (value / rightOp); }
NativeUnit operator* (short rightOp) const { return NativeUnit (value * rightOp); }
NativeUnit operator- () const { return NativeUnit (-value); } // Unary minus
void Add (const NativeUnit& unit) { value += unit.value; }
short GetValue (void) const { return value; }
GSErrCode Read (GS::IChannel& ic) { GSErrCode result = ic.Read (value); return result; }
GSErrCode Write (GS::OChannel& oc) const { return oc.Write (value); }
};
}
// --- Types -----------------------------------------------------------------------------------------------------------
typedef GS::IntPtr DGMessageData;
typedef GS::IntPtr DGUserData;
struct DGMenuChoiceDialogUniStrings {
GS::UniString selectItemText; // 'Select Item' lefttext for dynamic menu item choice dialog
GS::UniString selectText; // 'Select' text for dynamic menu item choice dialog
GS::UniString cancelText; // 'Cancel' text for dynamic menu item choice dialog
void Init (void)
{
selectItemText.Clear ();
selectText.Clear ();
cancelText.Clear ();
}
DGMenuChoiceDialogUniStrings ()
{
Init ();
}
};
struct DGRulerUniStrings {
GS::UniString mmText; // mm text for the ruler
GS::UniString cmText; // cm text for the ruler
GS::UniString dmText; // dm text for the ruler
GS::UniString mText; // m text for the ruler
GS::UniString kmText; // km text for the ruler
GS::UniString leftTabText; // left tabulator text for the ruler
GS::UniString rightTabText; // right tabulator text for the ruler
GS::UniString middleTabText; // middle tabulator text for the ruler
GS::UniString decimalTabText; // deciaml tabulator text for the ruler
GS::UniString firstLineIndentText; // first line indent text for the ruler
GS::UniString leftIndentText; // left indent text for the ruler
GS::UniString rightIndentText; // right indent text for the ruler
void Init (void)
{
mmText.Clear ();
cmText.Clear ();
dmText.Clear ();
mText.Clear ();
kmText.Clear ();
leftTabText.Clear ();
rightTabText.Clear ();
middleTabText.Clear ();
decimalTabText.Clear ();
firstLineIndentText.Clear ();
leftIndentText.Clear ();
rightIndentText.Clear ();
}
DGRulerUniStrings ()
{
Init ();
}
};
struct DGFileDialogUniStrings {
GS::UniString openText; // 'Open' text for the OpenFolder dialog OK button
GS::UniString chooseText; // 'Choose' text for the OpenFolder dialog OK button
GS::UniString fileNameText; // 'File name:' text for the OpenFolder dialog static text
GS::UniString folderNameText; // 'Folder name:' text for the OpenFolder dialog static text
GS::UniString fileOrFolderText; // 'File or folder:' text for the OpenFolder dialog static text
GS::UniString warningCaptionText; // 'Warning' title of the alert
GS::UniString warningAlertText; // Alert text of the Warning in the file dialog
GS::UniString warningAlertAllTypeText; // Alert text of the Warning in the file dialog when "All file type (*.*)" selected
void Init (void)
{
openText.Clear ();
chooseText.Clear ();
fileNameText.Clear ();
folderNameText.Clear ();
fileOrFolderText.Clear ();
warningCaptionText.Clear ();
warningAlertText.Clear ();
warningAlertAllTypeText.Clear ();
}
DGFileDialogUniStrings ()
{
Init ();
}
};
struct DGApplMenuUniStrings {
GS::UniString servicesText; // Services menu text for application menu
GS::UniString hideText; // Hide menuitem text for application menu
GS::UniString hideothersText; // Hide Others menuitem text for application menu
GS::UniString showAllText; // Show All menuitem text for application menu
GS::UniString quitText; // Quit menuitem text for application menu
GS::UniString helpMenuText; // Help menu text
void Init (void)
{
servicesText.Clear ();
hideText.Clear ();
hideothersText.Clear ();
showAllText.Clear ();
quitText.Clear ();
helpMenuText.Clear ();
}
DGApplMenuUniStrings ()
{
Init ();
}
};
struct DGColorPanelUniStrings {
GS::UniString okText; // OK button text for Color panel
GS::UniString cancelText; // Cancel button text for Color panel
void Init (void)
{
okText.Clear ();
cancelText.Clear ();
}
DGColorPanelUniStrings ()
{
Init ();
}
};
struct DGNumericInputLimitHandlers {
DG::NumericInputLimitHandler* realHandler;
DG::NumericInputLimitHandler* angleHandler;
DG::NumericInputLimitHandler* polarAngleHandler;
DG::NumericInputLimitHandler* lengthHandler;
DG::NumericInputLimitHandler* areaHandler;
DG::NumericInputLimitHandler* volumeHandler;
DG::NumericInputLimitHandler* mmPointHandler;
void Init (void)
{
realHandler = nullptr;
angleHandler = nullptr;
polarAngleHandler = nullptr;
lengthHandler = nullptr;
areaHandler = nullptr;
volumeHandler = nullptr;
mmPointHandler = nullptr;
}
DGNumericInputLimitHandlers ()
{
Init ();
}
};
struct DGInitData {
UChar mainVersion; // Main version number of DG DLL (0-9)
UChar subVersion; // Sub version number of DG DLL (0-9)
UChar revision; // Revision number of DG DLL (0-9)
Int8 filler1; //
GS::UniString northSymb; // North symbol for angle edit text
GS::UniString southSymb; // South symbol for angle edit text
GS::UniString eastSymb; // East symbol for angle edit text
GS::UniString westSymb; // West symbol for angle edit text
GS::UniString gradSymb; // Grad symbol for angle edit text
GS::UniString radSymb; // Radian symbol for angle edit text
GS::UniString degSymb; // Degree #1 symbol for angle edit text
GS::UniString degreeSymb; // Degree #2 symbol for angle edit text
GS::UniString minuteSymb; // Minute symbol for angle edit text
GS::UniString secondSymb; // Second symbol for angle edit text
double internalUnit; // Application's internal unit in mm
IO::Location* pPrefsFileLoc; // Dialog positions prefs file (MAC only)
GSResModule contextMenuResModule; // Context Menu Resource Module
short contextMenuStrListId; // Edittext, Drag & drop and Help context strings list ID
GSResModule applIconResModule; // Application's icon resource module (WIN only)
short applIconId; // Application's icon ID (WIN only)
UShort applLanguageId; // Application's language ID (WIN only)
Int32 fontCharSet; // Character set of dialog fonts (WIN only)
Int32 largeFontSize; // Size of the large dialog font (WIN only)
Int32 smallFontSize; // Size of the small dialog font (WIN only)
Int32 xSmallFontSize; // Size of the extra small font (WIN only)
Int32 largeBoldFontWeight; // Weight of the Bold large font (WIN only)
Int32 smallBoldFontWeight; // Weight of the Bold small font (WIN only)
Int32 xSmallFontWeight; // Weight of the extra small font (WIN only)
GS::UniString largeFontName; // Name of the large dialog font (WIN only)
GS::UniString smallFontName; // Name of the small dialog font (WIN only)
GS::UniString xSmallFontName; // Name of the extra small font (WIN only)
GS::UniString closeMenuText; // Close system menu item text (WIN only)
GS::UniString nextMenuText; // Next system menu item text (WIN only)
GS::UniString errorText; // Title of Error alert (WIN only)
GS::UniString warningText; // Title of Warning alert (WIN only)
GS::UniString infoText; // Title of Information alert (WIN only)
GS::UniString applRegKey; // Application's registry key (WIN only)
GS::UniString allFilesText; // 'All Files' text for file dialog
GS::UniString allTypesText; // 'All Types' text for shortcut printing
DGMenuChoiceDialogUniStrings menuChoiceTexts; // menu choice dialog texts
GSResModule fileNameAlertResModule; // Alert Resource Module
short fileNameAlertId; // Alert ID for too long (WIN) / invalid (MAC) filename
DGRulerUniStrings rulerStrings; // Special strings for the ruler
GS::UniString charPaletteName; // Name of Character Palette (MAC only)
GS::Int32 rtlOrder; // Right to Left order (arabic, hebrew system) 0 or 1
GS::UniString openingBracket; // Opening Bracket for shortcut hint (with space)
GS::UniString closingBracket; // Closing Bracket for shortcut hint
DGFileDialogUniStrings fileDialogStrings; // Special strings for the file dialog
DGApplMenuUniStrings applMenuStrings; // Special strings for application menu (MAC only)
DGColorPanelUniStrings colorPanelStrings; // Special strings for Color Panel (MAC only)
GS::UniString fileTypeTitleOpen; // Title of file type popup in open dialogs (MAC only)
GS::UniString fileTypeTitleSave; // Title of file type popup in save dialogs (MAC only)
GS::UniString chooseButtonTitle; // default title of Ok Button and default window title of folder selection dialog (MAC only)
GS::UniString fontCollections; // Title of font popup's collection item (MAC only)
DGNumericInputLimitHandlers numericInputLimitHandlers; // Handlers for limit the number inputs
void Init (void)
{
mainVersion = 0;
subVersion = 0;
revision = 0;
filler1 = 0;
northSymb.Clear ();
southSymb.Clear ();
eastSymb.Clear ();
westSymb.Clear ();
gradSymb.Clear ();
radSymb.Clear ();
degSymb.Clear ();
degreeSymb.Clear ();
minuteSymb.Clear ();
secondSymb.Clear ();
internalUnit = 0.0;
pPrefsFileLoc = nullptr;
contextMenuResModule = InvalidResModule;
contextMenuStrListId = 0;
applIconResModule = InvalidResModule;
applIconId = DG_NO_ICON;
applLanguageId = 0;
fontCharSet = 0;
largeFontSize = 0;
smallFontSize = 0;
xSmallFontSize = 0;
largeBoldFontWeight = 0;
smallBoldFontWeight = 0;
xSmallFontWeight = 0;
largeFontName.Clear ();
smallFontName.Clear ();
xSmallFontName.Clear ();
closeMenuText.Clear ();
nextMenuText.Clear ();
errorText.Clear ();
warningText.Clear ();
infoText.Clear ();
applRegKey.Clear ();
allFilesText.Clear ();
allTypesText.Clear ();
menuChoiceTexts.Init ();
fileNameAlertResModule = InvalidResModule;
fileNameAlertId = 0;
rulerStrings.Init ();
charPaletteName.Clear ();
rtlOrder = 0;
openingBracket.Clear ();
closingBracket.Clear ();
fileDialogStrings.Init ();
applMenuStrings.Init ();
colorPanelStrings.Init ();
fileTypeTitleOpen.Clear ();
fileTypeTitleSave.Clear ();
chooseButtonTitle.Clear ();
fontCollections.Clear ();
}
DGInitData ()
{
Init ();
}
};
//struct DGFontData {
// float angle; // Angle of base line from X-axis in radian
// short size; // Character size of the font
// UChar bold; // Bold flag (0 / 1)
// UChar italic; // Italic flag (0 / 1)
// UChar underline; // Underline flag (0 / 1)
// UChar outline; // Outline flag (0 / 1) (MAC only)
// UChar shadow; // Shadow flag (0 / 1) (MAC only)
// UChar strikeOut; // Strikeout flag (0 / 1) (WIN only)
// UChar charSet; // Character set of the font (WIN only)
// Int8 filler[3]; //
// Int8 faceName[256]; // Facename of the font
//};
struct IDGItemUpdateData
{
void* drawContext; // GrafPtr (MAC) / HDC (Windows)
double resolutionFactor; // on MAC it's always 1.0
short left; // Client rect left position in dialog coordinates
short top; // Client rect top position in dialog coordinates
IDGItemUpdateData (void):
drawContext (nullptr),
resolutionFactor (1.0),
left (0),
top (0)
{
}
};
class DGTEFontData; // see DGTEFontData.hpp
struct DGResizeMsgData {
short subMessage; // DG_RSM_RESIZEENTER, DG_RSM_ABOUTTORESIZE, DG_RSM_RESIZING, DG_RSM_RESIZEEXIT
bool userResize; // True if the dialog is resizing by the user
Int8 filler; //
short hGrow; // Change of the dialog width in pixels
short vGrow; // Change of the dialog height in pixels
};
struct DGTopStatusMsgData {
short subMessage; // DG_TSM_TOPSTATUSLOST, DG_TSM_TOPSTATUSGAINED
short prevDialId; // Id of the dialog losing the top status
short nextDialId; // Id of the dialog gaining the top status
bool byUser; // True if the top status is changing by a user action
Int8 filler; //
};
struct DGDialogScaleMsgData {
double oldScale;
double newScale;
};
struct DGListTabData {
short begPos; // Tab field left position relative to the client rect
short endPos; // Tab field right position relative to the client rect
short justFlag; // DG_IS_LEFT, DG_IS_CENTER, DG_IS_RIGHT
short truncFlag; // DG_IS_NOTRUNC, DG_IS_TRUNCEND, DG_IS_TRUNCMIDDLE
bool hasSeparator; // There is a vertical separator on the right side of the fab field
bool disabled; // Is the fab field disabled or enabled
};
struct DGListMsgData {
short listItem; // One-base index of the list item
short xPos; // Horizontal mouse position relative to the list item rect
short yPos; // Vertical mouse position relative to the list item rect
short keyFlag; // DG_MOD_COMMAND, DG_MOD_OPTION, DG_MOD_SHIFT
};
struct DGListUpdateData : public IDGItemUpdateData {
short listItem; // One-base index of the list item
bool isHighlighted; // true if the item is highlighted
short tabIndex; // One-base index of the tabulator field, zero for owner drawn list items
short width; // Width in pixels of the tabulator field
short height; // Height in pixels of the tabulator field
short justFlag; // DG_IS_LEFT, DG_IS_CENTER, DG_IS_RIGHT
short truncFlag; // DG_IS_NOTRUNC, DG_IS_TRUNCEND, DG_IS_TRUNCMIDDLE
GS::UniString tabText; // Text of the tabulator field
Gfx::Color fgColor; // Foreground color of the updated list item
Gfx::Color bkColor; // Backround color of the updated list item
void Init (void)
{
listItem = 0;
isHighlighted = false;
tabIndex = 0;
width = 0;
height = 0;
justFlag = 0;
truncFlag = 0;
tabText.Clear ();
fgColor.Set (0x00, 0x00, 0x00);
bkColor.Set (0xFF, 0xFF, 0xFF);
}
DGListUpdateData ()
{
Init ();
}
};
struct DGListHeaderMsgData {
short subMessage; // 0, DG_LHM_RESIZEENTER, DG_LHM_RESIZING, DG_LHM_RESIZEEXIT
short itemIndex; // 1-based index of the clicked, dragged or resized header item
short newIndex; // 1-based new index of the dragged header item
short growSize; // Size change of the resized header item
};
struct DGUserMsgData {
short left; // Client rect left position in dialog coordinates
short top; // Client rect top position in dialog coordinates
short right; // Client rect right position in dialog coordinates
short bottom; // Client rect bottom position in dialog coordinates
short xPos; // Horizontal mouse position relative to the user item client rect
short yPos; // Vertical mouse position relative to the user item client rect
short keyFlag; // DG_MOD_COMMAND, DG_MOD_OPTION, DG_MOD_SHIFT
short buttonFlag; // DG_BUTTON_LEFT, DG_BUTTON_RIGHT, DG_BUTTON_WHEEL
};
struct DGStaticItemMsgData {
short left; // Dialog or item client rect left position
short top; // Dialog or item client rect top position
short right; // Dialog or item client rect right position
short bottom; // Dialog or item client rect bottom position
short xPos; // Horizontal mouse position relative to the client rect
short yPos; // Vertical mouse position relative to the client rect
short keyFlag; // DG_MOD_COMMAND, DG_MOD_OPTION, DG_MOD_SHIFT
short buttonFlag; // DG_BUTTON_LEFT, DG_BUTTON_RIGHT, DG_BUTTON_WHEEL
};
struct DGUserUpdateData : IDGItemUpdateData {
void* updateRgn; // Region to update: RgnHandle (MAC) / HRGN (Windows)
short updateType; // DG_UUT_NORMAL, DG_UUT_PARTIAL, DG_UUT_INUPDATE
short right; // Client rect right position in dialog coordinates
short bottom; // Client rect bottom position in dialog coordinates
short filler; //
void Init (void)
{
updateRgn = NULL;
updateType = 0;
right = 0;
bottom = 0;
filler = 0;
}
DGUserUpdateData ()
{
Init ();
}
};
struct DGResolutionFactorChangeData {
double oldResolutionFactor; //
};
struct DGTreeViewChangeData {
short actionFlag; // DG_TVCF_SELECTION,DG_TVCF_EDITBEGIN,DG_TVCF_EDITEND,
// DG_TVCF_TRACK, DG_TVCF_DROPMOVE, DG_TVCF_DROPCOPY
// DG_TVCF_EXPAND, DG_TVCF_COLLAPSE
short filler; //
Int32 treeItem; // ID of the treeview item
GS::UniString oldText; // Old text of the edited treeview item
GS::UniString newText; // New text of the edited treeview item
void Init (void)
{
actionFlag = 0;
filler = 0;
treeItem = 0;
oldText.Clear ();
newText.Clear ();
}
DGTreeViewChangeData ()
{
Init ();
}
};
struct DGTreeViewItemClickData { // Message data for the DG_MSG_ITEMCLICK message
Int32 treeItem; // Clicked TreeView item id
short partId; // DG_TVPI_STATEICON, DG_TVPI_NORMALICON
DGTreeViewItemClickData (): treeItem (0), partId (0) { }
};
struct DGUniChangeData {
short reqWidth; // Requested/recommended edit control width. Logical value.
short reqHeight; // Requested/recommended edit control height. Logical value.
Int32 oldHScrollPos; // Previous horizontal scrollbar position. Logical value.
Int32 oldVScrollPos; // Previous vertical scrollbar position. Logical value.
Int32 hScrollPos; // Current horizontal scrollbar position. Logical value.
Int32 vScrollPos; // Current vertical scrollbar position. Logical value.
DG::NativeUnit reqWidthNatUnit; // Requested/recommended edit control width. Pixel value.
DG::NativeUnit reqHeightNatUnit; // Requested/recommended edit control height. Pixel value.
void Init (void)
{
reqWidth = 0;
reqHeight = 0;
oldHScrollPos = 0;
oldVScrollPos = 0;
hScrollPos = 0;
vScrollPos = 0;
reqWidthNatUnit = DG::NativeUnit (0);
reqHeightNatUnit = DG::NativeUnit (0);
}
DGUniChangeData ()
{
Init ();
}
};
struct DGRichEditChangeData {
short changeFlag; // DG_RECF_SELECTION, DG_RECF_CONTENT, (all)
// DG_RECF_RESIZEREQUEST, DG_RECF_SCROLLBARPOS (only UniRichEdit)
short filler; //
Int32 oldLength; // Length of text in unicode characters before change
Int32 newLength; // Length of text in unicode characters after change
Int32 oldMinPos; // Selection begin position before change
Int32 oldMaxPos; // Selection end position before change
Int32 newMinPos; // New selection begin position after selection changed
Int32 newMaxPos; // New selection end position after selection changed
DGUniChangeData uniRich; // Only for UniRichEdit
void Init (void)
{
changeFlag = 0;
filler = 0;
oldLength = 0;
newLength = 0;
oldMinPos = 0;
oldMaxPos = 0;
newMinPos = 0;
newMaxPos = 0;
uniRich.Init ();
}
DGRichEditChangeData ()
{
Init ();
}
};
typedef DGRichEditChangeData DGUniRichEditChangeData;
struct DGListViewUpdateData : IDGItemUpdateData {
short listItem; // One-base index of the listview item
short width; // Input/output: width in pixels of the image field
short height; // Input/output: height in pixels of the image field
short filler; //
void Init (void)
{
listItem = 0;
width = 0;
height = 0;
filler = 0;
}
DGListViewUpdateData ()
{
Init ();
}
};
typedef Int32 DGDragFormat; // Drag drop data type identifier format
struct DGDragDropMsgData {
UShort subMessage; // Sub message identifier
UShort effect; // The effect allowed and resulted in a drag and drop operation
UShort denyFeedback; // Denies some feedback functionality -> this is a return value
short xPos; // Horizontal mouse position relative to the client rect
short yPos; // Vertical mouse position relative to the client rect
Int32 insertPos; // Drag and drop item insertion position
short relativePos; // Relative position to the insertion position (on, above, under)
DGDragFormat rqFormat; // Requested format on a delayed drag and drop.
const void* sourceFeedback; // Platform dependent native image. On Mac must be a CGImage or HBITMAP on Windows (defined for user items)
short feedbackLeft; // Left of feedback image rect
short feedbackTop; // Top of feedback image rect
short feedbackRight; // Right of feedback image rect
short feedbackBottom; // Bottom of feedback image rect
bool rightDragCtxMenu; // Bring up the Copy/Move/Cancel right drag context menu
const GS::uchar_t* folderPath; // The destination folder on a delayed 'FILE' drag and drop
};
struct DGContextMenuMsgData {
short panelId; // Id of the panel whose context help is requested
short itemId; // Id of the item above which the event occured
DG::NativeUnit xPos; // Horizontal mouse position in screen coordinates
DG::NativeUnit yPos; // Vertical mouse position in screen coordinates
Int32 treeItem; // The TreeView item above which the event occured
short listItem; // The ListBox or ListView item above which the event occured
short listHeaderItem; // The ListBox Header item above which the event occured
bool inListHeaderButton; // Event occured above the listbox header button
Int32 tabBarItemId; // Tabbar item identifier above the event occured
bool needHelp; // If the first "What's this" context item is selected and the message is not handled (let DG launch the borwser with the help anchor)
};
struct DGWheelMsgData {
short subMessage; // DG_TSM_TRACKENTER, DG_TSM_TRACKING, DG_TSM_TRACKEXIT
short itemId; // Id of the item above which the event occured
short xPos; // Horizontal mouse position relative to the client rect
short yPos; // Vertical mouse position relative to the client rect
short xTrackValue; // Value of the mouse wheel rotation
short yTrackValue; // Value of the mouse wheel rotation
short keyFlag; // DG_MOD_COMMAND, DG_MOD_OPTION, DG_MOD_SHIFT
short processedKeyFlag; // DG_MOD_COMMAND, DG_MOD_OPTION, DG_MOD_SHIFT
bool fromTouchCapableDevice; // Trackpad, Magic Mouse on macOS
};
struct DGItemHelpMsgData {
short subMessage; // DG_HSM_TOOLTIP, DG_HSM_CONTEXTHELP
short itemId; // Id of the item whose help is requested
Int32 treeItem; // The TreeView item above which the help is requested
short listItem; // The ListBox or ListView item whose help is requested
short filler; // filler
Int32 tabBarItemId; // The TabBar item identifier above the help is requested
GS::UniString toolTipText; // the tooltip text
GS::UniString contextHelpAnchor; // the help anchor text
void Init (void)
{
subMessage = 0;
itemId = 0;
treeItem = 0;
listItem = 0;
filler = 0;
tabBarItemId = DG_TB_CONTROL;
toolTipText.Clear ();
contextHelpAnchor.Clear ();
}
DGItemHelpMsgData ()
{
Init ();
}
};
struct DGBackgroundPaintMsgData {
void* drawContext; // GrafPtr (MAC) / HDC (Windows)
short subMessage; // DG_PSM_PAINT, DG_PSM_POSTPAINT
short width; // Width of the client area to paint
short height; // Height of the client area to paint
short filler; //
};
struct DGShortcutEditMsgData {
short itemId; // Id of the item
short modifiers; // modifier flags of the hit key
short key; // charcode, or special key code of the key
};
struct DGMousePosData
{
short dialId; // Id of the dialog above which the mouse currently is
short itemId; // Id of the item above which the mouse currently is
short left; // Dialog or item client rect left position
short top; // Dialog or item client rect top position
short right; // Dialog or item client rect right position
short bottom; // Dialog or item client rect bottom position
short xPos; // Horizontal mouse position relative to the client rect
short yPos; // Vertical mouse position relative to the client rect
short keyFlag; // DG_MOD_COMMAND, DG_MOD_OPTION, DG_MOD_SHIFT
short buttonFlag; // DG_BUTTON_LEFT, DG_BUTTON_RIGHT, DG_BUTTON_WHEEL
DG::NativeUnit nativeXPos; // Mouse position in the native coordinate system
DG::NativeUnit nativeYPos; // Mouse position in the native coordinate system
DGMousePosData ()
{
Clear ();
}
void Clear (void)
{
dialId = 0;
itemId = 0;
left = 0;
top = 0;
right = 0;
bottom = 0;
xPos = 0;
yPos = 0;
keyFlag = 0;
buttonFlag = 0;
nativeXPos = DG::NativeUnit (0);
nativeYPos = DG::NativeUnit (0);
}
};
struct DGUnitData {
double north;
Int32 lengthType;
Int32 lengthDigits;
Int32 lengthFractions;
Int32 areaType;
Int32 areaDigits;
Int32 volumeType;
Int32 volumeDigits;
Int32 nonUnitDigits;
Int32 angleType;
Int32 angleDigits;
Int32 angleAccuracy;
Int32 polarAngleType;
Int32 polarAngleDigits;
Int32 polarAngleAccuracy;
bool show0whole;
bool show0inch;
};
struct DGCharRange {
Int32 startPos; // Start position
Int32 endPos; // End position
};
struct DGTabulatorItem {
short tabType;
double tabPosition;
};
struct DGRulerChangeData {
short changedPart; // DG_RUPT_FIRSTLINEINDENT, DG_RUPT_LEFTINDENT, DG_RUPT_RIGHTINDENT, DG_RUPT_TAB
double newPos; // in logical unit
short tabulatorCount;
DGTabulatorItem* tabulators; // in logical unit
};
struct DGRulerClickData {
short clickedPart; // DG_RUPT_FIRSTLINEINDENT, DG_RUPT_LEFTINDENT, DG_RUPT_RIGHTINDENT, DG_RUPT_TAB, DG_RUPT_NONSPECIFICPART
short tabulatorIndex; // if clickedPart == DG_RUPT_TAB
double position; // in logical unit
};
struct DGSplitterMsgData {
short subMessage; // DG_SPL_DRAGSTART, DG_SPL_DRAG, DG_SPL_DRAGEND
short position; // A new dialog-relative postition according the mouse pointer
};
struct DGTabBarDragItemMsgData {
Int32 tabBarItemId; // The TabBar item identifier above the help is requested
Int32 previousIndex;
Int32 newIndex;
};
struct DGTabBarClickItemMsgData {
Int32 tabBarItemId; // The TabBar item identifier above the help is requested
short itemLeft; // TabBar control relative logical coordinate
short itemTop; // TabBar control relative logical coordinate
short itemRight; // TabBar control relative logical coordinate
short itemBottom; // TabBar control relative logical coordinate
short clickPosX; // TabBar control relative logical coordinate
short clickPosY; // TabBar control relative logical coordinate
short keyFlag;
bool isCloseClicked;
};
struct DGTestData {
short testFlags; // GSAutoTester test On/Off
char* bufferAddr; // Output buffer address allocated by tester
};
struct DGUCItemData
{
GSResModule locResModule;
GSResModule fixResModule;
short ucType;
#if defined (WINDOWS)
short dialId;
short item;
short frameType;
#endif
void Init (void)
{
locResModule = InvalidResModule;
fixResModule = InvalidResModule;
#if defined (WINDOWS)
dialId = 0;
item = 0;
frameType = DG_BF_FRAME;
#endif
}
DGUCItemData ()
{
Init ();
}
};
struct DGMouseDownMsgData {
short listItem; // The ListBox or ListView item above which the event occured
bool hovered; // if the item is hovered.
};
typedef short (DGCALLBACK *DGDialCallBack) (short message, short dialId, short itemId, DGUserData userData, DGMessageData msgData);
#define DG_HELPCENTER_DEFAULT 0
#define DG_HELPCENTER_DYNAMICLOADER 1
#define DG_HELPCENTER_ONLY_LOCAL 2
#define DG_HELPCENTER_ONLY_WEB 3
#define DG_HELPCENTER_NONE 4
typedef short (DGCALLBACK *DGHelpCenterCallBack) (const GS::UniString* helpURL, const GS::UniString* helpAnchor);
typedef std::function<void (void)> DGIdleCallBack;
// --- Exported functions ----------------------------------------------------------------------------------------------
// --- General functions and utilities ---------------------------------------------------------------------------------
DG_DLL_EXPORT bool CCALL DGInit (const DGInitData* initData);
#ifdef macintosh
DG_DLL_EXPORT void CCALL DGDetectWindowLeaks (void);
#endif
DG_DLL_EXPORT void CCALL DGExit (void);
DG_DLL_EXPORT short CCALL DGGetMousePosition (short dialId, DGMousePosData* mPosData);
DG_DLL_EXPORT void CCALL DGImAlive (void);
DG_DLL_EXPORT GSResModule CCALL GetDGResourceModule (void);
DG_DLL_EXPORT GS::uchar_t CCALL DGGetLanguageDependentDecimalChar (void);
DG_DLL_EXPORT void CCALL DGGetAngleSymbols (GS::UniString& degree, GS::UniString& north, GS::UniString& south, GS::UniString& east, GS::UniString& west);
DG_DLL_EXPORT bool CCALL UISetCursor (GSResModule cursorResModule, Int32 cursorId);
DG_DLL_EXPORT void CCALL DGEnableRunnableMessageProcessing (void);
DG_DLL_EXPORT void CCALL DGDisableRunnableMessageProcessing (void);
DG_DLL_EXPORT bool CCALL DGIsRunnableMessageProcessingEnabled (void);
DG_DLL_EXPORT void CCALL DGStoreUserDataToRegistry (const GS::UniString& keyName, const void* data, ULong size);
DG_DLL_EXPORT ULong CCALL DGRetrieveUserDataFromRegistry (const GS::UniString& keyName, void* data);
DG_DLL_EXPORT bool CCALL DGPostCommandToApplication (ULong commandIdParam, Int32 developerIdParam, Int32 productIdParam, UIndex multiCmdIndex);
DG_DLL_EXPORT bool CCALL DGSetTestEnvironment (DGTestData* testData);
DG_DLL_EXPORT void CCALL DGRegisterIdleCallBack (const DGIdleCallBack& idleCallBack);
DG_DLL_EXPORT void CCALL DGCallIdleCallBack (void);
// --- Unit handling and string conversion -----------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGSetUnit (const DGUnitData* uData);
DG_DLL_EXPORT void CCALL DGGetUnit (DGUnitData* uData);
DG_DLL_EXPORT bool CCALL DGIsMetricLengthUnit (void);
DG_DLL_EXPORT Int32 CCALL DGStringToDouble (const GS::UniString& str, double &value, short type);
DG_DLL_EXPORT Int32 CCALL DGStringToDoubleUnit (const DGUnitData* uData, const GS::UniString& str, double &value, short type);
// --- General help, tooltip and context menu utilities ----------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGEnableToolTips (void);
DG_DLL_EXPORT void CCALL DGDisableToolTips (void);
DG_DLL_EXPORT bool CCALL DGIsToolTipsEnabled (void);
DG_DLL_EXPORT void CCALL DGRegisterHelpCenter (const DGHelpCenterCallBack hcCallBack);
DG_DLL_EXPORT bool CCALL DGRegisterAdditionalHelpLocation (Int32 developerId, Int32 localId,
const GS::UniString* localHelpPath = nullptr,
const GS::UniString* localHelpFile = nullptr,
const GS::UniString* tmpPath = nullptr,
const GS::UniString* additionalHelpParameters = nullptr);
DG_DLL_EXPORT bool CCALL DGUnregisterAdditionalHelpLocation (Int32 developerId, Int32 localId);
DG_DLL_EXPORT bool CCALL DGGetDynamicHelpStrings (GSResModule resModule, GSResID resID, short index, GS::UniString* toolTipStr, GS::UniString* anchorStr = nullptr);
DG_DLL_EXPORT bool CCALL DGDisplayContextHelp (void);
DG_DLL_EXPORT bool CCALL DGShowContextHelpWithAnchor (Int32 developerId, Int32 localId, const GS::UniString& helpAnchor);
DG_DLL_EXPORT bool CCALL DGShowOnlineOnlyHelpWithAnchor (Int32 developerId, Int32 localId, const GS::UniString& helpAnchor);
DG_DLL_EXPORT GS::UniString CCALL DGGetRedirectHelpQueryUrlWithAnchor (Int32 developerId, Int32 localId, const GS::UniString& helpAnchor);
// --- Drag and Drop functions -----------------------------------------------------------------------------------------
DG_DLL_EXPORT bool CCALL DGDragHasFormat (DGDragFormat format);
DG_DLL_EXPORT bool CCALL DGDragSetData (DGDragFormat format, void* data, ULong size, short scope);
DG_DLL_EXPORT bool CCALL DGDragSetDelayedData (DGDragFormat format, short scope);
DG_DLL_EXPORT bool CCALL DGDragGetData (DGDragFormat format, void* data, ULong* size);
DG_DLL_EXPORT bool CCALL DGDragGetFileData (DGDragFormat format, const GS::uchar_t* folderPath, void* data, ULong* size);
DG_DLL_EXPORT bool CCALL DGDragModifyBaseFormat (DGDragFormat format, short scope);
DG_DLL_EXPORT short CCALL DGDragGetSourceDialog (void);
DG_DLL_EXPORT short CCALL DGDragGetSourceItem (void);
DG_DLL_EXPORT ULong CCALL DGDragGetItemCount (void);
DG_DLL_EXPORT Int32 CCALL DGDragGetTreeViewItem (ULong index);
DG_DLL_EXPORT short CCALL DGDragGetListBoxItem (ULong index);
DG_DLL_EXPORT short CCALL DGDragGetListViewItem (ULong index);
// --- Alert handling --------------------------------------------------------------------------------------------------
DG_DLL_EXPORT short CCALL DGResAlert (GSResModule resModule, short alertId);
DG_DLL_EXPORT short CCALL DGResAlertParam (GSResModule resModule, short alertId,
const GS::UniString& paramText1, const GS::UniString& paramText2 = GS::UniString(),
const GS::UniString& paramText3 = GS::UniString(), const GS::UniString& paramText4 = GS::UniString());
DG_DLL_EXPORT short CCALL DGAlert (short alertType,
const GS::UniString& titleText = GS::UniString(), const GS::UniString& largeText = GS::UniString(),
const GS::UniString& smallText = GS::UniString(), const GS::UniString& button1Text = GS::UniString(),
const GS::UniString& button2Text = GS::UniString(), const GS::UniString& button3Text = GS::UniString());
// --- Dialog Functions ------------------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGSetDialogResourceModules (short dialId, GSResModule dialResModule, GSResModule dialIconResModule);
DG_DLL_EXPORT void CCALL DGSetDialogResourceModule (short dialId, GSResModule resModule);
DG_DLL_EXPORT GSResModule CCALL DGGetDialogResourceModule (short dialId);
DG_DLL_EXPORT GSResModule CCALL DGGetDialogIconResourceModule (short dialId);
DG_DLL_EXPORT void CCALL DGResetDialogRectangles (void);
DG_DLL_EXPORT void CCALL DGEnableAutoClose (void);
DG_DLL_EXPORT void CCALL DGDisableAutoClose (void);
DG_DLL_EXPORT void CCALL DGSetAutoCloseState (Int32 state);
DG_DLL_EXPORT bool CCALL DGIsAutoCloseEnabled (void);
DG_DLL_EXPORT void CCALL DGSetAutoCloseDelay (ULong closeDelay);
DG_DLL_EXPORT ULong CCALL DGGetAutoCloseDelay (void);
DG_DLL_EXPORT void CCALL DGSetEditUpdateDelay (ULong delay);
DG_DLL_EXPORT ULong CCALL DGGetEditUpdateDelay (void);
DG_DLL_EXPORT void CCALL DGFlushDelayedEditItemChange (void);
DG_DLL_EXPORT short CCALL DGGetColor (const GS::UniString& title, UShort* red, UShort* green, UShort* blue);
DG_DLL_EXPORT short CCALL DGModalDialog (GSResModule dialResModule, short resId, GSResModule dialIconResModule, const DGDialCallBack dCallBack, DGUserData userData);
DG_DLL_EXPORT short CCALL DGBlankModalDialog (short hSize, short vSize, short growFlag, short captionFlag, short frameFlag,
const DGDialCallBack dCallBack, DGUserData userData);
DG_DLL_EXPORT void CCALL DGAbortModalDialog (short dialId);
DG_DLL_EXPORT short CCALL DGModelessInit (GSResModule dialResModule, short resId, GSResModule dialIconResModule, const DGDialCallBack dCallBack, DGUserData userData, short show);
DG_DLL_EXPORT bool CCALL DGModelessHandler (const void* sysMessage, bool onlyUpdate);
DG_DLL_EXPORT void CCALL DGModelessClose (short dialId);
DG_DLL_EXPORT short CCALL DGGetModelessToClose (void);
DG_DLL_EXPORT void CCALL DGSetOnlyUpdateFlag (bool onlyUpdate);
DG_DLL_EXPORT short CCALL DGCreateModelessDialog (GSResModule dialResModule, short resId, GSResModule dialIconResModule, const DGDialCallBack dCallBack, DGUserData userData);
DG_DLL_EXPORT short CCALL DGCreateBlankModelessDialog (short hSize, short vSize, short growFlag, short closeFlag,
short minimizeFlag, short maximizeFlag, short captionFlag,
short frameFlag, const DGDialCallBack dCallBack, DGUserData userData);
DG_DLL_EXPORT void CCALL DGDestroyModelessDialog (short dialId);
DG_DLL_EXPORT short CCALL DGCreatePalette (GSResModule dialResModule, short resId, GSResModule dialIconResModule, const DGDialCallBack dCallBack, DGUserData userData);
DG_DLL_EXPORT short CCALL DGCreateDockablePalette (GSResModule dialResModule, short resId, GSResModule dialIconResModule, const DGDialCallBack dCallBack, DGUserData userData, const GS::Guid& guid);
DG_DLL_EXPORT short CCALL DGCreateBlankPalette (short hSize, short vSize, short growFlag, short closeFlag, short captionFlag,
short frameFlag, const DGDialCallBack dCallBack, DGUserData userData);
DG_DLL_EXPORT short CCALL DGCreateBlankDockablePalette (short hSize, short vSize, short growFlag, short closeFlag, short captionFlag,
short frameFlag, const DGDialCallBack dCallBack, DGUserData userData, const GS::Guid& guid);
DG_DLL_EXPORT void CCALL DGDestroyPalette (short dialId);
DG_DLL_EXPORT short CCALL DGDisablePaletteDock (const GS::Guid& paletteGuid, short orientationFlag);
DG_DLL_EXPORT void CCALL DGSetPaletteDockState (const GS::Guid& paletteGuid, bool isDocked);
DG_DLL_EXPORT bool CCALL DGIsPaletteDocked (const GS::Guid& paletteGuid);
DG_DLL_EXPORT short CCALL DGGetPaletteCaptionType (const GS::Guid& paletteGuid);
DG_DLL_EXPORT void CCALL DGGetDialogGuid (short dialId, GS::Guid* guid);
DG_DLL_EXPORT void CCALL DGBeginProcessEvents (short dialId);
DG_DLL_EXPORT void CCALL DGEndProcessEvents (short dialId);
DG_DLL_EXPORT short CCALL DGSendMessage (short message, short dialId, short itemId, DGMessageData msgData);
DG_DLL_EXPORT short CCALL DGGetDialogType (short dialId);
DG_DLL_EXPORT short CCALL DGIsDialogOpen (short dialId);
DG_DLL_EXPORT short CCALL DGIsDialIdExist (short dialId);
DG_DLL_EXPORT short CCALL DGGetDialogResourceId (short dialId);
DG_DLL_EXPORT void* CCALL DGGetDialogWindow (short dialId);
DG_DLL_EXPORT short CCALL DGGetDialogWindowId (const void* dialWindow);
DG_DLL_EXPORT short CCALL DGGetDialogId (short refDialId, short dialFlag, short dialType);
DG_DLL_EXPORT short CCALL DGGetDialogIds (short refDialId, bool visibleOnly, bool reversed, short dialType, short* dialIds);
DG_DLL_EXPORT void CCALL DGSetDialogZPosition (short dialId, short refDialId);
DG_DLL_EXPORT bool CCALL DGGetDialItemVisibilityMask (short dialId);
DG_DLL_EXPORT void* CCALL DGGetActiveWindow (void);
DG_DLL_EXPORT void CCALL DGSetNextModalParent (const void* parentWindow);
DG_DLL_EXPORT void* CCALL DGGetNextModalParent (void);
DG_DLL_EXPORT void CCALL DGShowModelessDialog (short dialId, short refDialId);
DG_DLL_EXPORT void CCALL DGHideModelessDialog (short dialId);
DG_DLL_EXPORT short CCALL DGIsModelessDialogVisible (short dialId);
DG_DLL_EXPORT void CCALL DGActivateModelessDialog (short dialId);
DG_DLL_EXPORT short CCALL DGIsModelessDialogActive (short dialId);
DG_DLL_EXPORT void CCALL DGSetModelessDialogStatus (short dialId, short dialStatus);
DG_DLL_EXPORT short CCALL DGGetModelessDialogStatus (short dialId);
DG_DLL_EXPORT void CCALL DGSetModelessDialogState (short dialId, short dialState, bool beforeDock = false);
DG_DLL_EXPORT short CCALL DGGetModelessDialogState (short dialId);
DG_DLL_EXPORT void CCALL DGSetModelessDialogDockState (short dialId, short dialState);
DG_DLL_EXPORT short CCALL DGGetModelessDialogDockState (short dialId);
DG_DLL_EXPORT double CCALL DGGetFrameWindowScaleFactor (void); // Scale factor for the application frame
DG_DLL_EXPORT short CCALL DGRegisterHotKey (short dialId, short modifier, short keyCode);
DG_DLL_EXPORT void CCALL DGUnregisterHotKey (short dialId, short hotKeyId);
DG_DLL_EXPORT void CCALL DGEnableHotKeys (short dialId);
DG_DLL_EXPORT void CCALL DGDisableHotKeys (short dialId);
DG_DLL_EXPORT void CCALL DGCenterDialog (short dialId);
DG_DLL_EXPORT void CCALL DGMoveDialog (short dialId, short hDisp, short vDisp);
DG_DLL_EXPORT void CCALL DGMoveDialog (short dialId, const DG::NativeUnit& hDisp, const DG::NativeUnit& vDisp);
DG_DLL_EXPORT void CCALL DGSetDialogClientPosition (short dialId, short posType, const DG::NativeUnit& hPos, const DG::NativeUnit& vPos);
DG_DLL_EXPORT void CCALL DGGetDialogClientPosition (short dialId, short rectType, short posType, DG::NativeUnit* hPos, DG::NativeUnit* vPos); // posType: DG_GLOBAL or DG_SCREEN, rectType: DG_CLIENT or DG_RESTCLIENT
DG_DLL_EXPORT void CCALL DGSetDialogFramePosition (short dialId, short posType, const DG::NativeUnit& hPos, const DG::NativeUnit& vPos); // posType: DG_GLOBAL or DG_SCREEN
DG_DLL_EXPORT void CCALL DGGetDialogFramePosition (short dialId, short rectType, short posType, DG::NativeUnit* hPos, DG::NativeUnit* vPos); // posType: DG_GLOBAL vagy DG_SCREEN, rectType: DG_FRAME vagy DG_RESTFRAME
DG_DLL_EXPORT void CCALL DGSetDialogGrowType (short dialId, short growType);
DG_DLL_EXPORT short CCALL DGGetDialogGrowType (short dialId);
DG_DLL_EXPORT void CCALL DGGrowDialog (short dialId, short hGrow, short vGrow);
DG_DLL_EXPORT void CCALL DGSetDialogClientSize (short dialId, short hSize, short vSize, short fixPoint, bool keepOld);
DG_DLL_EXPORT void CCALL DGSetDialogClientSize (short dialId, const DG::NativeUnit& hSize, const DG::NativeUnit& vSize, short fixPoint, bool keepOld);
DG_DLL_EXPORT void CCALL DGGetDialogClientSize (GSResModule dialResModule, short dialId, short rectType, short* hSize, short* vSize);
DG_DLL_EXPORT void CCALL DGGetDialogClientSize (GSResModule dialResModule, short dialId, short rectType, DG::NativeUnit* hSize, DG::NativeUnit* vSize);
DG_DLL_EXPORT void CCALL DGSetDialogClientMinSize (short dialId, short hMinSize, short vMinSize);
DG_DLL_EXPORT void CCALL DGSetDialogClientMinSize (short dialId, const DG::NativeUnit& hMinSize, const DG::NativeUnit& vMinSize);
DG_DLL_EXPORT void CCALL DGGetDialogClientMinSize (GSResModule dialResModule, short dialId, short* hMinSize, short* vMinSize);
DG_DLL_EXPORT void CCALL DGGetDialogClientMinSize (GSResModule dialResModule, short dialId, DG::NativeUnit* hMinSize, DG::NativeUnit* vMinSize);
DG_DLL_EXPORT void CCALL DGSetDialogFrameSize (short dialId, const DG::NativeUnit& hSize, const DG::NativeUnit& vSize, short fixPoint, bool keepOld);
DG_DLL_EXPORT void CCALL DGGetDialogFrameSize (GSResModule dialResModule, short dialId, short rectType, DG::NativeUnit* hSize, DG::NativeUnit* vSize);
DG_DLL_EXPORT void CCALL DGSetDialogFrameMinSize (short dialId, const DG::NativeUnit& hMinSize, const DG::NativeUnit& vMinSize);
DG_DLL_EXPORT void CCALL DGGetDialogFrameMinSize (GSResModule dialResModule, short dialId, DG::NativeUnit* hMinSize, DG::NativeUnit* vMinSize);
DG_DLL_EXPORT void CCALL DGGetDialogClientOffset (GSResModule dialResModule, short dialId, DG::NativeUnit* hOffset, DG::NativeUnit* vOffset);
DG_DLL_EXPORT void CCALL DGSetDialogTitle (short dialId, const GS::UniString& title);
DG_DLL_EXPORT void CCALL DGSetDialogIcon (short dialId, const DG::Icon& icon);
DG_DLL_EXPORT void CCALL DGSetDialogUserData (short dialId, DGUserData userData);
DG_DLL_EXPORT DGUserData CCALL DGGetDialogUserData (short dialId);
DG_DLL_EXPORT void CCALL DGSetDialogData (short dialId, void* dialData);
DG_DLL_EXPORT void* CCALL DGGetDialogData (short dialId);
DG_DLL_EXPORT bool CCALL DGGetDialogMDID (short dialId, UInt32* developerId, UInt32* localId);
DG_DLL_EXPORT void CCALL DGEnableNormalUpdate (short dialId);
DG_DLL_EXPORT void CCALL DGDisableNormalUpdate (short dialId);
DG_DLL_EXPORT void CCALL DGSetDialogPopupStyle (short dialId);
DG_DLL_EXPORT bool CCALL DGHasDialogPopupStyle (short dialId);
DG_DLL_EXPORT void CCALL DGGrowBoxEnable (short dialId);
DG_DLL_EXPORT void CCALL DGGrowBoxDisable (short dialId);
DG_DLL_EXPORT bool CCALL DGGrowBoxIsEnabled (short dialId);
DG_DLL_EXPORT void CCALL DGGrowBoxSetSize (short dialId, short size);
DG_DLL_EXPORT short CCALL DGGrowBoxGetSize (short dialId);
DG_DLL_EXPORT void CCALL DGGrowBoxSetForm (short dialId, short form);
DG_DLL_EXPORT short CCALL DGGrowBoxGetForm (short dialId);
DG_DLL_EXPORT void CCALL DGEnableDialogDraw (short dialId);
DG_DLL_EXPORT void CCALL DGDisableDialogDraw (short dialId);
DG_DLL_EXPORT void CCALL DGRedrawDialog (short dialId);
// --- Tab page functions ----------------------------------------------------------------------------------------------
DG_DLL_EXPORT short CCALL DGCreateTabPage (short mainDialId, short tabControlId, short tabItem, GSResModule dialResModule, short resId, GSResModule dialIconResModule);
DG_DLL_EXPORT short CCALL DGCreateBlankTabPage (short mainDialId, short tabControlId, short tabItem, short hSize, short vSize);
DG_DLL_EXPORT void CCALL DGDestroyTabPage (short dialId);
DG_DLL_EXPORT short CCALL DGGetTabPageParentId (short dialId);
DG_DLL_EXPORT void CCALL DGSetTabPageGrowType (short dialId, short growType);
DG_DLL_EXPORT short CCALL DGGetTabPageGrowType (short dialId);
DG_DLL_EXPORT void CCALL DGSetTabPageFixPoint (short dialId, short fixPoint);
DG_DLL_EXPORT short CCALL DGGetTabPageFixPoint (short dialId);
DG_DLL_EXPORT void CCALL DGSetTabPageSize (short dialId, short hSize, short vSize);
DG_DLL_EXPORT void CCALL DGGetTabPageSize (short dialId, short* hSize, short* vSize);
DG_DLL_EXPORT void CCALL DGGetTabPageRect (short dialId, short* left, short* top, short* right, short* bottom);
DG_DLL_EXPORT void CCALL DGSetTabPageMinSize (short dialId, short hMinSize, short vMinSize);
DG_DLL_EXPORT void CCALL DGGetTabPageMinSize (GSResModule dialResModule, short dialId, short* hMinSize, short* vMinSize);
// --- Dialog item functions -------------------------------------------------------------------------------------------
DG_DLL_EXPORT short CCALL DGAppendDialogItem (short dialId, short itemType, short itemSubType, short itemData,
short hPos, short vPos, short hSize, short vSize);
DG_DLL_EXPORT void CCALL DGRemoveDialogItem (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRemoveDialogItems (short dialId, short startItem);
DG_DLL_EXPORT short CCALL DGGetDialogItemCount (short dialId);
DG_DLL_EXPORT void CCALL DGSetDefaultOrCancelButton (short dialId, short item, bool asDefault);
DG_DLL_EXPORT void CCALL DGEnableMessage (short dialId, short item, short message, short modifier = DG_EMM_NONE);
DG_DLL_EXPORT void CCALL DGEnableItem (short dialId, short item);
DG_DLL_EXPORT void CCALL DGDisableItem (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSetItemEnable (short dialId, short item, Int32 isEnabled);
DG_DLL_EXPORT bool CCALL DGIsItemEnabled (short dialId, short item);
DG_DLL_EXPORT void CCALL DGShowItem (short dialId, short item);
DG_DLL_EXPORT void CCALL DGHideItem (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSetItemVisible (short dialId, short item, Int32 isVisible);
DG_DLL_EXPORT short CCALL DGIsItemVisible (short dialId, short item);
DG_DLL_EXPORT void CCALL DGFlashItem (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSetItemVisibilityMask (short dialId, bool mask);
DG_DLL_EXPORT void CCALL DGMoveItem (short dialId, short item, short hDisp, short vDisp);
DG_DLL_EXPORT void CCALL DGGrowItem (short dialId, short item, short hGrow, short vGrow);
DG_DLL_EXPORT void CCALL DGMoveGrowItem (short dialId, short item, short hDisp, short vDisp, short hGrow, short vGrow);
DG_DLL_EXPORT void CCALL DGBeginMoveGrowItems (short dialId);
DG_DLL_EXPORT void CCALL DGEndMoveGrowItems (short dialId);
DG_DLL_EXPORT void CCALL DGGetItemRect (short dialId, short item, short* left, short* top, short* right, short* bottom);
DG_DLL_EXPORT void CCALL DGInvalidateItem (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRedrawItem (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSetItemText (short dialId, short item, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGCatItemText (short dialId, short item, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGSetItemUniText (short dialId, short item, const GS::uchar_t* text);
DG_DLL_EXPORT void CCALL DGCatItemUniText (short dialId, short item, const GS::uchar_t* text);
DG_DLL_EXPORT Int32 CCALL DGGetItemUniText (short dialId, short item, GS::uchar_t* text, Int32 size, short eolType);
DG_DLL_EXPORT void CCALL DGSetItemTextColor (short dialId, short item, UShort red, UShort green, UShort blue);
DG_DLL_EXPORT bool CCALL DGGetItemTextColor (short dialId, short item, UShort* red, UShort* green, UShort* blue);
DG_DLL_EXPORT void CCALL DGSetItemBackgroundColor (short dialId, short item, UShort red, UShort green, UShort blue);
DG_DLL_EXPORT bool CCALL DGGetItemBackgroundColor (short dialId, short item, UShort* red, UShort* green, UShort* blue);
DG_DLL_EXPORT void CCALL DGResetDefaultTextColor (short dialId, short item);
DG_DLL_EXPORT void CCALL DGResetDefaultBackgroundColor (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSetItemImage (short dialId, short item, const DG::Image& image);
DG_DLL_EXPORT void CCALL DGSetItemMinLong (short dialId, short item, Int32 value);
DG_DLL_EXPORT void CCALL DGSetItemMaxLong (short dialId, short item, Int32 value);
DG_DLL_EXPORT void CCALL DGSetItemValLong (short dialId, short item, Int32 value);
DG_DLL_EXPORT Int32 CCALL DGGetItemMinLong (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGGetItemMaxLong (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGGetItemValLong (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSetItemMinDouble (short dialId, short item, double value);
DG_DLL_EXPORT void CCALL DGSetItemMaxDouble (short dialId, short item, double value);
DG_DLL_EXPORT void CCALL DGSetItemValDouble (short dialId, short item, double value);
DG_DLL_EXPORT double CCALL DGGetItemMinDouble (short dialId, short item);
DG_DLL_EXPORT double CCALL DGGetItemMaxDouble (short dialId, short item);
DG_DLL_EXPORT double CCALL DGGetItemValDouble (short dialId, short item);
DG_DLL_EXPORT short CCALL DGModified (short dialId, short item);
DG_DLL_EXPORT void CCALL DGResetModified (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSetItemFont (short dialId, short item, short fontType);
DG_DLL_EXPORT short CCALL DGGetItemFont (short dialId, short item);
DG_DLL_EXPORT void DGFontTypeToNameAndSize (short fontSize, GS::UniString* name, short* size);
DG_DLL_EXPORT void CCALL DGSetFocus (short dialId, short item);
DG_DLL_EXPORT void CCALL DGGetFocus (short dialId, short* focusDial, short* focusItem);
DG_DLL_EXPORT void CCALL DGGetRealFocus (short& focusDial, short& focusItem);
DG_DLL_EXPORT void CCALL DGSetItemHelpIndex (short dialId, short item, short helpIndex);
DG_DLL_EXPORT short CCALL DGGetDialogItemType (short dialId, short item);
DG_DLL_EXPORT short CCALL DGGetDialogItemSubType (short dialId, short item);
DG_DLL_EXPORT short CCALL DGGetUCItemType (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSetItemVariousState (short dialId, short itemId, bool isVarious);
DG_DLL_EXPORT bool CCALL DGGetItemVariousState (short dialId, short itemId);
DG_DLL_EXPORT void CCALL DGSetItemVariousText (short dialId, short itemId, const GS::UniString& text);
DG_DLL_EXPORT double CCALL DGGetDialogScaleFactor (short dialId);
DG_DLL_EXPORT double CCALL DGGetItemResolutionFactor (short dialId, short item);
DG_DLL_EXPORT void CCALL DGScrollBarSetPageSize (short dialId, short item, Int32 pageSize);
DG_DLL_EXPORT Int32 CCALL DGScrollBarGetPageSize (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSelectRadio (short dialId, short item);
DG_DLL_EXPORT short CCALL DGGetCheckedRadio (short dialId, short groupId);
DG_DLL_EXPORT void CCALL DGSetCheckBoxState (short dialId, short item, Int32 state);
DG_DLL_EXPORT short CCALL DGGetCheckBoxState (short dialId, short item);
DG_DLL_EXPORT void CCALL DGDateTimeSetMin (short dialId, short item, GSTime minValue);
DG_DLL_EXPORT void CCALL DGDateTimeSetMax (short dialId, short item, GSTime maxValue);
DG_DLL_EXPORT void CCALL DGDateTimeSetValue (short dialId, short item, GSTime value);
DG_DLL_EXPORT GSTime CCALL DGDateTimeGetMin (short dialId, short item);
DG_DLL_EXPORT GSTime CCALL DGDateTimeGetMax (short dialId, short item);
DG_DLL_EXPORT GSTime CCALL DGDateTimeGetValue (short dialId, short item);
// --- User Item functions ---------------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGUserSetBackgroundColor (short dialId, short item, UShort red, UShort green, UShort blue);
DG_DLL_EXPORT bool CCALL DGUserGetBackgroundColor (short dialId, short item, UShort* red, UShort* green, UShort* blue);
DG_DLL_EXPORT void CCALL DGUserGetClientRect (short dialId, short item, short* left, short* top, short* right, short* bottom);
DG_DLL_EXPORT void CCALL DGUserRedrawItem (short dialId, short item, bool erase = true, bool displayImmediately = false);
DG_DLL_EXPORT void* CCALL DGUserGetControl (short dialId, short item);
DG_DLL_EXPORT void CCALL DGUserItemUpdateToolTip (short dialId, short item);
// --- List functions --------------------------------------------------------------------------------------------------
DG_DLL_EXPORT bool CCALL DGListInsertItem (short dialId, short item, short listItem);
DG_DLL_EXPORT bool CCALL DGListInsertSeparator (short dialId, short item, short listItem);
DG_DLL_EXPORT bool CCALL DGListIsSeparatorItem (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListDeleteItem (short dialId, short item, short listItem);
DG_DLL_EXPORT short CCALL DGListGetItemCount (short dialId, short item);
DG_DLL_EXPORT bool CCALL DGListSetTabFieldCount (short dialId, short item, short nTabFields);
DG_DLL_EXPORT short CCALL DGListGetTabFieldCount (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListSetTabFieldData (short dialId, short item, short tabIndex, short begPos, short endPos,
short justFlag, short truncFlag, bool hasSeparator, bool status);
DG_DLL_EXPORT void CCALL DGListGetTabFieldData (short dialId, short item, short tabIndex, short* begPos, short* endPos,
short* justFlag, short* truncFlag, bool* hasSeparator, bool* status);
DG_DLL_EXPORT bool CCALL DGListSetTabData (short dialId, short item, short nTabFields, const DGListTabData* tabData);
DG_DLL_EXPORT void CCALL DGListSetTabFieldUpdateFlag (short dialId, short item, short tabIndex, bool updateFlag);
DG_DLL_EXPORT bool CCALL DGListGetTabFieldUpdateFlag (short dialId, short item, short tabIndex);
DG_DLL_EXPORT void CCALL DGListSetTabFieldToSearch (short dialId, short item, short tabIndex);
DG_DLL_EXPORT short CCALL DGListGetTabFieldToSearch (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListSetDialItemOnTabField (short dialId, short item, short tabIndex, short dialItem);
DG_DLL_EXPORT short CCALL DGListGetDialItemOnTabField (short dialId, short item, short tabIndex);
DG_DLL_EXPORT void CCALL DGListSetItemText (short dialId, short item, short listItem, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGListSetTabItemText (short dialId, short item, short listItem, short tabIndex, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGListSetTabItemIcon (short dialId, short item, short listItem, short tabIndex, const DG::Icon& icon);
DG_DLL_EXPORT void CCALL DGListSetTabItemStyle (short dialId, short item, short listItem, short tabIndex, short style);
DG_DLL_EXPORT short CCALL DGListGetTabItemStyle (short dialId, short item, short listItem, short tabIndex);
DG_DLL_EXPORT void CCALL DGListSetTabItemColor (short dialId, short item, short listItem, short tabIndex, UShort red, UShort green, UShort blue);
DG_DLL_EXPORT bool CCALL DGListGetTabItemColor (short dialId, short item, short listItem, short tabIndex, UShort* red, UShort* green, UShort* blue);
DG_DLL_EXPORT void CCALL DGListSetTabItemBackgroundColor (short dialId, short item, short listItem, short tabIndex, UShort red, UShort green, UShort blue);
DG_DLL_EXPORT bool CCALL DGListGetTabItemBackgroundColor (short dialId, short item, short listItem, short tabIndex, UShort* red, UShort* green, UShort* blue);
DG_DLL_EXPORT void CCALL DGListSetItemStyle (short dialId, short item, short listItem, short style);
DG_DLL_EXPORT short CCALL DGListGetItemStyle (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListSetItemStatus (short dialId, short item, short listItem, short status);
DG_DLL_EXPORT short CCALL DGListGetItemStatus (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListSetItemColor (short dialId, short item, short listItem, UShort red, UShort green, UShort blue);
DG_DLL_EXPORT bool CCALL DGListGetItemColor (short dialId, short item, short listItem, UShort* red, UShort* green, UShort* blue);
DG_DLL_EXPORT void CCALL DGListSetItemBackgroundColor (short dialId, short item, short listItem, UShort red, UShort green, UShort blue);
DG_DLL_EXPORT bool CCALL DGListGetItemBackgroundColor (short dialId, short item, short listItem, UShort* red, UShort* green, UShort* blue);
DG_DLL_EXPORT void CCALL DGListSetItemUserData (short dialId, short item, short listItem, DGUserData value);
DG_DLL_EXPORT DGUserData CCALL DGListGetItemUserData (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListSetItemOwnerDrawFlag (short dialId, short item, short listItem, bool isOwnerDrawn);
DG_DLL_EXPORT bool CCALL DGListGetItemOwnerDrawFlag (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListSelectItem (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListSelectItems (short dialId, short item, const GS::Array<short>& listItems);
DG_DLL_EXPORT void CCALL DGListDeselectItem (short dialId, short item, short listItem);
DG_DLL_EXPORT short CCALL DGListGetSelected (short dialId, short item, short listItem);
DG_DLL_EXPORT short CCALL DGListGetSelCount (short dialId, short item);
DG_DLL_EXPORT short CCALL DGListGetSelItems (short dialId, short item, short* selItems, short maxCount);
DG_DLL_EXPORT void CCALL DGListSetItemHeight (short dialId, short item, short itemHeight);
DG_DLL_EXPORT short CCALL DGListGetItemHeight (short dialId, short item);
DG_DLL_EXPORT short CCALL DGListGetItemWidth (short dialId, short item);
DG_DLL_EXPORT short CCALL DGListGetItemRect (short dialId, short item, short listItem, short* left, short* top, short* right, short* bottom);
DG_DLL_EXPORT void CCALL DGListSetNoPartialItems (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListEnableSeparatorLines (short dialId, short item, bool hasSeparatorLines);
DG_DLL_EXPORT bool CCALL DGListHasSeparatorLines (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListSetSeparatorLineColor (short dialId, short item, UShort red, UShort green, UShort blue);
DG_DLL_EXPORT void CCALL DGListGetSeparatorLineColor (short dialId, short item, UShort* red, UShort* green, UShort* blue);
DG_DLL_EXPORT void CCALL DGListEnableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListDisableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListRedrawItem (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListRedrawTabItem (short dialId, short item, short listItem, short tabIndex);
DG_DLL_EXPORT void CCALL DGListSetScrollPosition (short dialId, short item, short scrollPosition);
DG_DLL_EXPORT short CCALL DGListGetScrollPosition (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListScrollUp (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListScrollDown (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListSetHScrollPosition (short dialId, short item, short scrollPosition);
DG_DLL_EXPORT short CCALL DGListGetHScrollPosition (short dialId, short item);
DG_DLL_EXPORT short CCALL DGListGetItemFromPosition (short dialId, short item, short xPos, short yPos);
DG_DLL_EXPORT void CCALL DGListSetHelpStyle (short dialId, short item, Int32 helpStyle);
DG_DLL_EXPORT Int32 CCALL DGListGetHelpStyle (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListSetHeaderFlags (short dialId, short item, bool isSynchron, bool isPushable, bool isDragable);
DG_DLL_EXPORT void CCALL DGListGetHeaderFlags (short dialId, short item, bool* isSynchron, bool* isPushable, bool* isDragable);
DG_DLL_EXPORT short CCALL DGListGetHeaderHeight (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListSetHeaderItemCount (short dialId, short item, short itemCount);
DG_DLL_EXPORT short CCALL DGListGetHeaderItemCount (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListSetHeaderItemText (short dialId, short item, short headerItem, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGListSetHeaderItemIcon (short dialId, short item, short headerItem, const DG::Icon& icon);
DG_DLL_EXPORT void CCALL DGListSetHeaderItemFont (short dialId, short item, short headerItem, short font);
DG_DLL_EXPORT short CCALL DGListGetHeaderItemFont (short dialId, short item, short headerItem);
DG_DLL_EXPORT void CCALL DGListSetHeaderItemFlags (short dialId, short item, short headerItem, short style, bool isSizeable);
DG_DLL_EXPORT void CCALL DGListGetHeaderItemFlags (short dialId, short item, short headerItem, short* style, bool* isSizeable);
DG_DLL_EXPORT short CCALL DGListSetHeaderItemSize (short dialId, short item, short headerItem, short size);
DG_DLL_EXPORT short CCALL DGListGetHeaderItemSize (short dialId, short item, short headerItem);
DG_DLL_EXPORT void CCALL DGListSetHeaderItemMinSize (short dialId, short item, short headerItem, short minSize);
DG_DLL_EXPORT short CCALL DGListGetHeaderItemMinSize (short dialId, short item, short headerItem);
DG_DLL_EXPORT void CCALL DGListSetHeaderItemArrowType (short dialId, short item, short headerItem, short arrowType);
DG_DLL_EXPORT short CCALL DGListGetHeaderItemArrowType (short dialId, short item, short headerItem);
DG_DLL_EXPORT void CCALL DGListSetHeaderButtonIcon (short dialId, short item, const DG::Icon& icon);
DG_DLL_EXPORT void CCALL DGListEnableHeaderButton (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListDisableHeaderButton (short dialId, short item);
DG_DLL_EXPORT bool CCALL DGListIsHeaderButtonEnabled (short dialId, short item);
// --- PopUp control functions -----------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGPopUpInsertItem (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGPopUpInsertSeparator (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGPopUpDeleteItem (short dialId, short item, short popupItem);
DG_DLL_EXPORT short CCALL DGPopUpGetItemCount (short dialId, short item);
DG_DLL_EXPORT void CCALL DGPopUpSelectItem (short dialId, short item, short popupItem);
DG_DLL_EXPORT short CCALL DGPopUpGetSelected (short dialId, short item);
DG_DLL_EXPORT void CCALL DGPopUpSetItemText (short dialId, short item, short popupItem, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGPopUpSetItemIcon (short dialId, short item, short popupItem, const DG::Icon& icon);
DG_DLL_EXPORT void CCALL DGPopUpSetItemStyle (short dialId, short item, short popupItem, short style);
DG_DLL_EXPORT short CCALL DGPopUpGetItemStyle (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGPopUpSetItemStatus (short dialId, short item, short popupItem, short status);
DG_DLL_EXPORT short CCALL DGPopUpGetItemStatus (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGPopUpSetItemUserData (short dialId, short item, short popupItem, DGUserData value);
DG_DLL_EXPORT DGUserData CCALL DGPopUpGetItemUserData (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGPopUpSetItemCharCode (short dialId, short item, short popupItem, GSCharCode charCode);
DG_DLL_EXPORT GSCharCode CCALL DGPopUpGetItemCharCode (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGPopUpEnableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGPopUpDisableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGPopUpInitAsFontPopupWithSortMode (short dialId, short item, /*TE::FontFamily::SortMode*/Int32 inSortMode);
DG_DLL_EXPORT void CCALL DGPopUpAddFont (short dialId, short item, const TE::FontFamily& fontFamily);
DG_DLL_EXPORT void CCALL DGPopUpSelectFont (short dialId, short item, const TE::FontFamily& fontFamily);
DG_DLL_EXPORT const TE::FontFamily* CCALL DGPopUpGetSelectedFont (short dialId, short item);
DG_DLL_EXPORT void CCALL DGPopUpRefreshFontFavorites (short dialId, short item);
DG_DLL_EXPORT bool CCALL DGPopUpIsSeparatorItem (short dialId, short item, short popupItem);
// --- TabControl functions --------------------------------------------------------------------------------------------
DG_DLL_EXPORT bool CCALL DGTabControlInsertItem (short dialId, short item, short tabItem);
DG_DLL_EXPORT bool CCALL DGTabControlDeleteItem (short dialId, short item, short tabItem);
DG_DLL_EXPORT short CCALL DGTabControlGetItemCount (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabControlSetItemText (short dialId, short item, short tabItem, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGTabControlSetItemIcon (short dialId, short item, short tabItem, const DG::Icon& icon);
DG_DLL_EXPORT void CCALL DGTabControlEnableItem (short dialId, short item, short tabItem);
DG_DLL_EXPORT void CCALL DGTabControlDisableItem (short dialId, short item, short tabItem);
DG_DLL_EXPORT void CCALL DGTabControlSetItemStatus (short dialId, short item, short tabItem, bool enable);
DG_DLL_EXPORT bool CCALL DGTabControlIsItemEnabled (short dialId, short item, short tabItem);
DG_DLL_EXPORT void CCALL DGTabControlSelectItem (short dialId, short item, short tabItem);
DG_DLL_EXPORT short CCALL DGTabControlGetSelectedItem (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabControlSetClientSize (short dialId, short item, short hSize, short vSize);
DG_DLL_EXPORT void CCALL DGTabControlGetClientSize (short dialId, short item, short* hSize, short* vSize);
DG_DLL_EXPORT void CCALL DGTabControlGetClientRect (short dialId, short item, short* left, short* top, short* right, short* bottom);
DG_DLL_EXPORT void CCALL DGTabControlClientToFrame (short dialId, short item, short* hSize, short* vSize);
DG_DLL_EXPORT void CCALL DGTabControlFrameToClient (short dialId, short item, short* hSize, short* vSize);
DG_DLL_EXPORT short CCALL DGTabControlGetTabPageId (short dialId, short item, short tabItem);
// --- PushMenu control functions --------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGPushMenuSetItemCount (short dialId, short item, short itemCount);
DG_DLL_EXPORT short CCALL DGPushMenuGetItemCount (short dialId, short item);
DG_DLL_EXPORT void CCALL DGPushMenuSelectItem (short dialId, short item, short menuItem);
DG_DLL_EXPORT short CCALL DGPushMenuGetSelected (short dialId, short item);
DG_DLL_EXPORT void CCALL DGPushMenuCheck (short dialId, short item, short pushMenuItem);
DG_DLL_EXPORT short CCALL DGPushMenuIsChecked (short dialId, short item);
DG_DLL_EXPORT void CCALL DGPushMenuEnableItem (short dialId, short item, short menuItem);
DG_DLL_EXPORT void CCALL DGPushMenuDisableItem (short dialId, short item, short menuItem);
DG_DLL_EXPORT void CCALL DGPushMenuSetItemEnable (short dialId, short item, short pushMenuItem, short isEnabled);
DG_DLL_EXPORT bool CCALL DGPushMenuIsItemEnabled (short dialId, short item, short menuItem);
DG_DLL_EXPORT void CCALL DGPushMenuSetItemIcon (short dialId, short item, short menuItem, const DG::Icon& icon);
// --- TreeView functions ----------------------------------------------------------------------------------------------
DG_DLL_EXPORT Int32 CCALL DGTreeViewInsertItem (short dialId, short item, Int32 parentItem, Int32 treeItem);
DG_DLL_EXPORT void CCALL DGTreeViewDeleteItem (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT Int32 CCALL DGTreeViewGetItemCount (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGTreeViewGetItem (short dialId, short item, Int32 treeItem, short itemFlag);
DG_DLL_EXPORT Int32 CCALL DGTreeViewGetItemFromPosition (short dialId, short item, short xPos, short yPos);
DG_DLL_EXPORT Int32 CCALL DGTreeViewGetTopMostParent (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT bool CCALL DGTreeViewHasAncestor (short dialId, short item, Int32 treeItem, Int32 ancestorItem);
DG_DLL_EXPORT Int32 CCALL DGTreeViewGetLastVisibleChild (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT void CCALL DGTreeViewSetItemText (short dialId, short item, Int32 treeItem, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGTreeViewSetItemIcon (short dialId, short item, Int32 treeItem, short iconType, const DG::Icon& icon);
DG_DLL_EXPORT void CCALL DGTreeViewSetIconSize (short dialId, short item, short iconType, short hSize, short vSize);
DG_DLL_EXPORT short CCALL DGTreeViewGetIconSize (short dialId, short item, short iconType, short* hSize, short* vSize);
DG_DLL_EXPORT void CCALL DGTreeViewSetItemStyle (short dialId, short item, Int32 treeItem, short style);
DG_DLL_EXPORT short CCALL DGTreeViewGetItemStyle (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT void CCALL DGTreeViewSetItemStatus (short dialId, short item, Int32 treeItem, short status);
DG_DLL_EXPORT short CCALL DGTreeViewGetItemStatus (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT void CCALL DGTreeViewSetItemColor (short dialId, short item, Int32 treeItem, UShort red,
UShort green, UShort blue);
DG_DLL_EXPORT short CCALL DGTreeViewGetItemColor (short dialId, short item, Int32 treeItem, UShort* red,
UShort* green, UShort* blue);
DG_DLL_EXPORT void CCALL DGTreeViewSetItemUserData (short dialId, short item, Int32 treeItem, DGUserData value);
DG_DLL_EXPORT DGUserData CCALL DGTreeViewGetItemUserData (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT void CCALL DGTreeViewExpandItem (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT void CCALL DGTreeViewCollapseItem (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT short CCALL DGTreeViewIsItemExpanded (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT void CCALL DGTreeViewBeginItemEdit (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT void CCALL DGTreeViewSelectItem (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT void CCALL DGTreeViewDeselectItem (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT Int32 CCALL DGTreeViewGetSelected (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT Int32 CCALL DGTreeViewGetSelCount (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGTreeViewGetSelItems (short dialId, short item, Int32* selItems, Int32 maxCount);
DG_DLL_EXPORT Int32 CCALL DGTreeViewGetScrollPosition (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTreeViewSetScrollPosition (short dialId, short item, Int32 scrollPos);
DG_DLL_EXPORT void CCALL DGTreeViewEnableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTreeViewDisableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTreeViewRedrawItem (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT short CCALL DGTreeViewGetItemRect (short dialId, short item, Int32 treeItem,
short* left, short* top, short* right, short* bottom);
DG_DLL_EXPORT void CCALL DGTreeViewSetHelpStyle (short dialId, short item, Int32 helpStyle);
DG_DLL_EXPORT Int32 CCALL DGTreeViewGetHelpStyle (short dialId, short item);
// --- ListView functions ----------------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGListViewInsertItem (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListViewDeleteItem (short dialId, short item, short listItem);
DG_DLL_EXPORT short CCALL DGListViewGetItemCount (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewSetItemText (short dialId, short item, short listItem, const GS::UniString& text);
DG_DLL_EXPORT short CCALL DGListViewGetItemImageType (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListViewSetItemImage (short dialId, short item, short listItem, short imageType, const DG::Image& image);
DG_DLL_EXPORT void CCALL DGListViewSetItemImageIndex (short dialId, short item, short listItem, short imageIndex);
DG_DLL_EXPORT short CCALL DGListViewGetItemImageIndex (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListViewSetItemOwnerDrawFlag (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListViewSetItemStyle (short dialId, short item, short listItem, short style);
DG_DLL_EXPORT short CCALL DGListViewGetItemStyle (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListViewSetItemStatus (short dialId, short item, short listItem, short status);
DG_DLL_EXPORT short CCALL DGListViewGetItemStatus (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListViewSetItemColor (short dialId, short item, short listItem, UShort red,
UShort green, UShort blue);
DG_DLL_EXPORT short CCALL DGListViewGetItemColor (short dialId, short item, short listItem, UShort* red,
UShort* green, UShort* blue);
DG_DLL_EXPORT void CCALL DGListViewSetBackground (short dialId, short item, Int32 background);
DG_DLL_EXPORT Int32 CCALL DGListViewGetBackground (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewSetSelectionStyle (short dialId, short item, Int32 selectionStyle);
DG_DLL_EXPORT Int32 CCALL DGListViewGetSelectionStyle (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewSetHelpStyle (short dialId, short item, Int32 helpStyle);
DG_DLL_EXPORT Int32 CCALL DGListViewGetHelpStyle (short dialId, short item);
DG_DLL_EXPORT short CCALL DGListViewGetClientWidth (short dialId, short item);
DG_DLL_EXPORT short CCALL DGListViewGetClientHeight (short dialId, short item);
DG_DLL_EXPORT short CCALL DGListViewGetRowHeight (short dialId, short item);
DG_DLL_EXPORT bool CCALL DGListViewHasVerticalScrollBar (short dialId, short item);
DG_DLL_EXPORT bool CCALL DGListViewIsVerticalScrollbarVisible (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewSetItemUserData (short dialId, short item, short listItem, DGUserData value);
DG_DLL_EXPORT DGUserData CCALL DGListViewGetItemUserData (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListViewSelectItem (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGListViewDeselectItem (short dialId, short item, short listItem);
DG_DLL_EXPORT short CCALL DGListViewGetSelected (short dialId, short item, short listItem);
DG_DLL_EXPORT short CCALL DGListViewGetSelCount (short dialId, short item);
DG_DLL_EXPORT short CCALL DGListViewGetSelItems (short dialId, short item, short* selItems, short maxCount);
DG_DLL_EXPORT void CCALL DGListViewSetScrollPosition (short dialId, short item, short scrollPosition);
DG_DLL_EXPORT short CCALL DGListViewGetScrollPosition (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewScrollUp (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewScrollDown (short dialId, short item);
DG_DLL_EXPORT short CCALL DGListViewGetItemFromPosition (short dialId, short item, short xPos, short yPos);
DG_DLL_EXPORT short CCALL DGListViewGetItemRect (short dialId, short item, short listItem, short* left, short* top, short* right, short* bottom);
DG_DLL_EXPORT void CCALL DGListViewSetViewMode (short dialId, short item, short viewMode);
DG_DLL_EXPORT short CCALL DGListViewGetViewMode (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewSetItemSize (short dialId, short item, short itemWidth, short itemHeight);
DG_DLL_EXPORT void CCALL DGListViewGetItemSize (short dialId, short item, short* itemWidth, short* itemHeight);
DG_DLL_EXPORT void CCALL DGListViewSetImageSize (short dialId, short item, short imageWidth, short imageHeight);
DG_DLL_EXPORT void CCALL DGListViewSetImageGap (short dialId, short item, short imageGap);
DG_DLL_EXPORT short CCALL DGListViewGetImageGap (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewSetTextTruncateWidth (short dialId, short item, short textTruncateWidth);
DG_DLL_EXPORT short CCALL DGListViewGetTextTruncateWidth (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewGetImageSize (short dialId, short item, short* imageWidth, short* imageHeight);
DG_DLL_EXPORT short CCALL DGListViewGetImageType (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewSetImage (short dialId, short item, short imageType, const DG::Image& image,
short nImages, short nRows);
DG_DLL_EXPORT void CCALL DGListViewGetImageLayout (short dialId, short item, short* nImages, short* nRows);
DG_DLL_EXPORT void CCALL DGListViewEnableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewDisableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewClearHover (short dialId, short item);
DG_DLL_EXPORT void CCALL DGListViewSetHoverInWaitMillisecs (short dialId, short item, Int32 hoverInMillisecs);
// --- EditText functions ----------------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGEditTextCut (void);
DG_DLL_EXPORT void CCALL DGEditTextCopy (void);
DG_DLL_EXPORT void CCALL DGEditTextPaste (void);
DG_DLL_EXPORT void CCALL DGEditTextClear (void);
DG_DLL_EXPORT void CCALL DGEditTextUndo (void);
DG_DLL_EXPORT void CCALL DGEditTextRedo (void);
DG_DLL_EXPORT short CCALL DGEditTextCanUndo (void);
DG_DLL_EXPORT short CCALL DGEditTextCanRedo (void);
DG_DLL_EXPORT void CCALL DGEditTextClearUndo (void);
DG_DLL_EXPORT void CCALL DGEditTextSetSelect (short dialId, short item, Int32 selStart, Int32 selEnd);
DG_DLL_EXPORT void CCALL DGEditTextGetSelect (short dialId, short item, Int32* selStart, Int32* selEnd);
DG_DLL_EXPORT void CCALL DGEditTextSetMaxLength (short dialId, short item, const UInt32 maxLength);
DG_DLL_EXPORT UInt32 CCALL DGEditTextGetMaxLength (short dialId, short item);
DG_DLL_EXPORT bool CCALL DGEditControlChangeIsPending (void);
// --- RichEdit functions ----------------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGRichEditSetSelect (short dialId, short item, Int32 selStart, Int32 selEnd);
DG_DLL_EXPORT void CCALL DGRichEditGetSelect (short dialId, short item, Int32* selStart, Int32* selEnd);
DG_DLL_EXPORT void CCALL DGRichEditEnableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRichEditDisableDraw (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGRichEditGetLength (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGRichEditGetLineCount (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGRichEditGetLineFromPos (short dialId, short item, Int32 pos);
DG_DLL_EXPORT Int32 CCALL DGRichEditGetLinePos (short dialId, short item, Int32 lineIndex);
DG_DLL_EXPORT Int32 CCALL DGRichEditGetLineLength (short dialId, short item, Int32 lineIndex);
DG_DLL_EXPORT void CCALL DGRichEditSetLineMaxLength (short dialId, short item, short lineLength);
DG_DLL_EXPORT void CCALL DGRichEditSetText (short dialId, short item, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGRichEditCatText (short dialId, short item, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGRichEditSetTextRange (short dialId, short item, Int32 startPos, Int32 endPos, const GS::UniString& text);
DG_DLL_EXPORT short CCALL DGRichEditFindText (short dialId, short item, Int32* startPos, Int32* endPos,
GS::UniString* text, short findFlag);
DG_DLL_EXPORT void CCALL DGRichEditSetTabSize (short dialId, short item, short tabSize);
DG_DLL_EXPORT short CCALL DGRichEditGetTabSize (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRichEditSetFont (short dialId, short item, const DGTEFontData* fontData);
DG_DLL_EXPORT short CCALL DGRichEditGetFont (short dialId, short item, DGTEFontData* fontData);
DG_DLL_EXPORT void CCALL DGRichEditSetWordWrap (short dialId, short item, bool wordWrap);
DG_DLL_EXPORT bool CCALL DGRichEditGetWordWrap (short dialId, short item);
#if defined macintosh
DG_DLL_EXPORT short CCALL DGRichEditGetRequiredHeight (short dialId, short item);
#endif
DG_DLL_EXPORT void CCALL DGRichEditSetCharCode (short dialId, short item, GSCharCode charCode);
DG_DLL_EXPORT GSCharCode CCALL DGRichEditGetCharCode (short dialId, short item);
// --- UniRichEdit functions -------------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGUniRichEditSetSelect (short dialId, short item, Int32 selStart, Int32 selEnd);
DG_DLL_EXPORT void CCALL DGUniRichEditGetSelect (short dialId, short item, Int32* selStart, Int32* selEnd);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetLineCount (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetLineFromPos (short dialId, short item, Int32 pos);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetLinePos (short dialId, short item, Int32 lineIndex);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetLineLength (short dialId, short item, Int32 lineIndex);
DG_DLL_EXPORT bool CCALL DGUniRichEditHasText (short dialId, short item);
DG_DLL_EXPORT void CCALL DGUniRichEditSetText (short dialId, short item, const GS::uchar_t* text);
DG_DLL_EXPORT void CCALL DGUniRichEditCatText (short dialId, short item, const GS::uchar_t* text);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetText (short dialId, short item, GS::uchar_t* text, Int32 size, short eolType);
DG_DLL_EXPORT void CCALL DGUniRichEditSetTextRange (short dialId, short item, Int32 startPos, Int32 endPos, const GS::uchar_t* text);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetTextRange (short dialId, short item, Int32 startPos, Int32 endPos, GS::uchar_t* text,
Int32 size, short eolType);
DG_DLL_EXPORT short CCALL DGUniRichEditFindText (short dialId, short item, Int32* startPos, Int32* endPos, const GS::uchar_t* text,
short findFlag);
DG_DLL_EXPORT void CCALL DGUniRichEditSetDefaultTabSize (short dialId, short item, double tabSize);
DG_DLL_EXPORT double CCALL DGUniRichEditGetDefaultTabSize (short dialId, short item);
DG_DLL_EXPORT void CCALL DGUniRichEditSetTextBoxWidth (short dialId, short item, double boxWidth);
DG_DLL_EXPORT double CCALL DGUniRichEditGetTextBoxWidth (short dialId, short item);
DG_DLL_EXPORT void CCALL DGUniRichEditSetDefaultCharcode (short dialId, short item, GSCharCode charcode);
DG_DLL_EXPORT void CCALL DGUniRichEditSetCharStyle (short dialId, short item, Int32 startPos, Int32 endPos, Int32 effect,
double size, UChar red, UChar green, UChar blue, Int32 style,
const GS::UniString& fontName, UShort styleFlag);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetCharStyle (short dialId, short item, Int32 startPos, Int32 endPos, Int32* effect,
double* size, UChar* red, UChar* green, UChar* blue, Int32* style,
GS::UniString* fontName, Int32 nameLength, UShort styleFlag);
DG_DLL_EXPORT void CCALL DGUniRichEditSetParagraph (short dialId, short item, Int32 startPos, Int32 endPos, Int32 justification,
double firstIndent, double leftIndent, double rightIndent, double leading,
Int32 numTab, const DGTabulatorItem* tabs, UShort paraFlags);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetParagraph (short dialId, short item, Int32 startPos, Int32 endPos, Int32* justification,
double* firstIndent, double* leftIndent, double* rightIndent,
double* leading, DGTabulatorItem* tabs, Int32 size, UShort paraFlags);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetRuns (short dialId, short item, Int32 startPos, Int32 endPos,
DGCharRange* bounds, Int32 size);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetParagraphBounds (short dialId, short item, Int32 startPos, Int32 endPos,
DGCharRange* bounds, Int32 size);
DG_DLL_EXPORT Int32 CCALL DGUniRichEditGetOffsetFromPoint (short dialId, short item, short xPos, short yPos, bool pointIsRelativeToControl);
DG_DLL_EXPORT void CCALL DGUniRichEditClearUndo (short dialId, short item);
DG_DLL_EXPORT void CCALL DGUniRichEditBeginUndoAction (short dialId, short item);
DG_DLL_EXPORT void CCALL DGUniRichEditEndUndoAction (short dialId, short item);
DG_DLL_EXPORT void CCALL DGUniRichEditSetBackground (short dialId, short item, UChar red, UChar green, UChar blue);
#if defined (WINDOWS)
DG_DLL_EXPORT void CCALL DGSetUniRichEditHotkeys (wchar_t bold, wchar_t italic, wchar_t underline);
#endif
DG_DLL_EXPORT void CCALL DGUniRichEditGetCharBounds (short dialId, short item, UIndex charPosition, short& left, short& top, short& right, short& bottom);
// --- RulerControl functions ------------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGRulerInit (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerEnableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerDisableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetUnitType (short dialId, short item, Int32 unitType);
DG_DLL_EXPORT Int32 CCALL DGRulerGetUnitType (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetTenUnitInPixels (short dialId, short item, double tenUnitInPixels);
DG_DLL_EXPORT double CCALL DGRulerGetTenUnitInPixels (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetSnapDistanceSI (short dialId, short item, double snapDistanceSI);
DG_DLL_EXPORT double CCALL DGRulerGetSnapDistanceSI (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetSnapDistanceUS (short dialId, short item, double snapDistanceUS);
DG_DLL_EXPORT double CCALL DGRulerGetSnapDistanceUS (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetDefaultTabDistance (short dialId, short item, double defTabDistance);
DG_DLL_EXPORT double CCALL DGRulerGetDefaultTabDistance (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetFirstLineIndent (short dialId, short item, double firstLineIndent);
DG_DLL_EXPORT double CCALL DGRulerGetFirstLineIndent (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetLeftIndent (short dialId, short item, double leftIndent);
DG_DLL_EXPORT double CCALL DGRulerGetLeftIndent (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetRightIndent (short dialId, short item, double rightIndent);
DG_DLL_EXPORT double CCALL DGRulerGetRightIndent (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetRightIndentDisabled (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetRightIndentEnabled (short dialId, short item);
DG_DLL_EXPORT bool CCALL DGRulerIsRightIndentDisabled (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetTextBoxWidth (short dialId, short item, double textBoxWidth);
DG_DLL_EXPORT double CCALL DGRulerGetTextBoxWidth (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetScrollPosition (short dialId, short item, double scrollPosition);
DG_DLL_EXPORT double CCALL DGRulerGetScrollPosition (short dialId, short item);
DG_DLL_EXPORT void CCALL DGRulerSetTabulators (short dialId, short item, short tabulatorCount, const DGTabulatorItem* tabulators);
DG_DLL_EXPORT short CCALL DGRulerGetTabulatorCount (short dialId, short item);
DG_DLL_EXPORT short CCALL DGRulerGetTabulators (short dialId, short item, short tabulatorCount, DGTabulatorItem* tabulators);
DG_DLL_EXPORT void CCALL DGRulerSetRTLLayout (short dialId, short item, bool flag);
DG_DLL_EXPORT void CCALL DGRulerDrawHairline (short dialId, short item, Int32 pos);
// --- Splitter Control functions --------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGSplitterEnableDrag (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSplitterDisableDrag (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSplitterSetDragStatus (short dialId, short item, bool isEnabled);
DG_DLL_EXPORT bool CCALL DGSplitterIsDragEnabled (short dialId, short item);
// --- Button Control functions ----------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGButtonSetAlignment (short dialId, short itemId, short alignment);
DG_DLL_EXPORT short CCALL DGButtonGetAlignment (short dialId, short itemId);
// --- SplitButton Control functions -----------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGSplitButtonSetAlignment (short dialId, short itemId, short alignment);
DG_DLL_EXPORT short CCALL DGSplitButtonGetAlignment (short dialId, short itemId);
DG_DLL_EXPORT void CCALL DGSplitButtonAppendItem (short dialId, short item, const GS::UniString& itemText, const void* itemIcon);
DG_DLL_EXPORT void CCALL DGSplitButtonAppendSeparator (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSplitButtonInsertItem (short dialId, short item, short poupItem, const GS::UniString& itemText, const void* itemIcon);
DG_DLL_EXPORT void CCALL DGSplitButtonInsertSeparator (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGSplitButtonDeleteItem (short dialId, short item, short popupItem);
DG_DLL_EXPORT USize CCALL DGSplitButtonGetItemCount (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSplitButtonSetItemIcon (short dialId, short item, short popupItem, const void* icon);
DG_DLL_EXPORT bool CCALL DGSplitButtonGetItemIcon (short dialId, short item, short popupItem, void* icon);
DG_DLL_EXPORT void CCALL DGSplitButtonSetItemText (short dialId, short item, short popupItem, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGSplitButtonSetItemFont (short dialId, short item, short popupItem, short fontType);
DG_DLL_EXPORT short CCALL DGSplitButtonGetItemFont (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGSplitButtonSetItemData (short dialId, short item, short popupItem, DGUserData value);
DG_DLL_EXPORT DGUserData CCALL DGSplitButtonGetItemData (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGSplitButtonEnableItem (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGSplitButtonDisableItem (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGSplitButtonSetItemStatus (short dialId, short item, short popupItem, bool status);
DG_DLL_EXPORT bool CCALL DGSplitButtonIsItemEnabled (short dialId, short item, short popupItem);
DG_DLL_EXPORT bool CCALL DGSplitButtonIsSeparatorItem (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGSplitButtonShowAndTrackPopup (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSplitButtonEnableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSplitButtonDisableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSplitButtonSetType (short dialId, short item, bool custom);
DG_DLL_EXPORT void CCALL DGSplitButtonSetArrowPartWidth (short dialId, short item, short width);
DG_DLL_EXPORT short CCALL DGSplitButtonGetArrowPartWidth (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSplitButtonEnableArrowPart (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSplitButtonDisableArrowPart (short dialId, short item);
DG_DLL_EXPORT void CCALL DGSplitButtonSetArrowPartStatus (short dialId, short item, bool status);
DG_DLL_EXPORT bool CCALL DGSplitButtonIsArrowPartEnabled (short dialId, short item);
// --- PushCheck Control functions ----------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGPushCheckSetArrowType (short dialId, short itemId, short arrowType);
DG_DLL_EXPORT short CCALL DGPushCheckGetArrowType (short dialId, short itemId);
// --- TabBar Control functions ----------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGTabBarSetType (short dialId, short item, short type);
DG_DLL_EXPORT short CCALL DGTabBarGetType (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarSetItemAlignment (short dialId, short item, short itemAlignment);
DG_DLL_EXPORT short CCALL DGTabBarGetItemAlignment (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarSetIconButtonVisibility (short dialId, short item, bool isVisible);
DG_DLL_EXPORT bool CCALL DGTabBarIsIconButtonVisible (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarSetIconButtonContent (short dialId, short item, const DG::Icon& icon);
DG_DLL_EXPORT void CCALL DGTabBarSetSpecialCursors (short dialId, short item, GSResModule cursorResModule, Int32 pickUpCursorId, Int32 injectCursorId, Int32 tickOKCursorId);
DG_DLL_EXPORT void CCALL DGTabBarSetForcedSpecialCursor (short dialId, short item, Int32 forcedCursorId);
#ifdef macintosh
DG_DLL_EXPORT bool CCALL DGTabBarHandleFlagsChanged (short dialId, short item, Int32 modifierFlags);
#endif
DG_DLL_EXPORT void CCALL DGTabBarSetItemMinWidth (short dialId, short item, Int32 minWidth);
DG_DLL_EXPORT Int32 CCALL DGTabBarGetItemMinWidth (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarSetItemMaxWidth (short dialId, short item, Int32 maxWidth);
DG_DLL_EXPORT Int32 CCALL DGTabBarGetItemMaxWidth (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarSetItemPreferredWidth (short dialId, short item, Int32 preferredWidth);
DG_DLL_EXPORT Int32 CCALL DGTabBarGetItemPreferredWidth (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarSetCloseButtonVisibility (short dialId, short item, bool isVisible);
DG_DLL_EXPORT bool CCALL DGTabBarIsCloseButtonVisible (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarSetDragEnabled (short dialId, short item, bool isEnabled);
DG_DLL_EXPORT bool CCALL DGTabBarIsDragEnabled (short dialId, short item);
DG_DLL_EXPORT bool CCALL DGTabBarIsBeingDragged (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarEnableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarDisableDraw (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarSetStatus (short dialId, short item, short status);
DG_DLL_EXPORT short CCALL DGTabBarGetStatus (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGTabBarInsertBeforeItem (short dialId, short item, Int32 beforeItemId, const GS::UniString& itemText, const DG::Icon& itemIcon);
DG_DLL_EXPORT Int32 CCALL DGTabBarInsertAfterItem (short dialId, short item, Int32 afterItemId, const GS::UniString& itemText, const DG::Icon& itemIcon);
DG_DLL_EXPORT void CCALL DGTabBarDeleteItem (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT void CCALL DGTabBarDeleteAllItems (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGTabBarGetEnabledItemCount (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGTabBarGetItemCount (short dialId, short item);
DG_DLL_EXPORT Int32 CCALL DGTabBarGetItemIndex (short dialId, short item, Int32 tabBarItemId); // 1-based index
DG_DLL_EXPORT Int32 CCALL DGTabBarGetItemId (short dialId, short item, Int32 tabBarItemIndex); // 1-based index
DG_DLL_EXPORT Int32 CCALL DGTabBarGetNextItemId (short dialId, short item, Int32 tabBarItemId, bool cycle, bool skipDisabled);
DG_DLL_EXPORT Int32 CCALL DGTabBarGetPreviousItemId (short dialId, short item, Int32 tabBarItemId, bool cycle, bool skipDisabled);
DG_DLL_EXPORT void CCALL DGTabBarSelectItem (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT Int32 CCALL DGTabBarGetSelectedItem (short dialId, short item);
DG_DLL_EXPORT void CCALL DGTabBarMoveItem (short dialId, short item, Int32 tabBarItemId, Int32 newIndex); // 1-based index
DG_DLL_EXPORT void CCALL DGTabBarSetItemText (short dialId, short item, Int32 tabBarItemId, const GS::UniString& text);
DG_DLL_EXPORT void CCALL DGTabBarSetItemIcon (short dialId, short item, Int32 tabBarItemId, const DG::Icon& itemIcon);
DG_DLL_EXPORT void CCALL DGTabBarSetItemTextColor (short dialId, short item, Int32 tabBarItemId, const Gfx::Color& color);
DG_DLL_EXPORT void CCALL DGTabBarResetItemTextColor (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT void CCALL DGTabBarSetItemBackgroundColor (short dialId, short item, Int32 tabBarItemId, const Gfx::Color& color, double intensity);
DG_DLL_EXPORT void CCALL DGTabBarResetItemBackgroundColor (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT void CCALL DGTabBarSetItemUserData (short dialId, short item, Int32 tabBarItemId, DGUserData value);
DG_DLL_EXPORT DGUserData CCALL DGTabBarGetItemUserData (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT void CCALL DGTabBarSetItemStatus (short dialId, short item, Int32 tabBarItemId, bool status);
DG_DLL_EXPORT bool CCALL DGTabBarIsItemEnabled (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT void CCALL DGTabBarSetSpecialCursorsStatus (short dialId, short item, Int32 tabBarItemId, bool status);
DG_DLL_EXPORT bool CCALL DGTabBarAreSpecialCursorsEnabled (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT void CCALL DGTabBarSetItemFont (short dialId, short item, Int32 tabBarItemId, short fontType);
DG_DLL_EXPORT short CCALL DGTabBarGetItemFont (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT void CCALL DGTabBarSetItemOverlayIcon (short dialId, short item, Int32 tabBarItemId, const DG::Icon& overlayIcon);
DG_DLL_EXPORT void CCALL DGTabBarSetOverlayIconVisibility (short dialId, short item, Int32 tabBarItemId, bool isOverlayIconVisible);
DG_DLL_EXPORT bool CCALL DGTabBarIsOverlayIconVisible (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT void CCALL DGTabBarSetItemBusyState (short dialId, short item, Int32 tabBarItemId, bool isBusy);
DG_DLL_EXPORT bool CCALL DGTabBarGetItemBusyState (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT Int32 CCALL DGTabBarGetItemWidth (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT bool CCALL DGTabBarGetItemRect (short dialId, short item, Int32 tabBarItemId, short& left, short& top, short& right, short& bottom); // Retrieves rect in control relative logical units
DG_DLL_EXPORT void CCALL DGTabBarSetItemIsClosing (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT bool CCALL DGTabBarIsItemClosing (short dialId, short item, Int32 tabBarItemId);
// --- Test functions --------------------------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGConvertTextUnitTest (void);
//#if defined (__cplusplus)
// }
//#endif
// --- Functions outside with C++ linkage ------------------------------------------------------------------------------
DG_DLL_EXPORT void CCALL DGGetMonitorRectFromRect (DG::NativeUnit* left, DG::NativeUnit* top, DG::NativeUnit* right, DG::NativeUnit* bottom);
DG_DLL_EXPORT GS::UniString CCALL DGGetMultiLineText (short dialId, short item, short eolType = DG_EOL_DEFAULT);
DG_DLL_EXPORT GS::UniString CCALL DGRichEditGetText (short dialId, short item, short eolType = DG_EOL_DEFAULT);
DG_DLL_EXPORT GS::UniString CCALL DGGetItemText (short dialId, short item);
DG_DLL_EXPORT void CCALL DGGetItemNativeRectInScreenSpace (short dialId, short item, DG::NativeUnit* left, DG::NativeUnit* top, DG::NativeUnit* right, DG::NativeUnit* bottom);
DG_DLL_EXPORT GS::UniString CCALL DGGetDialogAnchorString (short dialId, GSResModule dialResModule = InvalidResModule);
DG_DLL_EXPORT GS::UniString CCALL DGGetDialogTitle (short dialId);
DG_DLL_EXPORT GS::UniString CCALL DGGetItemTooltipString (short dialId, short item, GSResModule dialResModule = InvalidResModule);
DG_DLL_EXPORT GS::UniString CCALL DGGetItemAnchorString (short dialId, short item, GSResModule dialResModule = InvalidResModule);
DG_DLL_EXPORT GS::Array<short> CCALL DGListGetSelectedItems (short dialId, short item);
DG_DLL_EXPORT GS::UniString CCALL DGListGetItemText (short dialId, short item, short listItem);
DG_DLL_EXPORT GS::UniString CCALL DGListGetTabItemText (short dialId, short item, short listItem, short tabIndex);
DG_DLL_EXPORT GS::UniString CCALL DGListGetHeaderItemText (short dialId, short item, short headerItem);
DG_DLL_EXPORT DG::Icon CCALL DGListGetHeaderItemIcon (short dialId, short item, short headerItem);
DG_DLL_EXPORT DG::Icon CCALL DGListGetHeaderButtonIcon (short dialId, short item);
DG_DLL_EXPORT GS::UniString CCALL DGPopUpGetItemText (short dialId, short item, short popupItem);
DG_DLL_EXPORT GS::UniString CCALL DGTreeViewGetItemText (short dialId, short item, Int32 treeItem);
DG_DLL_EXPORT GS::UniString CCALL DGListViewGetItemText (short dialId, short item, short listItem);
DG_DLL_EXPORT GS::UniString CCALL DGTabControlGetItemText (short dialId, short item, short tabItem);
DG_DLL_EXPORT GS::UniString CCALL DGDoubleToString (double value, short type);
DG_DLL_EXPORT GS::UniString CCALL DGDoubleToStringUnit (const DGUnitData* uData, double value, short type);
DG_DLL_EXPORT GS::UniString CCALL DGLongToString (Int32 value, short type);
DG_DLL_EXPORT GS::UniString CCALL DGRichEditGetTextRange (short dialId, short item, Int32 startPos, Int32 endPos, short eolType);
DG_DLL_EXPORT GS::UniString CCALL DGSplitButtonGetItemText (short dialId, short item, short popupItem);
DG_DLL_EXPORT GS::UniString CCALL DGGetItemVariousText (short dialId, short item);
DG_DLL_EXPORT DG::Icon CCALL DGTreeViewGetItemIcon (short dialId, short item, Int32 treeItem, short iconType);
DG_DLL_EXPORT DG::Icon CCALL DGListGetTabItemIcon (short dialId, short item, short listItem, short tabIndex);
DG_DLL_EXPORT DG::Icon CCALL DGPopUpGetItemIcon (short dialId, short item, short popupItem);
DG_DLL_EXPORT DG::Icon CCALL DGTabControlGetItemIcon (short dialId, short item, short tabItem);
DG_DLL_EXPORT DG::Icon CCALL DGPushMenuGetItemIcon (short dialId, short item, short menuItem);
DG_DLL_EXPORT DG::Icon CCALL DGGetDialogIcon (short dialId);
DG_DLL_EXPORT DG::Image CCALL DGGetItemImage (short dialId, short item);
DG_DLL_EXPORT DG::Image CCALL DGListViewGetItemImage (short dialId, short item, short listItem);
DG_DLL_EXPORT DG::Image CCALL DGListViewGetImage (short dialId, short item);
DG_DLL_EXPORT DG::Icon CCALL DGTabBarGetIconButtonContent (short dialId, short item);
DG_DLL_EXPORT GS::UniString CCALL DGTabBarGetItemText (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT DG::Icon CCALL DGTabBarGetItemIcon (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT Gfx::Color CCALL DGTabBarGetItemTextColor (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT DG::Icon CCALL DGTabBarGetItemOverlayIcon (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT void CCALL DGTabBarSetItemObjectData (short dialId, short item, Int32 tabBarItemId, GS::Ref<GS::Object> object);
DG_DLL_EXPORT GS::Ref<GS::Object> CCALL DGTabBarGetItemObjectData (short dialId, short item, Int32 tabBarItemId);
DG_DLL_EXPORT void CCALL DGListSetItemObjectData (short dialId, short item, short listItem, GS::Ref<GS::Object> object);
DG_DLL_EXPORT GS::Ref<GS::Object> CCALL DGListGetItemObjectData (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGPopUpSetItemObjectData (short dialId, short item, short popupItem, GS::Ref<GS::Object> object);
DG_DLL_EXPORT GS::Ref<GS::Object> CCALL DGPopUpGetItemObjectData (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGListViewSetItemObjectData (short dialId, short item, short listItem, GS::Ref<GS::Object> object);
DG_DLL_EXPORT GS::Ref<GS::Object> CCALL DGListViewGetItemObjectData (short dialId, short item, short listItem);
DG_DLL_EXPORT void CCALL DGSplitButtonSetItemObjectData (short dialId, short item, short popupItem, GS::Ref<GS::Object> object);
DG_DLL_EXPORT GS::Ref<GS::Object> CCALL DGSplitButtonGetItemObjectData (short dialId, short item, short popupItem);
DG_DLL_EXPORT void CCALL DGTreeViewSetItemObjectData (short dialId, short item, Int32 treeItem, GS::Ref<GS::Object> object);
DG_DLL_EXPORT GS::Ref<GS::Object> CCALL DGTreeViewGetItemObjectData (short dialId, short item, Int32 treeItem);
#endif
|
e492fbf1930ab02750775d08b1b145888d0001fb
|
e3fb8a67821f1d14a0fa07ea427751f3ea085b7d
|
/segmenttree/rangetree_bit.hpp
|
9ea6c81f29766f1062eb685b88537d69dfad7025
|
[
"MIT"
] |
permissive
|
ankit6776/cplib-cpp
|
870e251f7d8123bfd30a01d7d455f83d10ffdbf1
|
b9f8927a6c7301374c470856828aa1f5667d967b
|
refs/heads/master
| 2023-07-19T04:27:46.502927
| 2021-09-05T05:07:20
| 2021-09-05T05:07:20
| 401,575,514
| 0
| 0
|
MIT
| 2021-08-31T04:47:49
| 2021-08-31T04:47:49
| null |
UTF-8
|
C++
| false
| false
| 3,222
|
hpp
|
rangetree_bit.hpp
|
#pragma once
#include <algorithm>
#include <cassert>
#include <utility>
#include <vector>
// CUT begin
// 領域木
template <class S, void (*opadd)(S &, S), void (*opsub)(S &, S), S (*e)(), class Coordinate>
class rangetree_bit {
int n;
std::vector<std::pair<Coordinate, Coordinate>> _pts;
struct BIT {
std::vector<S> data;
BIT(int len) : data(len, e()) {}
void add(int pos, S v) {
for (pos++; pos and pos <= int(data.size()); pos += pos & -pos) opadd(data[pos - 1], v);
}
S sum(int r) const {
S ret = e();
while (r) opadd(ret, data[r - 1]), r -= r & -r;
return ret;
}
};
std::vector<std::vector<Coordinate>> _range2ys;
std::vector<BIT> bits;
void _add_singlenode(int v, Coordinate y, S val) {
auto i = std::distance(_range2ys[v].begin(), std::lower_bound(_range2ys[v].begin(), _range2ys[v].end(), y));
bits[v].add(i, val);
}
S _get_singlenode(int v, Coordinate y) const {
auto i = std::distance(_range2ys[v].begin(), std::lower_bound(_range2ys[v].begin(), _range2ys[v].end(), y));
return bits[v].sum(i);
}
S _sum(Coordinate xl, Coordinate xr, Coordinate yr) const { // [xl, xr) * (-INF, yr)
auto compx = [](std::pair<Coordinate, Coordinate> l, std::pair<Coordinate, Coordinate> r) {
return l.first < r.first;
};
int l = n + std::distance(_pts.begin(), std::lower_bound(_pts.begin(), _pts.end(), std::make_pair(xl, yr), compx));
int r = n + std::distance(_pts.begin(), std::lower_bound(_pts.begin(), _pts.end(), std::make_pair(xr, yr), compx));
S ret = e();
while (l < r) {
if (l & 1) opadd(ret, _get_singlenode(l++, yr));
if (r & 1) opadd(ret, _get_singlenode(--r, yr));
l >>= 1, r >>= 1;
}
return ret;
}
public:
rangetree_bit() = default;
void add_point(Coordinate x, Coordinate y) noexcept { _pts.emplace_back(x, y); }
void build() {
std::sort(_pts.begin(), _pts.end());
_pts.erase(std::unique(_pts.begin(), _pts.end()), _pts.end());
n = _pts.size();
_range2ys.resize(n * 2);
for (int i = 0; i < n; i++) _range2ys[n + i] = {_pts[i].second};
for (int i = n - 1; i > 0; i--) {
auto &lch = _range2ys[i * 2];
auto &rch = _range2ys[i * 2 + 1];
std::merge(lch.begin(), lch.end(), rch.begin(), rch.end(), std::back_inserter(_range2ys[i]));
_range2ys[i].erase(std::unique(_range2ys[i].begin(), _range2ys[i].end()), _range2ys[i].end());
}
for (const auto &v : _range2ys) bits.push_back(BIT(v.size()));
}
void add(Coordinate x, Coordinate y, S val) {
int i = std::distance(_pts.begin(), std::lower_bound(_pts.begin(), _pts.end(), std::make_pair(x, y)));
assert(i < n and _pts[i] == std::make_pair(x, y));
for (i += n; i; i >>= 1) _add_singlenode(i, y, val);
}
S sum(Coordinate xl, Coordinate xr, Coordinate yl, Coordinate yr) const {
auto ret_r = _sum(xl, xr, yr);
auto ret_l = _sum(xl, xr, yl);
opsub(ret_r, ret_l);
return ret_r;
}
};
|
7d60ec31112729de180a3ebe00644b8bc185fba3
|
907f5ddea764703eefdb66e435a3f2e4d7323c0c
|
/URI/1005 - Average I.cpp
|
e979fca911590412952450b6e451d87d0378123c
|
[] |
no_license
|
adityaemaulana/cp-training
|
9596cc3f87d4cf77c69d04d46cf5df49865e67e9
|
53ea13e6924ad92400cb7c7b305d4eba4345abe8
|
refs/heads/master
| 2020-04-13T05:06:34.638860
| 2019-07-03T14:03:01
| 2019-07-03T14:03:01
| 162,981,608
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 175
|
cpp
|
1005 - Average I.cpp
|
#include <cstdio>
using namespace std;
int main(){
double a, b;
scanf("%lf %lf", &a, &b);
printf("MEDIA = %.5f\n", ((3.5 * a) + (7.5 * b)) / 11);
return 0;
}
|
cc71c62835e258cc818670814d1dc1b42176af6b
|
82c55fcfa9f3b7bd5d845cd961cbcfea8fd29bcd
|
/src/traced/probes/probes_producer.cc
|
69072c7921dd190a715053c8c3a70864298d7070
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
LineageOS/android_external_perfetto
|
18fe7db30911cd164c6a95f418d5534945f8a911
|
37e41206db9bc9c8f86b09d88436b0e9a7b3f5d3
|
refs/heads/lineage-18.1
| 2022-10-24T23:28:16.450303
| 2021-06-08T13:18:57
| 2021-06-08T13:18:57
| 144,285,906
| 3
| 17
|
Apache-2.0
| 2022-10-02T20:13:21
| 2018-08-10T12:54:13
|
C++
|
UTF-8
|
C++
| false
| false
| 21,358
|
cc
|
probes_producer.cc
|
/*
* Copyright (C) 2018 The Android Open Source Project
*
* 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 "src/traced/probes/probes_producer.h"
#include <stdio.h>
#include <sys/stat.h>
#include <algorithm>
#include <queue>
#include <string>
#include "perfetto/base/logging.h"
#include "perfetto/ext/base/utils.h"
#include "perfetto/ext/base/watchdog.h"
#include "perfetto/ext/base/weak_ptr.h"
#include "perfetto/ext/traced/traced.h"
#include "perfetto/ext/tracing/core/trace_packet.h"
#include "perfetto/ext/tracing/ipc/producer_ipc_client.h"
#include "perfetto/tracing/core/data_source_config.h"
#include "perfetto/tracing/core/data_source_descriptor.h"
#include "perfetto/tracing/core/trace_config.h"
#include "src/traced/probes/android_log/android_log_data_source.h"
#include "src/traced/probes/common/cpu_freq_info.h"
#include "src/traced/probes/filesystem/inode_file_data_source.h"
#include "src/traced/probes/ftrace/ftrace_data_source.h"
#include "src/traced/probes/initial_display_state/initial_display_state_data_source.h"
#include "src/traced/probes/metatrace/metatrace_data_source.h"
#include "src/traced/probes/packages_list/packages_list_data_source.h"
#include "src/traced/probes/power/android_power_data_source.h"
#include "src/traced/probes/probes_data_source.h"
#include "src/traced/probes/ps/process_stats_data_source.h"
#include "src/traced/probes/sys_stats/sys_stats_data_source.h"
#include "src/traced/probes/system_info/system_info_data_source.h"
#include "protos/perfetto/config/ftrace/ftrace_config.gen.h"
#include "protos/perfetto/trace/filesystem/inode_file_map.pbzero.h"
#include "protos/perfetto/trace/ftrace/ftrace_event_bundle.pbzero.h"
#include "protos/perfetto/trace/ftrace/ftrace_stats.pbzero.h"
#include "protos/perfetto/trace/trace_packet.pbzero.h"
namespace perfetto {
namespace {
constexpr uint32_t kInitialConnectionBackoffMs = 100;
constexpr uint32_t kMaxConnectionBackoffMs = 30 * 1000;
// Should be larger than FtraceController::kControllerFlushTimeoutMs.
constexpr uint32_t kFlushTimeoutMs = 1000;
constexpr size_t kTracingSharedMemSizeHintBytes = 1024 * 1024;
constexpr size_t kTracingSharedMemPageSizeHintBytes = 32 * 1024;
ProbesDataSource::Descriptor const* const kAllDataSources[]{
&FtraceDataSource::descriptor, //
&ProcessStatsDataSource::descriptor, //
&InodeFileDataSource::descriptor, //
&SysStatsDataSource::descriptor, //
&AndroidPowerDataSource::descriptor, //
&AndroidLogDataSource::descriptor, //
&PackagesListDataSource::descriptor, //
&MetatraceDataSource::descriptor, //
&SystemInfoDataSource::descriptor, //
&InitialDisplayStateDataSource::descriptor, //
};
} // namespace
// State transition diagram:
// +----------------------------+
// v +
// NotStarted -> NotConnected -> Connecting -> Connected
// ^ +
// +--------------+
//
ProbesProducer::ProbesProducer() : weak_factory_(this) {}
ProbesProducer::~ProbesProducer() {
// The ftrace data sources must be deleted before the ftrace controller.
data_sources_.clear();
ftrace_.reset();
}
void ProbesProducer::OnConnect() {
PERFETTO_DCHECK(state_ == kConnecting);
state_ = kConnected;
ResetConnectionBackoff();
PERFETTO_LOG("Connected to the service");
// Register all the data sources.
for (const FtraceDataSource::Descriptor* desc : kAllDataSources) {
DataSourceDescriptor proto_desc;
proto_desc.set_name(desc->name);
proto_desc.set_will_notify_on_start(true);
proto_desc.set_will_notify_on_stop(true);
using Flags = ProbesDataSource::Descriptor::Flags;
if (desc->flags & Flags::kHandlesIncrementalState)
proto_desc.set_handles_incremental_state_clear(true);
endpoint_->RegisterDataSource(proto_desc);
}
}
void ProbesProducer::OnDisconnect() {
PERFETTO_DCHECK(state_ == kConnected || state_ == kConnecting);
PERFETTO_LOG("Disconnected from tracing service");
if (state_ == kConnected)
return task_runner_->PostTask([this] { this->Restart(); });
state_ = kNotConnected;
IncreaseConnectionBackoff();
task_runner_->PostDelayedTask([this] { this->Connect(); },
connection_backoff_ms_);
}
void ProbesProducer::Restart() {
// We lost the connection with the tracing service. At this point we need
// to reset all the data sources. Trying to handle that manually is going to
// be error prone. What we do here is simply destroying the instance and
// recreating it again.
// TODO(hjd): Add e2e test for this.
base::TaskRunner* task_runner = task_runner_;
const char* socket_name = socket_name_;
// Invoke destructor and then the constructor again.
this->~ProbesProducer();
new (this) ProbesProducer();
ConnectWithRetries(socket_name, task_runner);
}
void ProbesProducer::SetupDataSource(DataSourceInstanceID instance_id,
const DataSourceConfig& config) {
PERFETTO_DLOG("SetupDataSource(id=%" PRIu64 ", name=%s)", instance_id,
config.name().c_str());
PERFETTO_DCHECK(data_sources_.count(instance_id) == 0);
TracingSessionID session_id = config.tracing_session_id();
PERFETTO_CHECK(session_id > 0);
std::unique_ptr<ProbesDataSource> data_source;
if (config.name() == FtraceDataSource::descriptor.name) {
data_source = CreateFtraceDataSource(session_id, config);
} else if (config.name() == InodeFileDataSource::descriptor.name) {
data_source = CreateInodeFileDataSource(session_id, config);
} else if (config.name() == ProcessStatsDataSource::descriptor.name) {
data_source = CreateProcessStatsDataSource(session_id, config);
} else if (config.name() == SysStatsDataSource::descriptor.name) {
data_source = CreateSysStatsDataSource(session_id, config);
} else if (config.name() == AndroidPowerDataSource::descriptor.name) {
data_source = CreateAndroidPowerDataSource(session_id, config);
} else if (config.name() == AndroidLogDataSource::descriptor.name) {
data_source = CreateAndroidLogDataSource(session_id, config);
} else if (config.name() == PackagesListDataSource::descriptor.name) {
data_source = CreatePackagesListDataSource(session_id, config);
} else if (config.name() == MetatraceDataSource::descriptor.name) {
data_source = CreateMetatraceDataSource(session_id, config);
} else if (config.name() == SystemInfoDataSource::descriptor.name) {
data_source = CreateSystemInfoDataSource(session_id, config);
} else if (config.name() == InitialDisplayStateDataSource::descriptor.name) {
data_source = CreateInitialDisplayStateDataSource(session_id, config);
}
if (!data_source) {
PERFETTO_ELOG("Failed to create data source '%s'", config.name().c_str());
return;
}
session_data_sources_.emplace(session_id, data_source.get());
data_sources_[instance_id] = std::move(data_source);
}
void ProbesProducer::StartDataSource(DataSourceInstanceID instance_id,
const DataSourceConfig& config) {
PERFETTO_DLOG("StartDataSource(id=%" PRIu64 ", name=%s)", instance_id,
config.name().c_str());
auto it = data_sources_.find(instance_id);
if (it == data_sources_.end()) {
// Can happen if SetupDataSource() failed (e.g. ftrace was busy).
PERFETTO_ELOG("Data source id=%" PRIu64 " not found", instance_id);
return;
}
ProbesDataSource* data_source = it->second.get();
if (data_source->started)
return;
if (config.trace_duration_ms() != 0) {
uint32_t timeout = 5000 + 2 * config.trace_duration_ms();
watchdogs_.emplace(
instance_id, base::Watchdog::GetInstance()->CreateFatalTimer(timeout));
}
data_source->started = true;
data_source->Start();
endpoint_->NotifyDataSourceStarted(instance_id);
}
std::unique_ptr<ProbesDataSource> ProbesProducer::CreateFtraceDataSource(
TracingSessionID session_id,
const DataSourceConfig& config) {
// Don't retry if FtraceController::Create() failed once.
// This can legitimately happen on user builds where we cannot access the
// debug paths, e.g., because of SELinux rules.
if (ftrace_creation_failed_)
return nullptr;
// Lazily create on the first instance.
if (!ftrace_) {
ftrace_ = FtraceController::Create(task_runner_, this);
if (!ftrace_) {
PERFETTO_ELOG("Failed to create FtraceController");
ftrace_creation_failed_ = true;
return nullptr;
}
ftrace_->DisableAllEvents();
ftrace_->ClearTrace();
}
PERFETTO_LOG("Ftrace setup (target_buf=%" PRIu32 ")", config.target_buffer());
const BufferID buffer_id = static_cast<BufferID>(config.target_buffer());
FtraceConfig ftrace_config;
ftrace_config.ParseFromString(config.ftrace_config_raw());
std::unique_ptr<FtraceDataSource> data_source(new FtraceDataSource(
ftrace_->GetWeakPtr(), session_id, std::move(ftrace_config),
endpoint_->CreateTraceWriter(buffer_id)));
if (!ftrace_->AddDataSource(data_source.get())) {
PERFETTO_ELOG("Failed to setup ftrace");
return nullptr;
}
return std::unique_ptr<ProbesDataSource>(std::move(data_source));
}
std::unique_ptr<ProbesDataSource> ProbesProducer::CreateInodeFileDataSource(
TracingSessionID session_id,
DataSourceConfig source_config) {
PERFETTO_LOG("Inode file map setup (target_buf=%" PRIu32 ")",
source_config.target_buffer());
auto buffer_id = static_cast<BufferID>(source_config.target_buffer());
if (system_inodes_.empty())
CreateStaticDeviceToInodeMap("/system", &system_inodes_);
return std::unique_ptr<InodeFileDataSource>(new InodeFileDataSource(
std::move(source_config), task_runner_, session_id, &system_inodes_,
&cache_, endpoint_->CreateTraceWriter(buffer_id)));
}
std::unique_ptr<ProbesDataSource> ProbesProducer::CreateProcessStatsDataSource(
TracingSessionID session_id,
const DataSourceConfig& config) {
auto buffer_id = static_cast<BufferID>(config.target_buffer());
return std::unique_ptr<ProcessStatsDataSource>(new ProcessStatsDataSource(
task_runner_, session_id, endpoint_->CreateTraceWriter(buffer_id), config,
std::unique_ptr<CpuFreqInfo>(new CpuFreqInfo())));
}
std::unique_ptr<ProbesDataSource> ProbesProducer::CreateAndroidPowerDataSource(
TracingSessionID session_id,
const DataSourceConfig& config) {
auto buffer_id = static_cast<BufferID>(config.target_buffer());
return std::unique_ptr<ProbesDataSource>(
new AndroidPowerDataSource(config, task_runner_, session_id,
endpoint_->CreateTraceWriter(buffer_id)));
}
std::unique_ptr<ProbesDataSource> ProbesProducer::CreateAndroidLogDataSource(
TracingSessionID session_id,
const DataSourceConfig& config) {
auto buffer_id = static_cast<BufferID>(config.target_buffer());
return std::unique_ptr<ProbesDataSource>(
new AndroidLogDataSource(config, task_runner_, session_id,
endpoint_->CreateTraceWriter(buffer_id)));
}
std::unique_ptr<ProbesDataSource> ProbesProducer::CreatePackagesListDataSource(
TracingSessionID session_id,
const DataSourceConfig& config) {
auto buffer_id = static_cast<BufferID>(config.target_buffer());
return std::unique_ptr<ProbesDataSource>(new PackagesListDataSource(
config, session_id, endpoint_->CreateTraceWriter(buffer_id)));
}
std::unique_ptr<ProbesDataSource> ProbesProducer::CreateSysStatsDataSource(
TracingSessionID session_id,
const DataSourceConfig& config) {
auto buffer_id = static_cast<BufferID>(config.target_buffer());
return std::unique_ptr<SysStatsDataSource>(
new SysStatsDataSource(task_runner_, session_id,
endpoint_->CreateTraceWriter(buffer_id), config));
}
std::unique_ptr<ProbesDataSource> ProbesProducer::CreateMetatraceDataSource(
TracingSessionID session_id,
const DataSourceConfig& config) {
auto buffer_id = static_cast<BufferID>(config.target_buffer());
return std::unique_ptr<ProbesDataSource>(new MetatraceDataSource(
task_runner_, session_id, endpoint_->CreateTraceWriter(buffer_id)));
}
std::unique_ptr<ProbesDataSource> ProbesProducer::CreateSystemInfoDataSource(
TracingSessionID session_id,
const DataSourceConfig& config) {
auto buffer_id = static_cast<BufferID>(config.target_buffer());
return std::unique_ptr<ProbesDataSource>(new SystemInfoDataSource(
session_id, endpoint_->CreateTraceWriter(buffer_id),
std::unique_ptr<CpuFreqInfo>(new CpuFreqInfo())));
}
std::unique_ptr<ProbesDataSource>
ProbesProducer::CreateInitialDisplayStateDataSource(
TracingSessionID session_id,
const DataSourceConfig& config) {
auto buffer_id = static_cast<BufferID>(config.target_buffer());
return std::unique_ptr<ProbesDataSource>(new InitialDisplayStateDataSource(
task_runner_, config, session_id,
endpoint_->CreateTraceWriter(buffer_id)));
}
void ProbesProducer::StopDataSource(DataSourceInstanceID id) {
PERFETTO_LOG("Producer stop (id=%" PRIu64 ")", id);
auto it = data_sources_.find(id);
if (it == data_sources_.end()) {
// Can happen if SetupDataSource() failed (e.g. ftrace was busy).
PERFETTO_ELOG("Cannot stop data source id=%" PRIu64 ", not found", id);
return;
}
ProbesDataSource* data_source = it->second.get();
// MetatraceDataSource special case: re-flush and ack the stop (to record the
// flushes of other data sources).
if (data_source->descriptor == &MetatraceDataSource::descriptor)
data_source->Flush(FlushRequestID{0}, [] {});
endpoint_->NotifyDataSourceStopped(id);
TracingSessionID session_id = data_source->tracing_session_id;
auto range = session_data_sources_.equal_range(session_id);
for (auto kv = range.first; kv != range.second; kv++) {
if (kv->second != data_source)
continue;
session_data_sources_.erase(kv);
break;
}
data_sources_.erase(it);
watchdogs_.erase(id);
}
void ProbesProducer::OnTracingSetup() {
// shared_memory() can be null in test environments when running in-process.
if (endpoint_->shared_memory()) {
base::Watchdog::GetInstance()->SetMemoryLimit(
endpoint_->shared_memory()->size() + base::kWatchdogDefaultMemorySlack,
base::kWatchdogDefaultMemoryWindow);
}
}
void ProbesProducer::Flush(FlushRequestID flush_request_id,
const DataSourceInstanceID* data_source_ids,
size_t num_data_sources) {
PERFETTO_DCHECK(flush_request_id);
auto weak_this = weak_factory_.GetWeakPtr();
// Issue a Flush() to all started data sources.
bool flush_queued = false;
for (size_t i = 0; i < num_data_sources; i++) {
DataSourceInstanceID ds_id = data_source_ids[i];
auto it = data_sources_.find(ds_id);
if (it == data_sources_.end() || !it->second->started)
continue;
pending_flushes_.emplace(flush_request_id, ds_id);
flush_queued = true;
auto flush_callback = [weak_this, flush_request_id, ds_id] {
if (weak_this)
weak_this->OnDataSourceFlushComplete(flush_request_id, ds_id);
};
it->second->Flush(flush_request_id, flush_callback);
}
// If there is nothing to flush, ack immediately.
if (!flush_queued) {
endpoint_->NotifyFlushComplete(flush_request_id);
return;
}
// Otherwise, post the timeout task.
task_runner_->PostDelayedTask(
[weak_this, flush_request_id] {
if (weak_this)
weak_this->OnFlushTimeout(flush_request_id);
},
kFlushTimeoutMs);
}
void ProbesProducer::OnDataSourceFlushComplete(FlushRequestID flush_request_id,
DataSourceInstanceID ds_id) {
PERFETTO_DLOG("Flush %" PRIu64 " acked by data source %" PRIu64,
flush_request_id, ds_id);
auto range = pending_flushes_.equal_range(flush_request_id);
for (auto it = range.first; it != range.second; it++) {
if (it->second == ds_id) {
pending_flushes_.erase(it);
break;
}
}
if (pending_flushes_.count(flush_request_id))
return; // Still waiting for other data sources to ack.
PERFETTO_DLOG("All data sources acked to flush %" PRIu64, flush_request_id);
endpoint_->NotifyFlushComplete(flush_request_id);
}
void ProbesProducer::OnFlushTimeout(FlushRequestID flush_request_id) {
if (pending_flushes_.count(flush_request_id) == 0)
return; // All acked.
PERFETTO_ELOG("Flush(%" PRIu64 ") timed out", flush_request_id);
pending_flushes_.erase(flush_request_id);
endpoint_->NotifyFlushComplete(flush_request_id);
}
void ProbesProducer::ClearIncrementalState(
const DataSourceInstanceID* data_source_ids,
size_t num_data_sources) {
for (size_t i = 0; i < num_data_sources; i++) {
DataSourceInstanceID ds_id = data_source_ids[i];
auto it = data_sources_.find(ds_id);
if (it == data_sources_.end() || !it->second->started)
continue;
it->second->ClearIncrementalState();
}
}
// This function is called by the FtraceController in batches, whenever it has
// read one or more pages from one or more cpus and written that into the
// userspace tracing buffer. If more than one ftrace data sources are active,
// this call typically happens after writing for all session has been handled.
void ProbesProducer::OnFtraceDataWrittenIntoDataSourceBuffers() {
TracingSessionID last_session_id = 0;
FtraceMetadata* metadata = nullptr;
InodeFileDataSource* inode_data_source = nullptr;
ProcessStatsDataSource* ps_data_source = nullptr;
// unordered_multimap guarantees that entries with the same key are contiguous
// in the iteration.
for (auto it = session_data_sources_.begin(); /* check below*/; it++) {
// If this is the last iteration or the session id has changed,
// dispatch the metadata update to the linked data sources, if any.
if (it == session_data_sources_.end() || it->first != last_session_id) {
bool has_inodes = metadata && !metadata->inode_and_device.empty();
bool has_pids = metadata && !metadata->pids.empty();
bool has_rename_pids = metadata && !metadata->rename_pids.empty();
if (has_inodes && inode_data_source)
inode_data_source->OnInodes(metadata->inode_and_device);
// Ordering the rename pids before the seen pids is important so that any
// renamed processes get scraped in the OnPids call.
if (has_rename_pids && ps_data_source)
ps_data_source->OnRenamePids(metadata->rename_pids);
if (has_pids && ps_data_source)
ps_data_source->OnPids(metadata->pids);
if (metadata)
metadata->Clear();
metadata = nullptr;
inode_data_source = nullptr;
ps_data_source = nullptr;
if (it == session_data_sources_.end())
break;
last_session_id = it->first;
}
ProbesDataSource* ds = it->second;
if (!ds->started)
continue;
if (ds->descriptor == &FtraceDataSource::descriptor) {
metadata = static_cast<FtraceDataSource*>(ds)->mutable_metadata();
} else if (ds->descriptor == &InodeFileDataSource::descriptor) {
inode_data_source = static_cast<InodeFileDataSource*>(ds);
} else if (ds->descriptor == &ProcessStatsDataSource::descriptor) {
// A trace session might have declared more than one ps data source.
// In those cases we often use one for a full dump on startup (
// targeting a dedicated buffer) and another one for on-demand dumps
// targeting the main buffer.
// Only use the one that has on-demand dumps enabled, if any.
auto ps = static_cast<ProcessStatsDataSource*>(ds);
if (ps->on_demand_dumps_enabled())
ps_data_source = ps;
}
} // for (session_data_sources_)
}
void ProbesProducer::ConnectWithRetries(const char* socket_name,
base::TaskRunner* task_runner) {
PERFETTO_DCHECK(state_ == kNotStarted);
state_ = kNotConnected;
ResetConnectionBackoff();
socket_name_ = socket_name;
task_runner_ = task_runner;
Connect();
}
void ProbesProducer::Connect() {
PERFETTO_DCHECK(state_ == kNotConnected);
state_ = kConnecting;
endpoint_ = ProducerIPCClient::Connect(
socket_name_, this, "perfetto.traced_probes", task_runner_,
TracingService::ProducerSMBScrapingMode::kDisabled,
kTracingSharedMemSizeHintBytes, kTracingSharedMemPageSizeHintBytes);
}
void ProbesProducer::IncreaseConnectionBackoff() {
connection_backoff_ms_ *= 2;
if (connection_backoff_ms_ > kMaxConnectionBackoffMs)
connection_backoff_ms_ = kMaxConnectionBackoffMs;
}
void ProbesProducer::ResetConnectionBackoff() {
connection_backoff_ms_ = kInitialConnectionBackoffMs;
}
} // namespace perfetto
|
941a21eaa4b000c9ba6a72906aa6d85f55721549
|
08241f2be07228ca9882cb30c55f9433baadd562
|
/dz2_1_OOP.cpp
|
8f417ce68c77015af6d69eaba7e64fcf2ccf3d92
|
[] |
no_license
|
Rost89/MyRepo
|
5d9e19f68605df374131b87061912d86d868f6ff
|
ebd1184609c45b1bb15f7721eab13cf49a1e199f
|
refs/heads/master
| 2020-05-23T16:30:43.806536
| 2019-06-26T11:53:12
| 2019-06-26T11:53:12
| 184,487,597
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,313
|
cpp
|
dz2_1_OOP.cpp
|
/*Карпенко Р.
Создайте класс, который будет генерировать рандомные числа. У этого класса должны быть обязательно два константных метода:
один из них (Current) должен возвращать текущее сгенерированное число, второй (Next) - следующее случайное число.
Если самым первым методом вызвать Current, то выдать предупреждение, что число не сгенерировано еще.
В классе должен быть конструктор по умолчанию, с параметрами, а также копирующий конструктор. Создать кэширование
текущего случайного числа. (Подсказка: чтобы константный метод мог все - таки изменять кэшируемое значение,
переменную необходимо объявить с помощью ключевого слова mutable).*/
#include <iostream>
#include <time.h>
using namespace std;
class genRand {
private:
int rand;
mutable bool flag1;
mutable bool flag2;
public:
genRand(int r = 0, bool f1 = false, bool f2 = false) :
rand(r), flag1(f1), flag2(f2) {
//конструктор копирования
}
void setRand(int a) {
rand = a;
flag1 = true;
flag2 = true;
}
int current() const{
if (flag2 == 0) {
cout << "Число не сгенерировано!" << endl;
}
else {
return rand;
}
}
int next() const{
return rand;
}
void result() {
if (flag1 == 0) {
cout << current() << endl;
}
else {
cout << next() << endl;
flag1 = false;
}
}
};
int main()
{
srand(time(NULL));
setlocale(LC_ALL, "rus");
char sym = 'n';
genRand rand1;
rand1.current();
do {
rand1.setRand(rand());
rand1.result();
cout << "Начать заново? (y/n)";
cin >> sym;
} while (sym == 'y'|| sym == 'Y');
return 0;
}
|
96a1e4e225b972ac96d0edb609bf958f6bec7a18
|
b899d1b221c88f6cc9c016a910e3acbfe447aa9d
|
/JumpUp/JumpUp1/day2/06-circle.cpp
|
69682a41fc63edb90d2178ff3ad95dde29b83a3f
|
[] |
no_license
|
Boribab/MD_Files
|
70915a7ecbe71320795f9f37cefc6124b623e971
|
27a277195175ae6a048ff435f7fbcce680222725
|
refs/heads/master
| 2021-10-21T16:07:55.085257
| 2019-03-05T01:09:09
| 2019-03-05T01:09:09
| 126,447,746
| 0
| 0
| null | null | null | null |
UHC
|
C++
| false
| false
| 753
|
cpp
|
06-circle.cpp
|
#include <iostream>
using namespace std;
class Circle {
int radius;
public:
void read() {
cin >> radius;
}
int check() {
if (getArea() >= 100 && getArea() <= 200) return 1;
else return 0;
}
void write() {
cout << getArea() << " ";
}
double getArea() {
return 3.14*radius*radius;
}
};
int main() {
int n, count = 0;
cout << "원개수 : ";
cin >> n;
Circle *c = new Circle[n];
for (int i = 0; i < n; i++) {
cout << "원" << i + 1 << ":";
c[i].read();
count += c[i].check();
}
for (int i = 0; i < n; i++) {
c[i].write();
}
cout << endl << "개수 : " << count << endl;
delete[] c;
}
//this - 컴파일러가 알아서 붙여줌, 매개변수 x 객체꺼 멤버변수
// 멤버 함수가 아닌 함수 x static x
|
dcc5d04048401350a60a58876893bbc8fb34acaa
|
cdb11734b874f0df39addd9ea74381e3f3f7ddbc
|
/module05/ex00/main.cpp
|
837b20dfdb86bb679910f1dcf87052622865ad1b
|
[] |
no_license
|
baxetle23/cpp_module
|
66aba5a3c23021c854ff1a565f03ea4a8e5d676a
|
300fb6bc5c1bcc304426ecefbe578aba8673d26a
|
refs/heads/main
| 2023-08-05T13:03:10.818400
| 2021-09-18T07:49:48
| 2021-09-18T07:49:48
| 402,978,962
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 312
|
cpp
|
main.cpp
|
#include <exception>
#include "Bureaucrat.hpp"
int main() {
try
{
Bureaucrat bibo("BIBO", 1);
Bureaucrat biba("BIBA", 150);
//Bureaucrat bibe("BIBE", 1000);
Bureaucrat bibu("BIBU", -1000);
}
catch (std::exception & e)
{
std::cout << "LOX" << std::endl;
std::cout << e.what() << std::endl;
}
}
|
c7cf92f4436b09d2a51ccbc2f80c9f3764664363
|
d160bb839227b14bb25e6b1b70c8dffb8d270274
|
/MCMS/Main/Libs/SNMPLib/SNMPTask.cpp
|
134e0d8a539f2e329f67f4eb59940ca4ad28e6ae
|
[] |
no_license
|
somesh-ballia/mcms
|
62a58baffee123a2af427b21fa7979beb1e39dd3
|
41aaa87d5f3b38bc186749861140fef464ddadd4
|
refs/heads/master
| 2020-12-02T22:04:46.442309
| 2017-07-03T06:02:21
| 2017-07-03T06:02:21
| 96,075,113
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,383
|
cpp
|
SNMPTask.cpp
|
// SNMPTask.cpp
#include "SNMPTask.h"
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "MessageHeader.h"
#include "Segment.h"
#include "Trace.h"
#include "Macros.h"
#include "ProcessBase.h"
#include "ManagerApi.h"
#include "OpcodesMcmsCommon.h"
#include "SysConfig.h"
#include "OsTask.h"
#include "SysConfigKeys.h"
PBEGIN_MESSAGE_MAP(CSNMPTask)
PEND_MESSAGE_MAP(CSNMPTask, CStateMachine);
CSNMPTask::CSNMPTask()
{}
CSNMPTask::~CSNMPTask()
{}
void CSNMPTask::InitTask()
{
netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID,
NETSNMP_DS_AGENT_ROLE,
1);
eProductType curProductType = CProcessBase::GetProcess()->GetProductType();
/* Flora fix bug: BRIDGE-1335 */
std::string agentxq = (MCU_TMP_DIR+"/queue/agentX");
netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,
NETSNMP_DS_AGENT_X_SOCKET,
agentxq.c_str());
init_agent(GetTaskName());
snmp_disable_stderrlog();
snmp_enable_filelog("/dev/null", 1);
init_snmp(GetTaskName());
RegisterOID();
DWORD taskId = m_pTask->GetTaskId();
CProcessBase::GetProcess()->SetSNMPTaskId(taskId);
}
void CSNMPTask::WaitForEvent()
{
while (!GetSelfKill())
agent_check_and_process(1);
snmp_shutdown(GetTaskName());
}
|
141d740af02a2cb89ea33896593d6a7cff7239f5
|
02a18d01a6e04ae88df1f9ab78e63ba05627e628
|
/FINAL PROJECT/FINAL PROJECT/Entity.h
|
73d3f96f6bd47942083539afb83780e59768e490
|
[] |
no_license
|
GJones33/CS-172-Final-Project
|
c2bee4039cda805483d4886806698a9c61031527
|
39588a2f4850c5be7301b581e19c107d35578fa7
|
refs/heads/master
| 2021-01-20T15:33:14.944714
| 2017-05-09T19:59:23
| 2017-05-09T19:59:23
| 90,786,183
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,259
|
h
|
Entity.h
|
//Project: Make a working videogame
//File: Define the entity and pixel class that are used when displaying the things in the videogame to the screen
//Last Updated on: 04/16/2017
//by: Cameron Rutherford
#ifndef ENTITY_
#define ENTITY_
#include <vector>
#include <iostream>
#include <string>
#define SCREEN_WIDTH 80
#define SCREEN_HEIGHT 20
using namespace std;
const string enemy = "Enemy";
const string player = "Player";
const string environment = "Environment";
using namespace std;
class Entity;
class Pixel;
class Pixel {
private:
int * x_pos;
int * y_pos;
int x_offset; //x offset of the pixel
int y_offset; //y offset of the pixel
char pixel; //character of the pixel to be printed
public:
Pixel(int, int, char, Entity); //Default constructor for pixel that takes the x and y coord to be printed
int get_x() { return *x_pos + x_offset; }; //Getters and setters for the private variables
int get_y() { return *y_pos + y_offset; };
char get_char() { return pixel; };
void set_x_offset(int x) { x_offset = x; }
void set_y_offset(int y) { y_offset = y; }
void set_char(char c) { pixel = c; }
};
class Entity {
private:
string WhatAmI;
public:
string whatAmI() { return WhatAmI; }
int * x_position; //this will be the x coord of the bottom left of the entity
int * y_position; //this will be the y coord of the bottom left of the entity
int width, height; //stores the width and the height of the entity
int prev_x; //used to keep track of the previos position of the entity in case you cannot move in a certain direction
int prev_y;
Entity(int, int);
vector<Pixel> pixels;
int * get_x_position();
int * get_y_position();
Entity * getEnt() { return this; }
void update() { prev_x = *x_position; prev_y = *y_position; } //either updates the previous position if the move was "allowed"
void revert() { *x_position = prev_x; *y_position = prev_y; } //or reverts the move as it was deemed "illegal"
bool operator==(Entity &other); //overloading the == operator to check for intersection
protected:
void Iam(string WhatAmI) { this->WhatAmI = WhatAmI; } //is used in all the things that are Entities to identify what they are
//I tried to use polymorphism here but it broke too many other things
};
#endif
|
265caf435eb0ed6a724b4ec7c4a5e0aee06ee453
|
23ba742dbd55d9d2cef68e624f2d23e4fd76e8a3
|
/src/saiga/vulkan/pipeline/PipelineInfo.cpp
|
342af71e01e27927ffe4881cee3a05ede70787de
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
darglein/saiga
|
a4026b86e7397266e5036294a6435d85657f39ee
|
7617871a8ccdde58847e4f6871bd527f32652a79
|
refs/heads/master
| 2023-08-17T03:33:44.387706
| 2023-08-15T14:54:47
| 2023-08-15T14:54:47
| 97,219,629
| 135
| 26
|
MIT
| 2023-02-13T16:24:21
| 2017-07-14T09:55:50
|
C++
|
UTF-8
|
C++
| false
| false
| 1,528
|
cpp
|
PipelineInfo.cpp
|
/**
* Copyright (c) 2021 Darius Rückert
* Licensed under the MIT License.
* See LICENSE file for more information.
*/
#include "PipelineInfo.h"
namespace Saiga
{
namespace Vulkan
{
void PipelineInfo::addShaders(GraphicsShaderPipeline& shaders)
{
// shaderStages.clear();
// for (auto& s : shaders.modules)
// {
// shaderStages.push_back(s.createPipelineInfo());
// }
}
vk::GraphicsPipelineCreateInfo PipelineInfo::createCreateInfo(vk::PipelineLayout pipelineLayout,
vk::RenderPass renderPass)
{
dynamicState.dynamicStateCount = dynamicStateEnables.size();
dynamicState.pDynamicStates = dynamicStateEnables.data();
vi.vertexBindingDescriptionCount = 1;
vi.pVertexBindingDescriptions = &vertexInputBindings;
vi.vertexAttributeDescriptionCount = vertexInputAttributes.size();
vi.pVertexAttributeDescriptions = vertexInputAttributes.data();
colorBlendState.pAttachments = &blendAttachmentState;
colorBlendState.attachmentCount = 1;
vk::GraphicsPipelineCreateInfo pipelineCreateInfo(
vk::PipelineCreateFlags(), shaderStages.size(), shaderStages.data(), &vi, &inputAssemblyState,
&tessellationState, &viewportState, &rasterizationState, &multisampleState, &depthStencilState,
&colorBlendState, &dynamicState, pipelineLayout, renderPass, 0, vk::Pipeline(), 0);
return pipelineCreateInfo;
}
} // namespace Vulkan
} // namespace Saiga
|
90082ea9d54a1328bcd82843e4ab77bd7e13b81e
|
b460b5098115c22c16e58edc1d15f6344a2079a2
|
/64k/boxes/p_horboll.cpp
|
ecdeba50d96fd2c0c347e0aa7d17c5953fca1ef2
|
[] |
no_license
|
possan/randomjunk
|
a84836ced188b5dd67ac9cdbf080d43b9bedf629
|
9e1eda672149bda7efadcc63a7233df295d63473
|
refs/heads/master
| 2021-01-22T04:36:34.385324
| 2011-11-02T22:16:09
| 2011-11-02T22:16:09
| 906,668
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,822
|
cpp
|
p_horboll.cpp
|
//
//
//
#include "almosteverything.h"
#include <stdlib.h>
#define POINTTOMOVE 0
#define STEPS 40
#define NUMSTRINGS 40
#define STRINGLENGTH 0.1f
typedef struct {
float delta;
VECTOR p0[STEPS];
VECTOR p1[STEPS];
VECTOR p2[STEPS];
VECTOR p1m[STEPS];
} HBSTRING;
HBSTRING p_hb_string[ NUMSTRINGS ];
void p_horboll_init() {
int i, j;
VECTOR t, d;
for( i=0; i<NUMSTRINGS; i++ ) {
d.x = (float)((rand()%255)-128) / 128.0f;
d.y = (float)((rand()%255)-128) / 128.0f;
d.z = (float)((rand()%255)-128) / 128.0f;
vector_normalize( &d );
d.x *= STRINGLENGTH;
d.y *= STRINGLENGTH;
d.z *= STRINGLENGTH;
// d.x = 0;
// d.y = 1;
// d.z = 0;
t.x = 0;
t.y = 0;
t.z = 0;
p_hb_string[i].delta = (float)i / 40.0f;
for( j=0; j<STEPS; j++ ) {
p_hb_string[i].p0[j] = t;
p_hb_string[i].p1[j] = t;
p_hb_string[i].p2[j] = t;
p_hb_string[i].p1m[j].x = d.x;
p_hb_string[i].p1m[j].y = d.y;
p_hb_string[i].p1m[j].z = d.z;
t.x += d.x;
t.y += d.y;
t.z += d.z;
};
};
};
void p_horboll_render_string( HBSTRING *s ) {
int i;
glBegin( GL_LINES );
for( i=1; i<STEPS-1; i++ ) {
float b = (float)i / (float)STEPS;
glColor3f( b,b,b );
glVertex3f( s->p1[i].x, s->p1[i].y, s->p1[i].z );
glVertex3f( s->p1[i+1].x, s->p1[i+1].y, s->p1[i+1].z );
};
glEnd();
/*
glBegin( GL_LINES );
for( i=0; i<STEPS-1; i++ ) {
glColor3f( 1,0,0 );
glVertex3f( s->p1[i].x, s->p1[i].y, s->p1[i].z );
glVertex3f( s->p1[i].x+s->p1m[i].x, s->p1[i].y+s->p1m[i].y, s->p1[i].z+s->p1m[i].z );
};
glEnd();
*/
};
void p_horboll_animate_string( HBSTRING *s, EVENT *e ) {
int i, j, k;
VECTOR v1, v2, v;
float mag1, ext1, mag2, ext2;
float damping;
float perc = e->deltaTime;
//perc = 0.05f;
if( perc<0.000000001f )
perc=0.000000001f;
if( perc>1 )
perc=1;
float invperc = 1.0f / perc;
// flytta punkt noll
s->p1[POINTTOMOVE].x = 1.0f*sin( (e->globalTime+s->delta)*2 );
s->p1[POINTTOMOVE].y = 1.0f*sin( (e->globalTime+s->delta) );
s->p1[POINTTOMOVE].z = 1.0f*cos( (e->globalTime+s->delta)/2 );
//->v[0].x = 14*sin( e->globalTime*3 );
//->v[0].y = 10*sin( -e->globalTime );
//->v[0].z = 14*cos( e->globalTime*3 );
glBegin( GL_LINES );
/*
glColor3f( 1,0,0 );
glVertex3f( s->p1[0].x - 4, s->p1[0].y, s->p1[0].z );
glVertex3f( s->p1[0].x + 4, s->p1[0].y, s->p1[0].z );
glVertex3f( s->p1[0].x, s->p1[0].y - 4, s->p1[0].z );
glVertex3f( s->p1[0].x, s->p1[0].y + 4, s->p1[0].z );
glVertex3f( s->p1[0].x, s->p1[0].y, s->p1[0].z - 4 );
glVertex3f( s->p1[0].x, s->p1[0].y, s->p1[0].z + 4 );
glEnd();
*/
for( i=0; i<STEPS; i++ ) {
VECTOR movement;
vector_mul( &s->p1m[i], 0.9f );//.1f - 0.1f*perc );
movement = s->p1m[i];
//movement.x -= 0.0000f;
movement.y -= 0.04f;
//movement.z -= 0.0000f;
for( j=0; j<STEPS; j++ ) {
VECTOR spring;
float length;
float normal_length;
float force_scaler;
VECTOR force_vector;
// SpringVector = (position in space of neighbour) - (position in space of point (p,q))
spring.x = s->p1[j].x - s->p1[i].x;
spring.y = s->p1[j].y - s->p1[i].y;
spring.z = s->p1[j].z - s->p1[i].z;
// vector_normalize( &spring );
// Length = length of SpringVector
normal_length = vector_distance( &s->p0[j], &s->p0[i] );
length = vector_length( &spring );
// NormalLength = The length SpringVector would be if the cloth were unstretched
// ForceScaler = (Length - NormalLength) / (Length * Length) * SmallAmount
force_scaler = (length - normal_length) / (1.0f + length * length);
//test += force_scaler;
// ForceVector = SpringVector * ForceScaler
// add ForceVector to MovementVector
force_vector = spring;
vector_mul( &force_vector, force_scaler );
//vector_mul( &force_vector, perc );
vector_add( &movement, &force_vector );
};
//vector_add( &s->p1m[i], &movement );
s->p1m[i] = movement;
VECTOR t;
t = s->p1m[i];
vector_mul( &t, 0.12f );
s->p2[i] = s->p1[i];
vector_add( &s->p2[i], &t );
// s->p1m[i] = v;
// s->p2[i] = s->p1[i];
// vector_add( &s->p2[i], &v );
/*
int im1 = i - 1;
if( im1>=0 ) {
v1 = s->p1[im1];
vector_sub( &v1, &s->p1[i] );
mag1 = vector_length( &v1 );
ext1 = mag1 - STRINGLENGTH;
v.x += (v1.x / mag1 * ext1);
v.y += (v1.y / mag1 * ext1);
v.z += (v1.z / mag1 * ext1);
};
int ip1 = i + 1;
if( ip1<STEPS ) {
im1 = (im1 % STEPS);
ip1 = (ip1 % STEPS);
v2 = s->p1[ip1];
vector_sub( &v2, &s->p1[i] );
mag2 = vector_length( &v2 );
ext2 = mag2 - STRINGLENGTH;
v.x -= (v2.x / mag2 * ext2);
v.y -= (v2.y / mag2 * ext2);
v.z -= (v2.z / mag2 * ext2);
}
v.y -= (26.5f * perc);
// s->v[i].x = (s->v[i].x * damping * invperc) + (v.x * 0.001f * perc);
// s->v[i].y = (s->v[i].y * damping * invperc) + (v.y * 0.001f * perc) - (4.0f*perc);
// s->v[i].z = (s->v[i].z * damping * invperc) + (v.z * 0.001f * perc);
s->p2[i].x = s->p1[i].x + v.x * perc;
s->p2[i].y = s->p1[i].y + v.y * perc;
s->p2[i].z = s->p1[i].z + v.z * perc;
*/
/*
s->p2[i].x += ((float)((rand()%255)-128) / 120.0f) * perc;
s->p2[i].y += ((float)((rand()%255)-128) / 120.0f) * perc;
s->p2[i].z += ((float)((rand()%255)-128) / 120.0f) * perc;
*/
};
for( i=0; i<STEPS; i++ ) {
s->p1[i] = s->p2[i];
};
/*
Loop i from 0 to 31
X_vector1 = String1_X(i- 1) - String1_X(i)
Y_vector1 = String1_Y(i - 1) - String1_Y(i)
Magnitude1 = LengthOf (X_Vector1, Y_Vector1)
Extension1 = Magnitude1 - Normal_Length
X_vector2 = String1_X(i + 1) - String1_X(i)
Y_vector2 = String1_Y(i + 1) - String1_Y(i)
Magnitude2 = LengthOf(X_Vector2, Y_Vector2)
Extension2 = Magnitude2 - Normal_Length
xv = (X_Vector1 / Magnitude1 * Extension1) + (X_Vector2 / Magnitude2 * Extension2)
yv = (Y_Vector1 / Magnitude1 * Extension1) + (Y_Vector2 / Magnitude2 * Extension2) + Gravity
String2_X(i) = String1_X(i) + (xv * .01)
String2_Y(i) = String1_Y(i) + (yv * .01)
(Note you can use what ever value you like instead of .01)
end of loop
Copy all of String2_X to String1_X
Copy all of String2_Y to String1_Y
Draw lines between all adjacent points
*/
};
void p_horboll_run( EVENT *e ) {
float t = e->localTime;
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
gluPerspective( 100, 4/3, 0.1f, 1000 );
//gluLookAt( 5*sin(t/2), 5*cos(t/1), 5*cos(t/3), 0, 0, 0, 0, 1, 0 );
gluLookAt( 1, 2, 2, 0,0,0, 0, 1, 0 );
glLineWidth( 1 );
glDepthFunc( GL_LEQUAL );
// glTranslatef( 0, 0, -1 );
int i;
for( i=0; i<NUMSTRINGS; i++ )
p_horboll_animate_string( &p_hb_string[i], e );
glDisable( GL_TEXTURE_2D );
for( i=0; i<NUMSTRINGS; i++ )
p_horboll_render_string( &p_hb_string[i] );
};
|
24b7b3255a78c1a7f598f489c748f75418552c76
|
464f4190b7f5071527c066353b5365cf58aa42f8
|
/MineSweeper/MFC_FinV2/WinMine.h
|
ee0957fd0760149ff57e7c4b429d32aa114dfe1f
|
[] |
no_license
|
chinghsuanwei/MFC
|
f84b846212e508820ea07b2081ce857827021b7e
|
0be54182698af44035641ce1194c2246fd7ee38c
|
refs/heads/master
| 2020-07-30T08:37:28.924573
| 2019-09-24T02:29:42
| 2019-09-24T02:29:42
| 210,158,235
| 0
| 0
| null | null | null | null |
BIG5
|
C++
| false
| false
| 757
|
h
|
WinMine.h
|
#include "Mine.h"
#pragma once
// CWinMine 對話方塊
class CWinMine : public CDialog
{
DECLARE_DYNAMIC(CWinMine)
public:
CWinMine(CWnd* pParent = NULL); // 標準建構函式
virtual ~CWinMine();
// 對話方塊資料
enum { IDD = IDD_WINMINE };
public:
int totalBomb;
int col;
int row;
int baseX;
int baseY;
int countTime;
bool m_timer;
CMine mine[9][9];
CButton bombNumBtn;
CEdit bombNumEdit;
CButton timeBtn;
CEdit timeEdit;
int Init_Bomb();
int Init_Timer();
int Init_CountBomb();
void Init_BombNum();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支援
public:
DECLARE_MESSAGE_MAP()
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnTimer(UINT_PTR nIDEvent);
};
|
25d5bb10cb086200de2fc550d4cedf0f4014df3c
|
f73933a3d4fbc1c80784d15cdeb350bf6aa19161
|
/libyuv/src/main/cpp/native_yuv.cpp
|
c01a5589e17bee9fb11494b8ddf0c9bd243b6070
|
[] |
no_license
|
zhooker/OpenGLDemo
|
8cbab12874f641b7efff0712d6c62543c9bd2b54
|
ae3fd52b0bcf10559e336c9f87411d8f26d2d129
|
refs/heads/master
| 2021-06-04T05:24:47.151102
| 2021-04-07T09:43:17
| 2021-04-07T09:43:17
| 118,925,446
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 8,422
|
cpp
|
native_yuv.cpp
|
#include <jni.h>
#include <stdio.h>
#include <time.h>
#include <android/native_window.h>
#include <android/native_window_jni.h>
#include <malloc.h>
#include <string.h>
#include "native_yuv.h"
#ifdef ANDROID
#include <android/log.h>
#include <libyuv.h>
#define LOG_TAG "NativeYUV"
#define LOGE(format, ...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, format, ##__VA_ARGS__)
#define LOGI(format, ...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, format, ##__VA_ARGS__)
#else
#define LOGE(format, ...) printf(LOG_TAG format "\n", ##__VA_ARGS__)
#define LOGI(format, ...) printf(LOG_TAG format "\n", ##__VA_ARGS__)
#endif
/**
* 动态注册
*/
JNINativeMethod methods[] = {
{"yuv2rgb", "(Ljava/lang/String;IIILandroid/view/Surface;)V", (void *) yuv2rgb},
{"convertYuv2Rgb", "([BII)[B", (void *) convertYuv2Rgb},
{"yuv2Surface", "([BIILandroid/view/Surface;)V", (void *) yuv2Surface},
};
/**
* 动态注册
* @param env
* @return
*/
jint registerNativeMethod(JNIEnv *env) {
jclass cl = env->FindClass("com/sensetime/libyuv/NativeYUV");
if ((env->RegisterNatives(cl, methods, sizeof(methods) / sizeof(methods[0]))) < 0) {
return -1;
}
return 0;
}
/**
* 加载默认回调
* @param vm
* @param reserved
* @return
*/
jint JNI_OnLoad(JavaVM *vm, void *reserved) {
JNIEnv *env = NULL;
if (vm->GetEnv((void **) &env, JNI_VERSION_1_6) != JNI_OK) {
return -1;
}
//注册方法
if (registerNativeMethod(env) != JNI_OK) {
return -1;
}
return JNI_VERSION_1_6;
}
void ThrowException(JNIEnv *env, const char *exception, const char *message) {
jclass clazz = env->FindClass(exception);
if (NULL != clazz) {
env->ThrowNew(clazz, message);
}
}
enum Type {
TYPE_YUV420P_TO_RGB24 = 0,
TYPE_NV12_TO_RGB24 = 1,
TYPE_NV21_TO_RGB24 = 2
};
void I420_TO_RGB24(unsigned char *yuvData, unsigned char *rgb24, int width, int height) {
unsigned char *ybase = yuvData;
unsigned char *ubase = &yuvData[width * height];
unsigned char *vbase = &yuvData[width * height * 5 / 4];
//YUV420P转RGB24
libyuv::I420ToRGB24(ybase, width, ubase, width / 2, vbase, width / 2,
rgb24,
width * 3, width, height);
}
void NV12_TO_RGB24(unsigned char *yuvData, unsigned char *rgb24, int width, int height) {
unsigned char *ybase = yuvData;
unsigned char *uvbase = &yuvData[width * height];
//NV12转RGB24
libyuv::NV12ToRGB24(ybase, width, uvbase, width,
rgb24,
width * 3, width, height);
}
void NV21_TO_RGB24(unsigned char *yuvData, unsigned char *rgb24, int width, int height) {
unsigned char *ybase = yuvData;
unsigned char *vubase = &yuvData[width * height];
//NV21转RGB24
libyuv::NV21ToRGB24(ybase, width, vubase, width,
rgb24,
width * 3, width, height);
}
void drawYUV(const char *path, int type, int width, int height, ANativeWindow_Buffer buffer) {
FILE *file = fopen(path, "rb");
int frameSize = width * height * 3 / 2;
unsigned char *yuvData = new unsigned char[frameSize];
fread(yuvData, 1, frameSize, file);
unsigned char *rgb24 = new unsigned char[width * height * 3];
//YUV转RGB24
switch (type) {
case TYPE_YUV420P_TO_RGB24:
//YUV420P转RGB24
I420_TO_RGB24(yuvData, rgb24, width, height);
break;
case TYPE_NV12_TO_RGB24:
//YUV420SP转RGB24
NV12_TO_RGB24(yuvData, rgb24, width, height);
break;
case TYPE_NV21_TO_RGB24:
//YUV420SP转RGB24
NV21_TO_RGB24(yuvData, rgb24, width, height);
break;
}
uint32_t *line = (uint32_t *) buffer.bits;
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
int index = y * width + x;
line[x] = rgb24[index * 3] << 16
| rgb24[index * 3 + 1] << 8
| rgb24[index * 3 + 2];
}
line = line + buffer.stride;
}
//释放内存
delete[] yuvData;
delete[] rgb24;
//关闭文件句柄
fclose(file);
}
void yuv2rgb(JNIEnv *env, jclass obj, jstring yuvPath, jint type, jint width, jint height,
jobject surface) {
const char *path = env->GetStringUTFChars(yuvPath, 0);
//获取目标surface
ANativeWindow *window = ANativeWindow_fromSurface(env, surface);
if (NULL == window) {
ThrowException(env, "java/lang/RuntimeException", "unable to get native window");
return;
}
//默认的是RGB_565
int32_t result = ANativeWindow_setBuffersGeometry(window, 0, 0, WINDOW_FORMAT_RGBA_8888);
if (result < 0) {
ThrowException(env, "java/lang/RuntimeException", "unable to set buffers geometry");
//释放窗口
ANativeWindow_release(window);
window = NULL;
return;
}
ANativeWindow_acquire(window);
ANativeWindow_Buffer buffer;
//锁定窗口的绘图表面
if (ANativeWindow_lock(window, &buffer, NULL) < 0) {
ThrowException(env, "java/lang/RuntimeException", "unable to lock native window");
//释放窗口
ANativeWindow_release(window);
window = NULL;
return;
}
//绘制YUV420P
drawYUV(path, type, width, height, buffer);
//解锁窗口的绘图表面
if (ANativeWindow_unlockAndPost(window) < 0) {
ThrowException(env, "java/lang/RuntimeException",
"unable to unlock and post to native window");
}
env->ReleaseStringUTFChars(yuvPath, path);
//释放
ANativeWindow_release(window);
}
jbyteArray convertYuv2Rgb(JNIEnv *env, jclass obj, jbyteArray data, jint width, jint height) {
jbyte *in_data = env->GetByteArrayElements(data, NULL);
int dst_len = width * height * 3;
jbyteArray out_data = env->NewByteArray((jsize) dst_len);
jbyte *jbyte_out = env->GetByteArrayElements(out_data, 0);
NV21_TO_RGB24(reinterpret_cast<unsigned char *>(in_data),
reinterpret_cast<unsigned char *>(jbyte_out), width, height);
env->ReleaseByteArrayElements(out_data, jbyte_out, 0);
return out_data;
}
void yuv2Surface(JNIEnv *env, jclass obj, jbyteArray data, jint width, jint height,
jobject surface) {
//获取目标surface
ANativeWindow *window = ANativeWindow_fromSurface(env, surface);
if (NULL == window) {
ThrowException(env, "java/lang/RuntimeException", "unable to get native window");
return;
}
//默认的是RGB_565
int32_t result = ANativeWindow_setBuffersGeometry(window, width, height,
WINDOW_FORMAT_RGBA_8888);
if (result < 0) {
ThrowException(env, "java/lang/RuntimeException", "unable to set buffers geometry");
//释放窗口
ANativeWindow_release(window);
window = NULL;
return;
}
ANativeWindow_acquire(window);
ANativeWindow_Buffer buffer;
//锁定窗口的绘图表面
if (ANativeWindow_lock(window, &buffer, NULL) < 0) {
ThrowException(env, "java/lang/RuntimeException", "unable to lock native window");
//释放窗口
ANativeWindow_release(window);
window = NULL;
return;
}
jbyte *in_data = env->GetByteArrayElements(data, NULL);
unsigned char *rgb24 = new unsigned char[width * height * 3];
//YUV转RGB24
NV21_TO_RGB24(reinterpret_cast<unsigned char *>(in_data), rgb24, width, height);
// 绘制到surface
uint32_t *line = (uint32_t *) buffer.bits;
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
int index = y * width + x;
line[x] = rgb24[index * 3] << 16
| rgb24[index * 3 + 1] << 8
| rgb24[index * 3 + 2];
}
line = line + buffer.stride;
}
//释放内存
delete[] rgb24;
//解锁窗口的绘图表面
if (ANativeWindow_unlockAndPost(window) < 0) {
ThrowException(env, "java/lang/RuntimeException",
"unable to unlock and post to native window");
}
//释放
ANativeWindow_release(window);
}
|
a6696bc3c74af68467099026c97c563acf29e549
|
1154b526b6ea99344b6ce196182923fd0fbb34e9
|
/Lab1/Lab1/Utils.cpp
|
35b1457c54d0303555b314ed8263fda7219f8079
|
[] |
no_license
|
RaulBurian/PPD
|
75fb3c44a296ec6380e1794866dfa99d3fb9ed35
|
d35e8a05c2ed59a5900a6dc92fd3b74b189b588c
|
refs/heads/master
| 2021-03-17T20:29:54.856509
| 2020-03-13T07:49:57
| 2020-03-13T07:49:57
| 247,015,546
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,196
|
cpp
|
Utils.cpp
|
#include "Utils.h"
#include <random>
#include <chrono>
#include <Windows.h>
#include <iostream>
#include <utility>
std::shared_mutex centralLock{};
int generateSerial()
{
static std::atomic<int> serial = 0;
return serial++;
}
int generateId() {
static std::atomic<int> id = 0;
return id++;
}
bool transfer(Account* owner, Account* recipient, int money)
{
centralLock.lock_shared();
if (owner->getId() < recipient->getId()) {
owner->getMutex().lock();
recipient->getMutex().lock();
if (owner->getMoney() < money) {
Transfer t{ owner,recipient,money,false };
owner->addTransferSent(t);
recipient->addTransferReceived(t);
owner->getMutex().unlock();
recipient->getMutex().unlock();
centralLock.unlock_shared();
return false;
}
owner->setMoney(owner->getMoney() - money);
recipient->setMoney(recipient->getMoney() + money);
Transfer t{ owner,recipient,money,true };
owner->addTransferSent(t);
recipient->addTransferReceived(t);
owner->getMutex().unlock();
recipient->getMutex().unlock();
centralLock.unlock_shared();
return true;
}
else {
recipient->getMutex().lock();
owner->getMutex().lock();
if (owner->getMoney() < money) {
Transfer t{ owner,recipient,money,false };
owner->addTransferSent(t);
recipient->addTransferReceived(t);
recipient->getMutex().unlock();
owner->getMutex().unlock();
centralLock.unlock_shared();
return false;
}
owner->setMoney(owner->getMoney() - money);
recipient->setMoney(recipient->getMoney() + money);
Transfer t{ owner,recipient,money,true };
owner->addTransferSent(t);
recipient->addTransferReceived(t);
recipient->getMutex().unlock();
owner->getMutex().unlock();
centralLock.unlock_shared();
return true;
}
}
void consistencyCheck(std::vector<Account*> accounts) {
std::vector<std::pair<Account*, int>> sentSizes;
std::vector<std::pair<Account*, int>> receivedSizes;
std::vector<std::pair<Account*, int>> money;
std::vector<std::pair<Account*, int>> moneyNow;
int s1 = 0, s2 = 0;
int delta = 0;
centralLock.lock();
for (Account* account : accounts) {
sentSizes.push_back(std::pair<Account*, int>{account,account->getTransfersSent().size()});
s1 += account->getTransfersSent().size();
s2 += account->getTransfersReceived().size();
receivedSizes.push_back(std::pair<Account*, int>{account,account->getTransfersReceived().size()});
money.push_back(std::pair<Account*, int>{account, account->getMoney()});
moneyNow.push_back(std::pair<Account*, int>{account, account->getMoney()});
}
centralLock.unlock();
/*for (auto pair : sentSizes) {
std::cout << pair.first->getId() << " sentSize:" << pair.second<<'\n';
}
for (auto pair : receivedSizes) {
std::cout << pair.first->getId() << " recSize:" << pair.second<<'\n';
}*/
int i = 0;
for (auto sentPair : sentSizes) {
int lastMoney = money[i].first->getLastMoney();
std::vector<Transfer> sentTransfers = sentPair.first->getTransfersSent();
for (int i = sentPair.first->getLastCheckedSent(); i < sentPair.second; i++) {
int ok = 0;
Account* recipient = sentTransfers[i].getRecipient();
std::vector<Transfer> receivedTransfers =recipient->getTransfersReceived();
delta += sentTransfers[i].getMoney();
int x = -1;
lastMoney -= sentTransfers[i].getMoney();
for (int k = 0; k < receivedSizes.size(); k++)
if (receivedSizes[k].first->getId() == recipient->getId()) {
x = k;
break;
}
int receivedSize = receivedSizes[x].second;
for (int j = receivedSizes[x].first->getLastCheckedRec(); j < receivedSize;j++) {
if (receivedTransfers[j].getSerial() == sentTransfers[i].getSerial()) {
ok = 1;
delta -= receivedTransfers[j].getMoney();
lastMoney += receivedTransfers[j].getMoney();
break;
}
}
if (!ok && lastMoney!=moneyNow[i].second) {
std::cout << "Inconsistent Data\n"<<x<<'\n'<<receivedSizes[x].second<<'\n'<<s2-s1<<'\n';
return;
}
}
i++;
}
if (delta)
std::cout << "Inconsistent data'\n";
else
std::cout << "Consistent Data\n"<<s2-s1<<'\n';
for (auto pair : sentSizes) {
//std::cout<<pair.first->getId() << " LastcheckedSent:" << pair.first->getLastCheckedSent() << " new:" << pair.second << '\n';
pair.first->setLastCheckedSent(pair.second);
}
for (auto pair : receivedSizes) {
//std::cout << pair.first->getId() << " LastcheckedRec:" << pair.first->getLastCheckedSent() << " new:" << pair.second << '\n';
pair.first->setLastCheckedRec(pair.second);
}
i = 0;
for (auto pair : money) {
pair.first->setLastMoney(moneyNow[i].second);
i++;
}
}
void task(int ops,std::vector<Account*> accounts)
{
std::default_random_engine e((int)std::chrono::steady_clock::now().time_since_epoch().count());
std::uniform_int_distribution<int> f(0,1000);
for (int i = 0; i < ops; i++)
{
int x = f(e) % 10;
int y = f(e) % 10;
while (x == y) {
y = f(e) % 10;
}
int z = f(e) % 1000;
//std::cout << x << " " << y << '\n';
bool result=transfer(accounts[x], accounts[y], z);
/*if (result) {
Transfer t{ accounts[x],accounts[y],z,true };
accounts[x]->addTransferSent(t);
accounts[y]->addTransferReceived(t);
}*/
//Sleep(1);
}
}
void showMenu() {
std::cout << "1.Check total money"<<'\n';
std::cout << "2.Show logs for owner"<<'\n';
std::cout << "0.Exit"<<'\n';
std::cout << "Enter your option:";
}
void check(std::vector<Account*> accounts,bool* done) {
while (!(*done)) {
consistencyCheck(accounts);
//Sleep(1);
}
}
//void console(std::vector<Account*> accounts)
//{
// bool end = false;
// int x;
// std::string owner;
// Account* a = nullptr;
// while (!end) {
// showMenu();
// std::cin >> x;
// switch (x) {
// case 1:
// std::cout<<"Total money in bank:"<<checkMoney(accounts)<<'\n';
// break;
// case 2:
// std::cout << "\nEnter account owner:";
// std::cin >> owner;
// std::cout << owner;
// for (auto account : accounts) {
// if (account->getOwner() == owner) {
// a = account;
// std::cout << "gasit";
// break;
// }
// }
// checkTransfers(a);
// break;
// case 0:
// end = true;
// break;
// default:
// std::cout << "\nInvalid option!\n";
// }
// }
//}
|
81270d8e0f2d413ca0eb86a1731c76166d3d2937
|
6c5d238e635e2a6f4e964eda6744d1277f2cbfe1
|
/src/polynomial.cpp
|
0f9edf7ee8ab95ce01aefa992e266eeee93f33c0
|
[
"MIT"
] |
permissive
|
530393297/furry-octo-wookie
|
a4c68d7879d954f76c9ff8eb831e82b6b63260e3
|
ba15a779605d5c7f5ccfb3f8ca4c02d2ab36283b
|
refs/heads/master
| 2021-01-11T09:01:11.756578
| 2015-08-17T16:38:23
| 2015-08-17T16:38:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,758
|
cpp
|
polynomial.cpp
|
#include "polynomial.h"
Polynomial::Polynomial(int _degree) : degree(_degree), coefficients(_degree + 1)
{
}
Polynomial::Polynomial(std::vector<long> _coefficients) : degree(_coefficients.size() - 1), coefficients(_coefficients)
{
}
Polynomial::Polynomial(const Polynomial &poly) : Polynomial(poly.get_coefficients())
{
}
std::vector<long> Polynomial::get_coefficients() const
{
return coefficients;
}
Polynomial Polynomial::operator+ (const Polynomial& rhs)
{
int coeff = 0;
if(degree < rhs.degree) {
std::vector<long> res(rhs.degree);
for (; coeff <= degree; coeff++)
res[coeff] = coefficients[coeff] + rhs.coefficients[coeff];
for (; coeff <= rhs.degree; coeff++)
res[coeff] = rhs.coefficients[coeff];
return Polynomial(res);
} else {
std::vector<long> res(degree);
for (; coeff <= rhs.degree; coeff++)
res[coeff] = coefficients[coeff] + rhs.coefficients[coeff];
for (; coeff <= degree; coeff++)
res[coeff] = coefficients[coeff];
return Polynomial(res);
}
}
Polynomial Polynomial::operator* (const Polynomial& rhs)
{
std::vector<long> res(degree + rhs.degree + 1, 0);
for(int i = 0; i <= degree; i++) {
for(int j = 0; j <= rhs.degree; j++) {
res[i + j] += coefficients[i] * rhs.coefficients[j];
}
}
return Polynomial(res);
}
Polynomial Polynomial::exp (int exp)
{
Polynomial y (std::vector<long> (1, 1));
Polynomial x (coefficients);
if(exp == 0) {
return y;
}
while(exp > 1) {
if(exp % 2 == 0) {
x = x * x;
exp = exp >> 1;
} else {
y = x * y;
x = x * x;
exp = (exp - 1) >> 1;
}
}
return x * y;
}
Polynomial Polynomial::mod (int n)
{
std::vector<long> res(degree + 1, 0);
for(int i = 0; i <= degree; i++)
res[i] = coefficients[i] % n;
return Polynomial(res);
}
Polynomial Polynomial::scalar_mult(const int __x)
{
std::vector<long> res(degree + 1, 0);
for(int i = 0; i <= degree; i++)
res[i] = coefficients[i] * __x;
return Polynomial(res);
}
int Polynomial::get_degree()
{
return degree;
}
Polynomial Polynomial::partial_evaluate(const int __b)
{
std::vector<long> res(degree + 1, 0);
for(int i = 0; i <= degree; i++)
res[i] = coefficients[i] * ((long)std::pow(__b, i))%33;
return Polynomial(res);
}
void Polynomial::pad(const int __x)
{
coefficients.resize(__x, 0);
degree = __x;
}
long Polynomial::evaluate(const int __x)
{
long res = 0;
for(int i = 0; i <= degree; i++)
res += (coefficients[i] * (long)std::pow(__x, i))%33;
return res;
}
|
81593b5f119ecd108b6fa68fc1ffea681be47a85
|
78b28019e10962bb62a09fa1305264bbc9a113e3
|
/common/binary_search_tree/ext/info/helpers/insert_node_to_root.h
|
8fe2ef4e5da40468adb52dfe354c83553bdfbbbe
|
[
"MIT"
] |
permissive
|
Loks-/competitions
|
49d253c398bc926bfecc78f7d468410702f984a0
|
26a1b15f30bb664a308edc4868dfd315eeca0e0b
|
refs/heads/master
| 2023-06-08T06:26:36.756563
| 2023-05-31T03:16:41
| 2023-05-31T03:16:41
| 135,969,969
| 5
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 652
|
h
|
insert_node_to_root.h
|
#pragma once
#include "common/template.h"
namespace bst {
namespace ext {
namespace info {
namespace hidden {
template <class TNode>
inline void InsertNodeToRootI(TNode*, TNode*, TFakeFalse) {}
template <class TNode>
inline void InsertNodeToRootI(TNode* node, TNode* ins, TFakeTrue) {
static_assert(TNode::use_parent, "use_parent should be true");
for (; node; node = node->p) node->InsertInfo(ins);
}
} // namespace hidden
template <class TNode>
inline void InsertNodeToRoot(TNode* node, TNode* ins) {
hidden::InsertNodeToRootI(node, ins, TFakeBool<!TNode::TInfo::is_none>());
}
} // namespace info
} // namespace ext
} // namespace bst
|
b4f054aef07b40fd073d5b1a19eba62fc7a8d18e
|
f5096e1689208625479807ba080382029f929d87
|
/src/displaylist.hpp
|
3737464846e484c08d836d66efb40c97b6c9a1a9
|
[
"MIT"
] |
permissive
|
pombredanne/libapt
|
ba3bbed222fe8c16d2907a62f23561d0dc2a4803
|
43b05b3de632896cb7d1351191a07c0f0cdf801a
|
refs/heads/master
| 2021-06-12T03:26:52.657094
| 2017-01-27T20:26:53
| 2017-01-27T20:26:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 955
|
hpp
|
displaylist.hpp
|
#pragma once
#include "displayobject.hpp"
#include <map>
#include <string>
#include <stdint.h>
namespace libapt
{
class DisplayList
{
public:
void Insert(uint32_t depth, std::shared_ptr<Character> ch,
const glm::vec2& translate, const glm::mat2& rotscale,
const std::string& name, std::shared_ptr<DisplayObject> parent);
void AddClipLayer(uint32_t depth, uint32_t clipdepth, std::shared_ptr<Character> ch,
const glm::vec2& translate, const glm::mat2& rotscale,
const std::string& name, std::shared_ptr<DisplayObject> parent);
void Erase(uint32_t depth);
void Move(uint32_t depth, const glm::vec2& translate,
const glm::mat2& rotscale);
void Colortransform(uint32_t depth,glm::u8vec4 color);
void Render(const Transformation& t);
inline const std::shared_ptr<DisplayObject> GetObject(uint32_t depth)
{
return m_objects[depth];
}
private:
std::map<uint32_t, std::shared_ptr<DisplayObject>> m_objects;
};
}
|
9534f814de54af681b524466f11c31a5b7add6e4
|
bed059563f3e3808307d4886e61ce6ccdabcd44d
|
/poc/counter3/cudabinary.hpp
|
d40f44f2535d9ea995a1a3b4fa874a3c3dd7a618
|
[
"BSD-3-Clause"
] |
permissive
|
Jokeren/barracuda
|
fc8e094ab1950009c4284fda27580c8752fb1260
|
db2549b62593934d81e3e8141302dd344f85a407
|
refs/heads/master
| 2020-09-24T15:19:15.660628
| 2019-08-22T15:25:43
| 2019-08-22T15:25:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,568
|
hpp
|
cudabinary.hpp
|
#pragma once
#include <stdint.h>
namespace Types
{
static const uint32_t CUDA_FAT_MAGIC = 0x466243b1;
static const uint32_t CUDA_FAT_VERSION = 1;
static const uint32_t CUDA_FATHDR_MAGIC = 0xba55ed50;
static const uint32_t CUDA_FATHDR_VERSION = 1;
struct CudaFatBinary
{
uint32_t magic;
uint32_t version;
void* header;
char* name;
};
struct CudaFatHeader
{
uint32_t magic;
uint16_t version;
uint16_t hdr_size;
uint64_t data_size;
};
struct CudaFatEntry
{
uint16_t type;
uint16_t unk1;
uint32_t bin_ofs;
uint64_t bin_size;
uint32_t unk2;
uint32_t kind_ofs;
uint32_t code_ver;
uint32_t arch;
uint32_t name_ofs;
uint32_t name_size;
uint64_t flags;
uint64_t unk3;
uint64_t uncomp_bin_size;
};
enum CUDA_ENTRY_FLAGS {
CUDA_ENTRY_FLAG_64BIT = 0x1,
CUDA_ENTRY_FLAG_DEBUG = 0x2,
CUDA_ENTRY_FLAG_HOST_LINUX = 0x10,
CUDA_ENTRY_FLAG_HOST_MAC = 0x20,
CUDA_ENTRY_FLAG_HOST_WINDOWS = 0x40,
CUDA_ENTRY_FLAG_COMPRESSED_ZLIB = 0x1000,
CUDA_ENTRY_FLAG_COMPRESSED_LZ4 = 0x2000,
};
static const uint64_t CUDA_COMPRESS_MASK = CUDA_ENTRY_FLAG_COMPRESSED_LZ4 | CUDA_ENTRY_FLAG_COMPRESSED_ZLIB;
enum CUDA_ENTRY_TYPES {
CUDA_ENTRY_TYPE_PTX = 0x1,
CUDA_ENTRY_TYPE_ELF = 0x2,
CUDA_ENTRY_TYPE_CUBIN = 0x4,
};
}
|
4b3bfbb383cf6e360f96c6b2038d751cbf70c8c9
|
61d3da9188b545a221d9cb628e2250995a65ecfd
|
/employee.h
|
b781b8a8bdba7f1d7bb5d0d2a1d2f8057a3645d5
|
[] |
no_license
|
csc2431-master/saturday-inheritance
|
45ae02d231415e506df82fe1ae6445f218eeca51
|
38e742ced02d7b246b8a375d3670e1c335cf7b4f
|
refs/heads/main
| 2023-04-18T05:41:08.940369
| 2021-05-01T19:08:50
| 2021-05-01T19:08:50
| 363,468,418
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 592
|
h
|
employee.h
|
//
// Created by Arias Arevalo, Carlos on 5/1/21.
//
#ifndef SATURDAY_INHERITANCE_EMPLOYEE_H
#define SATURDAY_INHERITANCE_EMPLOYEE_H
#include "person.h"
#include <string>
using std::string;
class Employee: public Person {
private:
int _id;
float _baseSalary;
public:
Employee(const string& name, int ssn, int id, float salary);
Employee(const Employee& other);
virtual ~Employee();
Employee& operator=(const Employee& rhs);
int GetID()const;
float GetSalary()const;
void GiveRaise(float percentage);
virtual string ToString()const;
};
#endif //SATURDAY_INHERITANCE_EMPLOYEE_H
|
248a2a4cd6ae5d0ac6c21a76b839289f50462ced
|
28e50dae006f5d7faf1718c6bcd00827491f8999
|
/src/simulation_context.cpp
|
5d95a120331476d5bc4d3a570b07948e432bf4c8
|
[
"BSD-2-Clause"
] |
permissive
|
cocteautwins/SIRIUS-develop
|
f30cdc46e27a92bc81aef23e21c4f4e469aee010
|
de31b5b4bb2a517004b648c8b83d8686c2f4f97b
|
refs/heads/master
| 2021-01-17T08:28:05.205821
| 2016-05-19T13:50:50
| 2016-05-19T13:50:50
| 59,735,058
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 13,579
|
cpp
|
simulation_context.cpp
|
#include "simulation_context.h"
namespace sirius {
void Simulation_context::init_fft()
{
auto rlv = unit_cell_.reciprocal_lattice_vectors();
auto& comm = mpi_grid_->communicator(1 << _mpi_dim_k_row_ | 1 << _mpi_dim_k_col_);
if (!(fft_mode_ == "serial" || fft_mode_ == "parallel")) TERMINATE("wrong FFT mode");
if (full_potential())
{
/* split bands between all ranks, use serial FFT */
mpi_grid_fft_ = new MPI_grid({1, comm.size()}, comm);
}
else
{
/* use parallel FFT for density and potential */
mpi_grid_fft_ = new MPI_grid({mpi_grid_->dimension_size(_mpi_dim_k_row_),
mpi_grid_->dimension_size(_mpi_dim_k_col_)}, comm);
if (fft_mode_ == "serial")
{
/* serial FFT in Hloc */
mpi_grid_fft_vloc_ = new MPI_grid({1, comm.size()}, comm);
}
else
{
mpi_grid_fft_vloc_ = new MPI_grid({mpi_grid_->dimension_size(_mpi_dim_k_row_),
mpi_grid_->dimension_size(_mpi_dim_k_col_)}, comm);
}
}
/* create FFT driver for dense mesh (density and potential) */
fft_ = new FFT3D(FFT3D_grid(pw_cutoff(), rlv), mpi_grid_fft_->communicator(1 << 0), processing_unit(), 0.9);
/* create a list of G-vectors for dense FFT grid */
gvec_ = Gvec(vector3d<double>(0, 0, 0), rlv, pw_cutoff(), fft_->grid(),
mpi_grid_fft_->dimension_size(0), true, reduce_gvec_);
gvec_fft_distr_ = new Gvec_FFT_distribution(gvec_, mpi_grid_fft_->communicator(1 << 0));
if (!full_potential())
{
/* create FFT driver for coarse mesh */
fft_coarse_ = new FFT3D(FFT3D_grid(2 * gk_cutoff(), rlv), mpi_grid_fft_vloc_->communicator(1 << 0), processing_unit(), 0.9);
/* create a list of G-vectors for corase FFT grid */
gvec_coarse_ = Gvec(vector3d<double>(0, 0, 0), rlv, gk_cutoff() * 2, fft_coarse_->grid(),
mpi_grid_fft_vloc_->dimension_size(0), true, reduce_gvec_);
}
}
void Simulation_context::initialize()
{
PROFILE();
if (initialized_) TERMINATE("Simulation context is already initialized.");
/* check if we can use a GPU device */
if (processing_unit() == GPU)
{
#ifndef __GPU
TERMINATE_NO_GPU
#endif
}
/* check MPI grid dimensions and set a default grid if needed */
if (!mpi_grid_dims_.size()) mpi_grid_dims_ = {comm_.size()};
if (full_potential()) reduce_gvec_ = false;
/* setup MPI grid */
mpi_grid_ = new MPI_grid(mpi_grid_dims_, comm_);
blacs_grid_ = new BLACS_grid(mpi_grid_->communicator(1 << _mpi_dim_k_row_ | 1 << _mpi_dim_k_col_),
mpi_grid_->dimension_size(_mpi_dim_k_row_), mpi_grid_->dimension_size(_mpi_dim_k_col_));
blacs_grid_slice_ = new BLACS_grid(blacs_grid_->comm(), 1, blacs_grid_->comm().size());
/* initialize variables, related to the unit cell */
unit_cell_.initialize();
/* initialize FFT interface */
init_fft();
#ifdef __PRINT_MEMORY_USAGE
MEMORY_USAGE_INFO();
#endif
//if (comm_.rank() == 0)
//{
// unit_cell_.write_cif();
// unit_cell_.write_json();
//}
if (unit_cell_.num_atoms() != 0)
{
unit_cell_.symmetry()->check_gvec_symmetry(gvec_);
if (!full_potential()) unit_cell_.symmetry()->check_gvec_symmetry(gvec_coarse_);
}
auto& fft_grid = fft().grid();
std::pair<int, int> limits(0, 0);
for (int x: {0, 1, 2})
{
limits.first = std::min(limits.first, fft_grid.limits(x).first);
limits.second = std::max(limits.second, fft_grid.limits(x).second);
}
phase_factors_ = mdarray<double_complex, 3>(3, limits, unit_cell().num_atoms());
#pragma omp parallel for
for (int i = limits.first; i <= limits.second; i++)
{
for (int ia = 0; ia < unit_cell_.num_atoms(); ia++)
{
auto pos = unit_cell_.atom(ia).position();
for (int x: {0, 1, 2}) phase_factors_(x, i, ia) = std::exp(double_complex(0.0, twopi * (i * pos[x])));
}
}
if (full_potential()) step_function_ = new Step_function(unit_cell_, fft_, *gvec_fft_distr_, comm_);
if (iterative_solver_input_section().real_space_prj_)
{
STOP();
//real_space_prj_ = new Real_space_prj(unit_cell_, comm_, iterative_solver_input_section().R_mask_scale_,
// iterative_solver_input_section().mask_alpha_,
// gk_cutoff(), num_fft_streams(), num_fft_workers());
}
/* take 10% of empty non-magnetic states */
if (num_fv_states_ < 0)
{
num_fv_states_ = static_cast<int>(1e-8 + unit_cell_.num_valence_electrons() / 2.0) +
std::max(10, static_cast<int>(0.1 * unit_cell_.num_valence_electrons()));
}
if (num_fv_states() < int(unit_cell_.num_valence_electrons() / 2.0))
TERMINATE("not enough first-variational states");
std::string evsn[] = {std_evp_solver_name_, gen_evp_solver_name_};
if (mpi_grid_->size(1 << _mpi_dim_k_row_ | 1 << _mpi_dim_k_col_) == 1)
{
if (evsn[0] == "") evsn[0] = "lapack";
if (evsn[1] == "") evsn[1] = "lapack";
}
else
{
if (evsn[0] == "") evsn[0] = "scalapack";
if (evsn[1] == "") evsn[1] = "elpa1";
}
ev_solver_t* evst[] = {&std_evp_solver_type_, &gen_evp_solver_type_};
std::map<std::string, ev_solver_t> str_to_ev_solver_t;
str_to_ev_solver_t["lapack"] = ev_lapack;
str_to_ev_solver_t["scalapack"] = ev_scalapack;
str_to_ev_solver_t["elpa1"] = ev_elpa1;
str_to_ev_solver_t["elpa2"] = ev_elpa2;
str_to_ev_solver_t["magma"] = ev_magma;
str_to_ev_solver_t["plasma"] = ev_plasma;
str_to_ev_solver_t["rs_cpu"] = ev_rs_cpu;
str_to_ev_solver_t["rs_gpu"] = ev_rs_gpu;
for (int i: {0, 1})
{
auto name = evsn[i];
if (str_to_ev_solver_t.count(name) == 0)
{
std::stringstream s;
s << "wrong eigen value solver " << name;
TERMINATE(s);
}
*evst[i] = str_to_ev_solver_t[name];
}
#if (__VERBOSITY > 0)
if (comm_.rank() == 0) print_info();
#endif
if (esm_type() == ultrasoft_pseudopotential)
{
/* create augmentation operator Q_{xi,xi'}(G) here */
for (int iat = 0; iat < unit_cell_.num_atom_types(); iat++)
augmentation_op_.push_back(new Augmentation_operator(comm_, unit_cell_.atom_type(iat), gvec_, unit_cell_.omega()));
}
time_active_ = -runtime::wtime();
initialized_ = true;
}
void Simulation_context::print_info()
{
printf("\n");
printf("SIRIUS version : %2i.%02i\n", major_version, minor_version);
printf("git hash : %s\n", git_hash);
printf("build date : %s\n", build_date);
printf("\n");
printf("number of MPI ranks : %i\n", comm_.size());
printf("MPI grid :");
for (int i = 0; i < mpi_grid_->num_dimensions(); i++) printf(" %i", mpi_grid_->dimension_size(i));
printf("\n");
printf("maximum number of OMP threads : %i\n", omp_get_max_threads());
printf("number of independent FFTs : %i\n", mpi_grid_fft_->dimension_size(1));
printf("FFT comm size : %i\n", mpi_grid_fft_->dimension_size(0));
printf("\n");
printf("FFT context for density and potential\n");
printf("=====================================\n");
printf(" plane wave cutoff : %f\n", pw_cutoff());
auto fft_grid = fft_->grid();
printf(" grid size : %i %i %i total : %i\n", fft_grid.size(0),
fft_grid.size(1),
fft_grid.size(2),
fft_grid.size());
printf(" grid limits : %i %i %i %i %i %i\n", fft_grid.limits(0).first,
fft_grid.limits(0).second,
fft_grid.limits(1).first,
fft_grid.limits(1).second,
fft_grid.limits(2).first,
fft_grid.limits(2).second);
printf(" number of G-vectors within the cutoff : %i\n", gvec_.num_gvec());
printf(" number of G-shells : %i\n", gvec_.num_shells());
printf("\n");
if (!full_potential())
{
printf("\n");
printf("FFT context for applying Hloc\n");
printf("=============================\n");
auto fft_grid = fft_coarse_->grid();
printf(" grid size : %i %i %i total : %i\n", fft_grid.size(0),
fft_grid.size(1),
fft_grid.size(2),
fft_grid.size());
printf(" grid limits : %i %i %i %i %i %i\n", fft_grid.limits(0).first,
fft_grid.limits(0).second,
fft_grid.limits(1).first,
fft_grid.limits(1).second,
fft_grid.limits(2).first,
fft_grid.limits(2).second);
printf(" number of G-vectors within the cutoff : %i\n", gvec_coarse_.num_gvec());
printf(" number of G-shells : %i\n", gvec_coarse_.num_shells());
printf("\n");
}
unit_cell_.print_info();
for (int i = 0; i < unit_cell_.num_atom_types(); i++) unit_cell_.atom_type(i).print_info();
printf("\n");
printf("total number of aw basis functions : %i\n", unit_cell_.mt_aw_basis_size());
printf("total number of lo basis functions : %i\n", unit_cell_.mt_lo_basis_size());
printf("number of first-variational states : %i\n", num_fv_states());
printf("number of bands : %i\n", num_bands());
printf("number of spins : %i\n", num_spins());
printf("number of magnetic dimensions : %i\n", num_mag_dims());
printf("lmax_apw : %i\n", lmax_apw());
printf("lmax_pw : %i\n", lmax_pw());
printf("lmax_rho : %i\n", lmax_rho());
printf("lmax_pot : %i\n", lmax_pot());
printf("lmax_rf : %i\n", unit_cell_.lmax());
printf("smearing width : %f\n", smearing_width());
printf("cyclic block size : %i\n", cyclic_block_size());
std::string evsn[] = {"standard eigen-value solver : ",
"generalized eigen-value solver : "};
ev_solver_t evst[] = {std_evp_solver_type_, gen_evp_solver_type_};
for (int i = 0; i < 2; i++)
{
printf("%s", evsn[i].c_str());
switch (evst[i])
{
case ev_lapack:
{
printf("LAPACK\n");
break;
}
#ifdef __SCALAPACK
case ev_scalapack:
{
printf("ScaLAPACK\n");
break;
}
case ev_elpa1:
{
printf("ELPA1\n");
break;
}
case ev_elpa2:
{
printf("ELPA2\n");
break;
}
case ev_rs_gpu:
{
printf("RS_gpu\n");
break;
}
case ev_rs_cpu:
{
printf("RS_cpu\n");
break;
}
#endif
case ev_magma:
{
printf("MAGMA\n");
break;
}
case ev_plasma:
{
printf("PLASMA\n");
break;
}
default:
{
TERMINATE("wrong eigen-value solver");
}
}
}
printf("\n");
printf("processing unit : ");
switch (processing_unit())
{
case CPU:
{
printf("CPU\n");
break;
}
case GPU:
{
printf("GPU\n");
break;
}
}
int i = 1;
printf("\n");
printf("XC functionals\n");
printf("==============\n");
for (auto& xc_label: xc_functionals())
{
XC_functional xc(xc_label, num_spins());
printf("%i) %s: %s\n", i, xc_label.c_str(), xc.name().c_str());
printf("%s\n", xc.refs().c_str());
i++;
}
}
};
|
5a98ddb2a0eaddb482fe89c05b3b149f70c00786
|
de65222548d7aeb632ffe27deed58efcfe4a45bb
|
/Controller.cpp
|
312c08379ebec536d4887a8b91341afcad4e5ca4
|
[] |
no_license
|
rodinhatokay/Cpp-simMedieval
|
af117c7fde01df6d54659ab05be8c589759ac379
|
4fa023340d55f37818146d5fd6cabe54594af75c
|
refs/heads/main
| 2023-06-04T13:21:15.420708
| 2021-06-29T01:40:08
| 2021-06-29T01:40:08
| 381,148,780
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,149
|
cpp
|
Controller.cpp
|
#include "Controller.h"
Controller* Controller::ptr2 = 0;
Controller& Controller::get_Instance() {
if (!ptr2)
ptr2 = new Controller();
return *ptr2;
}
void Controller::run()
{
string str;
vector<string> tokens;
int i = 0;
while (true)
{
std::getline(std::cin, str);
cout << "TIME " << to_string(Model::get_Instance().getTime()) << ": Enter command: " << str << endl;
if (str == "exit") {
exit(0);
}
tokens = FileOpener::split(str, " ");
i = get_choice(tokens); // gets choice
switch (i) {
case (1):
return;
break;
case (2)://default
Model::get_Instance().set_to_default();
View::get_Instance().set_to_default();
break;
case (3)://status
Model::get_Instance().print_status(); //this maybe should call view to print to the terminal whatever is being done here.
break;
case(4)://go - this should activate Model to update everything, we dont see changes unless we use status or show
Model::get_Instance().go();
break;
case(5)://show - this should get coordinates of all things, vehicles and warehouses and using the setting View was set on to, to display it in a file OR ON THE TERMINAL
Model::get_Instance().updateView();
View::get_Instance().show();
break;
case(6)://size
try{
if (tokens.size() != 2)
throw string("ERROR: too many argumets ");
View::get_Instance().size(tokens[1]);
}
catch (string e)
{
cout << e << endl;
}
break;
case(7)://zoom
try{
if (tokens.size() != 2)
throw string("ERROR: too many argumets ");
View::get_Instance().zoom(tokens[1]);
}
catch (string e)
{
cout << e << endl;
}
break;
case(8)://pan - lines 5 through 8 are for View
try{
if (tokens.size() != 3)
throw string("ERROR: too many argumets ");
tokens.erase(tokens.begin());
View::get_Instance().pan(tokens);
}
catch (string e)
{
cout << e << endl;
}
break;
case(9)://create - create some sort of vehicle
try{
create_agent(tokens);
}
catch (string e)
{
cout << "error in creating agent : " << e << endl;
}
break;
case(10)://course - set course for given agent - arguemnts are degrees, both for knight and thug
try {
check_correct_tokens_for_course(tokens);
Model::get_Instance().set_on_course(tokens);
}
catch (string e)
{
cout << "Error setting on course : " << e << endl;
}
break;
case(11)://postion - declare where to is the agent heading, must be of Coordinate type, if it's a thug then speed is required, if knight, then Coordinates only.
try{
Model::get_Instance().position(tokens);
}
catch (string e)
{
cout << "Error in setting position to a agent " << e << endl;
}
break;
case(12)://destination - decalre which warehouse to go to, argument is a castle/name
try {
Model::get_Instance().set_destination_for_knight(tokens);
}
catch (string e)
{
cout << "error setting destination : " << e << endl;
}
break;
case(13)://attack - thug attacks a peasant, argument is a peasant's name.
try {
Model::get_Instance().addAttacks(tokens);
}
catch (string e)
{
cout << "error attacking :" << e << endl;
}
break;
case(14)://stop - not sure if peasant can be stopped
try{
Model::get_Instance().stop_agent(tokens[1]);
}
catch (string e)
{
cout << e << endl;
}
case(15)://start_working - peasant gets a farm location and a castle
try {
Model::get_Instance().start_peasant_work(tokens);
}
catch (string e)
{
cout << e << endl;
}
break;
case(16)://Peasant status
try {
Model::get_Instance().peasant_status(tokens[0]);
}
catch (string e)
{
cout << e << endl;
}
break;
case(-1):
cout << "wrong input " << endl;
break;
default:
cout << "wrong input " << endl;
break;
}
}
}
bool Controller::check_correct_tokens_for_course(vector<string> tokens)
{
if (tokens.size() == 4) // its a thug
{
int deg = stoi(tokens[2]);
float spd = stof(tokens[3]);
if (deg < 0 || deg > 360)
throw string("degrees must be between 0 - 360");
if (spd > 30 || spd < 0)
throw string("speed for thug must be between 0-30 K/Mh");
return true;
}
else if (tokens.size() == 3)//its a knight/peasant
{
int deg = stoi(tokens[2]);
if (deg < 0 || deg > 360)
throw string("degrees must be between 0 - 360");
return true;
}
else {
throw string("too few arguments for course. example : -name- course -degree- -speed- (speed is only for thug)");
}
throw string("ERROR: unclear input at Controller:156");
}
void Controller::create_agent(vector<string> tokens)
{
for (int i = 0; i < tokens.size(); i++) {
if (tokens[i].find("(") != string::npos)
tokens[i].erase(tokens[i].find("("), 1);
if (tokens[i].find(")") != string::npos)
tokens[i].erase(tokens[i].find(")"), 1);
if (tokens[i].find(",") != string::npos)
tokens[i].replace(tokens[i].find(","),1, "");
}
if (tokens.size() != 4 && tokens.size() != 5)
throw string("Invalid arguments in creating agent");
if (Model::get_Instance().agent_exist(tokens[1]))
throw string("name agent already exist in data base");
tokens.erase(tokens.begin());// erase token[0] = "create"
if (tokens.size() == 4)
{
if (tokens[1] == "Thug")
{
if (Model::get_Instance().is_castle_exist(Coordinate(atof(tokens[2].c_str()), atof(tokens[3].c_str()))))
throw string("Error creating agent/Thug at Castle or Farm, Thugs not allowed");
Model::get_Instance().create_agent(AgentFactory::THUG,tokens);
}
else if (tokens[1] == "Peasant") {
Model::get_Instance().create_agent(AgentFactory::PEASANT, tokens);
}
else {
throw string("Ivalid arguments in creating agent. example : create -name- -type- -coordinate-/-Castle-");
}
}
else if (tokens.size() == 3) {
if (!Model::get_Instance().is_castle_exist(tokens[2]))
throw string("Error creating agent at Castle, Castle doesn't exist");
if (tokens[1] == "Knight")
{
Model::get_Instance().create_agent(AgentFactory::KNIGHT, tokens);
}
else {
throw string("Ivalid arguments in creating agent. example : create -name- -type- -coordinate-/-Castle-");
}
}
else
throw string("Ivalid arguments in creating agent. example : create -name- -type- -coordinate-/-Castle-");
}
int Controller::get_choice(vector<string> tokens)
{
if (tokens.size() == 0)
return -1;
else if (tokens[0] == "default")
return 2;
else if (tokens[0] == "status")
return 3;
else if (tokens[0] == "go")
return 4;
else if (tokens[0] == "show")
return 5;
else if (tokens[0] == "size")
return 6;
else if (tokens[0] == "zoom")
return 7;
else if (tokens[0] == "pan")
return 8;
else if (tokens[0] == "create")
return 9;
else if (tokens.size() == 1)
return -1;
else if (tokens[1] == "course")
return 10;
else if (tokens[1] == "position")
return 11;
else if (tokens[1] == "destination")
return 12;
else if (tokens[1] == "attack")
return 13;
else if (tokens[1] == "stop")
return 14;
else if (tokens[1] == "start_working")
return 15;
else if (tokens[1] == "status")
return 16;
return -1;
}
|
0f26c10df15d5f9cf66172b262eacd71b3945145
|
6463c91f8c692465d23b2dfe2120097e3d1cf27f
|
/Main.cpp
|
e33450721d19ca6276182d83f8f70236c05197ba
|
[] |
no_license
|
JagjotJhajj/BattleGame
|
cc2c564bf047ddcbbb19fc0b4a99e240bf4b9229
|
c98d88e8c8cbe32647ae66b3918d058bb51d55e5
|
refs/heads/master
| 2016-08-12T20:39:18.109288
| 2016-02-20T02:22:16
| 2016-02-20T02:22:16
| 51,728,533
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,095
|
cpp
|
Main.cpp
|
/**
* This is a text-only battle game loosely based off the battle system in Pokemon
* (one of my favorite games). It is a project I am using to help learn OOP in C++
* and have fun doing so! I have now STOPPED DEVELOPMENT since reading break is almost
* over and I need to spend the weekend doing schoolwork and Snowbots stuff.
*
*
* Wishlist (stuff I wish I could have added but ran out of time, might add them someday):
* Create stat changing abillities
* Add a "help" command to give the user information
* Make wait a command that is included in the abilities menu
* More enemy types
* More abilities
* Balance (make battles more competitive)
*
*
*/
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <cstdlib>
using namespace std;
#include "Character.h"
#include "Ability.h"
#include "Fish.h"
#include "Dragon.h"
#include "Protagonist.h"
bool isValidAction(string action);
void doUserCommand(string action, Protagonist *actionTaker,
Character *receiver);
void setUpTypeMatchups();
double getMultiplier(int attacker, int defender);
//An enum containing all the Type. The last element is the number of Type in the enum,
//used for the type match-up array
enum Type {
NORMAL, FIRE, WATER, GRASS, NUM_OF_TYPES
};
//The array of type matchups. The value in a cell (x,y) is the multiplier when type
//x attacks type y. For example, fire deals double damage to grass but only half damage
//to water, so typeMatchups[FIRE][GRASS] = 2.0 and typeMatchups[FIRE][WATER] = 0.5
static double typeMatchups[NUM_OF_TYPES][NUM_OF_TYPES];
int main() {
//Make sure the type matchups array is set up
setUpTypeMatchups();
bool newGame = true;
while (newGame) {
//Create the character that the user uses
string userName;
cout << "What would you like to name your character?\n";
cin >> userName;
Protagonist User(userName);
string enemyInput;
Character Enemy;
do {
cout << "Choose your enemy:\n-Fish\n-Dragon\n";
cin >> enemyInput;
} while (!compareTwoStringsIgnoreCase(enemyInput, "fish")
&& !compareTwoStringsIgnoreCase(enemyInput, "dragon"));
if (compareTwoStringsIgnoreCase(enemyInput, "fish")) {
Enemy = Fish(10);
cout << "You face a fish!\n";
} else {
Enemy = Dragon(20);
cout << "You face a mighty dragon!\n";
}
//Keep the game going until one character dies
while (!User.getIsDead() && !Enemy.getIsDead()) {
string action;
//First, the user takes an action
do {
cout << "Please choose to attack or wait\n";
cin >> action;
} while (!isValidAction(action));
doUserCommand(action, &User, &Enemy);
if (User.getIsDead() || Enemy.getIsDead()) {
break;
}
cout << "\n";
//Enemy's turn to take an action
Enemy.doAction(&User);
}
//Check if the user has died (loss) or not (win)
//Note: in the case where both characters die (not possible currently),
//it will be a loss
if (User.getIsDead()) {
cout << User.getName() << " died! " << User.getName() << " lost!\n";
}
else {
cout << Enemy.getName() << " died! " << User.getName() << " won!\n";
}
string inputGameStatus;
do {
cout << "Play again? (y or n)\n";
cin >> inputGameStatus;
} while (!compareTwoStringsIgnoreCase(inputGameStatus,"y") && !compareTwoStringsIgnoreCase(inputGameStatus,"n"));
if (compareTwoStringsIgnoreCase(inputGameStatus,"n")) {
newGame = false;
}
}
return 0;
}
/*
* Checks if an action is one of the valid actions
*
* Note: Change this function as more actions are added!
*
* Returns true if action is valid, false otherwise
*/
bool isValidAction(string action) {
if (compareTwoStringsIgnoreCase(action, "attack")
|| compareTwoStringsIgnoreCase(action, "wait")) {
return true;
}
return false;
}
/*
* Executes a given action for the user
* When this function finishes executing, the action given will have been finished
*
* @param action, the action being executed
* actionTaker, the Character doing the action
* receiver, the Character on the receiving end of the action
*/
void doUserCommand(string action, Protagonist *user, Character *target) {
if (compareTwoStringsIgnoreCase(action, "attack")) {
user->doAction(target);
} else if (compareTwoStringsIgnoreCase(action, "wait")) {
user->rest();
}
}
void setUpTypeMatchups() {
//First make each match-up a 1
for (int row = 0; row < NUM_OF_TYPES; row++) {
for (int col = 0; col < NUM_OF_TYPES; col++) {
typeMatchups[row][col] = 1.0;
}
}
//Normal is not weak or strong against any type
//Fire is strong against grass
typeMatchups[FIRE][GRASS] = 2.0;
//Fire is weak against water and fire
typeMatchups[FIRE][WATER] = 0.5;
typeMatchups[FIRE][FIRE] = 0.5;
//Water is strong against fire
typeMatchups[WATER][FIRE] = 2.0;
//Water is weak against grass and water
typeMatchups[WATER][GRASS] = 0.5;
typeMatchups[WATER][WATER] = 0.5;
//Grass is strong against water
typeMatchups[GRASS][WATER] = 2.0;
//Grass is weak against fire and grass
typeMatchups[GRASS][FIRE] = 0.5;
typeMatchups[GRASS][GRASS] = 0.5;
}
/*
* Get the multiplier bonus that the attacker typing has against the defender typing
*/
double getMultiplier(int attacker, int defender) {
return typeMatchups[attacker][defender];
}
/*
* Compares two strings. Returns true if the strings are equal, ignoring case,
* and false otherwise
*/
bool compareTwoStringsIgnoreCase(string s1, string s2) {
if (s1.length() != s2.length()) {
return false;
}
//Convert both strings to lowercase
for (unsigned int i = 0; i < s1.length(); i++) {
if (s1[i] >= 65 && s1[i] <= 90) {
s1[i] -= ('A' - 'a');
}
}
for (unsigned int i = 0; i < s2.length(); i++) {
if (s2[i] >= 65 && s2[i] <= 90) {
s2[i] -= ('A' - 'a');
}
}
return s1 == s2;
}
/*
* Check if a string is in a set, ignoring case
*/
bool isStringInSetIgnoreCase(string word, set<string> wordSet) {
set<string>::iterator it;
for (it = wordSet.begin(); it != wordSet.end(); it++) {
if (compareTwoStringsIgnoreCase(*it, word)) {
return true;
}
}
return false;
}
|
c8799e9d22085158b47e11d1c648c7c701408d8b
|
9bd9ef038a28486a1ef26b6cd3b60b02b39edb41
|
/unit_test/xor_test.cpp
|
b9c334f79a61e23816a72824fa27376ad9156717
|
[] |
no_license
|
zakheav/automatic-differentiation-framework
|
73fea0e1689366e848061f709203edfb89ea322e
|
28141556ee9e9bfa503bc04cf2709d1bc64705ff
|
refs/heads/master
| 2022-04-10T23:35:36.090455
| 2020-03-01T12:05:59
| 2020-03-01T12:05:59
| 114,228,859
| 105
| 14
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,738
|
cpp
|
xor_test.cpp
|
#include "../include/op_node/Input.h"
#include "../include/op_node/SquareSum.h"
#include "../include/op_node/Minus.h"
#include "../include/op_node/Mult.h"
#include "../include/op_node/Bias.h"
#include "../include/op_node/Parameter.h"
#include "../include/VirtualGraph.h"
#include "../include/ComputeGraph.h"
#include "../include/VirtualNode.h"
#include "../include/Optimizer.h"
#include "../include/optimizer/Adadelta.h"
#include <iostream>
using namespace std;
int main () {
// 准备数据集
vector<Tensor*> data_x_list;
vector<int> shape_x; shape_x.push_back (1); shape_x.push_back (2);
float data_x1[] = {0,0};
float data_x2[] = {0,1};
float data_x3[] = {1,0};
float data_x4[] = {1,1};
data_x_list.push_back (new Tensor (shape_x, data_x1));
data_x_list.push_back (new Tensor (shape_x, data_x2));
data_x_list.push_back (new Tensor (shape_x, data_x3));
data_x_list.push_back (new Tensor (shape_x, data_x4));
vector<Tensor*> data_y_list;
vector<int> shape_y; shape_y.push_back (1); shape_y.push_back (1);
float data_y1[] = {0};
float data_y2[] = {1};
float data_y3[] = {1};
float data_y4[] = {0};
data_y_list.push_back (new Tensor (shape_y, data_y1));
data_y_list.push_back (new Tensor (shape_y, data_y2));
data_y_list.push_back (new Tensor (shape_y, data_y3));
data_y_list.push_back (new Tensor (shape_y, data_y4));
vector<int> shape_w1; shape_w1.push_back (2); shape_w1.push_back (2);
Tensor* w1 = new Tensor (shape_w1);
w1 -> init ();
vector<int> shape_w2; shape_w2.push_back (2); shape_w2.push_back (1);
Tensor* w2 = new Tensor (shape_w2);
w2 -> init ();
vector<int> shape_b1; shape_b1.push_back (1); shape_b1.push_back (2);
Tensor* b1 = new Tensor (shape_b1);
b1 -> init ();
vector<int> shape_b2; shape_b2.push_back (1); shape_b2.push_back (1);
Tensor* b2 = new Tensor (shape_b2);
b2 -> init ();
// 准备虚拟节点
VirtualNode* input_x = new VirtualNode ("Input", "1");
input_x -> m_input_data = data_x_list;
VirtualNode* input_y = new VirtualNode ("Input", "2");
input_y -> m_input_data = data_y_list;
VirtualNode* w_1 = new VirtualNode ("Parameter", "1");
w_1 -> m_data = w1;
VirtualNode* w_2 = new VirtualNode ("Parameter", "2");
w_2 -> m_data = w2;
VirtualNode* b_1 = new VirtualNode ("Parameter", "3");
b_1 -> m_data = b1;
VirtualNode* b_2 = new VirtualNode ("Parameter", "4");
b_2 -> m_data = b2;
VirtualNode* mult1 = new VirtualNode ("Mult", "1");
VirtualNode* mult2 = new VirtualNode ("Mult", "2");
VirtualNode* sig1 = new VirtualNode ("Sigmoid", "1");
VirtualNode* sig2 = new VirtualNode ("Sigmoid", "2");
VirtualNode* minus = new VirtualNode ("Minus", "1");
VirtualNode* ss = new VirtualNode ("SquareSum", "1");
VirtualNode* bias1 = new VirtualNode ("Bias", "1");
VirtualNode* bias2 = new VirtualNode ("Bias", "2");
// 构建虚拟图
VirtualGraph* vg = new VirtualGraph ();
vg -> add_node ("", input_x);
vg -> add_node ("", w_1);
vg -> add_node (input_x -> get_name (), mult1);
vg -> add_node (w_1 -> get_name (), mult1);
vg -> add_node ("", b_1);
vg -> add_node (mult1 -> get_name (), bias1);
vg -> add_node (b_1 -> get_name (), bias1);
vg -> add_node (bias1 -> get_name (), sig1);
vg -> add_node ("", w_2);
vg -> add_node (sig1 -> get_name (), mult2);
vg -> add_node (w_2 -> get_name (), mult2);
vg -> add_node ("", b_2);
vg -> add_node (mult2 -> get_name (), bias2);
vg -> add_node (b_2 -> get_name (), bias2);
vg -> add_node (bias2 -> get_name (), sig2);
vg -> add_node ("", input_y);
vg -> add_node (sig2 -> get_name (), minus);
vg -> add_node (input_y -> get_name (), minus);
vg -> add_node (minus -> get_name (), ss);
// 生成计算图
ComputeGraph* train_cg = new ComputeGraph ();
vg -> build_compute_graph (train_cg);
// 初始化优化器,Adadelta
Optimizer* optimizer = new Adadelta (1.0);
train_cg -> m_optimizer = optimizer;
// 训练
for (int i = 0; i < 1000; ++i) {
if (i < 900 == 0) {
cout << "input: ";
int ptr = ((Input*) (train_cg -> get_node ("Input:1:0:"))) -> m_data_ptr;
((Input*) (train_cg -> get_node ("Input:1:0:"))) -> m_data[ptr] -> display ();
}
vector<Node*> error;
train_cg -> forward_propagation (error);
train_cg -> back_propagation ();
if (i < 900 == 0) {
cout << "xor: ";
((OperatorNode*) (sig2 -> m_op_node_map["Sigmoid:2:0:"])) -> m_output -> display (); cout << endl;
}
}
delete train_cg;
delete vg;
}
|
82f8fe301d004818849d946599d735d8cf2aae14
|
750771126eec224e5455c34d1c9858695cba4bc3
|
/src/forcefeedback/forcefeedback.cpp
|
7d08d39d34256b233272891b6121def5a0f6fe9b
|
[] |
no_license
|
Intpict/ForceFeedback
|
26a1b5a4d45f3624019f4c566c57fddd6caa7c79
|
42c3cfa4d89715cf8bcf523d165d7de51083060d
|
refs/heads/master
| 2021-01-19T08:25:30.169291
| 2015-12-24T07:55:13
| 2015-12-24T07:55:13
| 48,526,839
| 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 12,827
|
cpp
|
forcefeedback.cpp
|
/************************************************
编译前:右击"属性" -> 更改"字符集"为"使用多字节字符集"
************************************************/
#define __FORCEFEEDBACK
#ifndef __FORCEFEEDBACK_H
#include "forcefeedback.h"
#endif
#include <string.h>
#include <math.h>
//APIENTRY声明DLL函数入口点
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call){
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
DWORD WINAPI CycUpdate(LPVOID lpParameter){
ForceFeedBack* ptr = (ForceFeedBack*) lpParameter;
while(ptr->is_update)
ptr->DataFresh();
return 0;
}
ForceFeedBack::ForceFeedBack(){
m_comID = NULL;
m_EBaud = CSerial::EBaud115200;
firstflag = true;
is_update = false;
is_thread_running = false;
UpdateThread = NULL;
Mutex = CreateMutex(NULL, false, "ForceFeedback Lock");
memset(USART_Buffer,0,BUFFERSIZE);
Motor_Data[0] = 0xAA;
Motor_Data[1] = 0xBB;
Motor_Data[2] = 0xAA;
Motor_Data[3] = 0xBB;
for(int i=4;i<22;i++)
Motor_Data[i] = 0x00;
for(int i=0;i<9;i++){
Encoder_Data[i] = 32767;
Angle[i] = 0.0;
}
}
ForceFeedBack::~ForceFeedBack(){
CloseForcebacker();
if(NULL != m_comID){
delete[] m_comID;
m_comID = NULL;
}
}
bool ForceFeedBack::OpenForcebacker(char* comID){
if(NULL == comID || m_EBaud == CSerial::EBaudUnknown)
return false;
int len = strlen(comID);
m_comID = new char[len+1];
for (int i=0;i<=len;i++)
m_comID[i] = comID[i];
if (m_serial.CheckPort(m_comID) != CSerial::EPortAvailable)
return false;
if(m_serial.Open(m_comID) != ERROR_SUCCESS)
return false;
m_serial.Setup(m_EBaud, CSerial::EData8, CSerial::EParNone, CSerial::EStop1);
m_serial.SetupReadTimeouts(CSerial::EReadTimeoutNonblocking);
Sleep(20);
if(ERROR_SUCCESS != m_serial.Read(USART_Buffer, BUFFERSIZE, &mRead)){
m_serial.Clear(m_serial.hFile_m);
m_serial.Close();
return false;
}
for (int i=0;i<(long)mRead-22;i++)
{
if(USART_Buffer[i]==0xAA && USART_Buffer[i+1]==0xBB
&& USART_Buffer[i+2] == 0xAA && USART_Buffer[i+3]==0xBB)
return true;
}
//check失败,关闭串口,返回false
m_serial.Clear(m_serial.hFile_m);
m_serial.Close();
return false;
}
void ForceFeedBack::ClosePort(){
if(m_serial.IsOpen()){
m_serial.Clear(m_serial.hFile_m);
m_serial.Close();
}
}
void ForceFeedBack::CloseForcebacker(){
StopCycUpdate();
Sleep(50);
ClearForce();
Sleep(10);
ClosePort();
}
bool ForceFeedBack::SetEbaud(int EBaud){
switch(EBaud){
case 110:
m_EBaud = CSerial::EBaud110;
return true;
case 300:
m_EBaud = CSerial::EBaud300;
return true;
case 600:
m_EBaud = CSerial::EBaud600;
return true;
case 1200:
m_EBaud = CSerial::EBaud1200;
return true;
case 2400:
m_EBaud = CSerial::EBaud2400;
return true;
case 4800:
m_EBaud = CSerial::EBaud4800;
return true;
case 9600:
m_EBaud = CSerial::EBaud9600;
return true;
case 14400:
m_EBaud = CSerial::EBaud14400;
return true;
case 19200:
m_EBaud = CSerial::EBaud19200;
return true;
case 38400:
m_EBaud = CSerial::EBaud38400;
return true;
case 56000:
m_EBaud = CSerial::EBaud56000;
return true;
case 57600:
m_EBaud = CSerial::EBaud57600;
return true;
case 115200:
m_EBaud = CSerial::EBaud115200;
return true;
case 128000:
m_EBaud = CSerial::EBaud128000;
return true;
case 256000:
m_EBaud = CSerial::EBaud256000;
return true;
}
m_EBaud = CSerial::EBaudUnknown;
return false;
}
bool ForceFeedBack::SetCurOrig(){
DWORD pdwWritten;
unsigned char resetfram[22] = {0xAA,0xBB,0xAA,0xBB,0x00,0xCC,0x00,0xDD,0x00,0xCC,0x00,0xDD,0x00,0xCC,0x00,0xDD,0x00,0xCC,0x00,0xDD,0x00,0xCC};
if(ERROR_SUCCESS != m_serial.Write(resetfram,22,&pdwWritten)){
Sleep(20);
if(ERROR_SUCCESS != m_serial.Write(resetfram,22,&pdwWritten))
return false;
}
Sleep(20);
bool thread_running_flag = is_thread_running;
StopCycUpdate();
Sleep(50);
ClosePort();
if(!OpenForcebacker(m_comID))
return false;
if(thread_running_flag)
StartCycUpdate();
firstflag = true;
return true;
}
void ForceFeedBack::DataFresh(){
//清空旧缓冲区,保证每次读的都是最新数据
m_serial.Clear(m_serial.hFile_m);
//等待,保证新数据进读缓冲区
Sleep(15);
memset(USART_Buffer,0,BUFFERSIZE);
m_serial.Read(USART_Buffer,BUFFERSIZE,&mRead);
float Angle_Temp[9];
for(int i=0;i<(long)mRead-22;i++){
if(USART_Buffer[i]==0xAA && USART_Buffer[i+1]==0xBB && USART_Buffer[i+2]==0xAA && USART_Buffer[i+3]==0xBB){
unsigned char sum = 0x00;
for (int n=0;n<18;n++)
sum += USART_Buffer[i+4+n];
//如果数据无效, 进行下一轮循环
if(sum != USART_Buffer[i+22]){
i+=23;
continue;
}
Encoder_Data[0] = USART_Buffer[i+4]*256 + USART_Buffer[i+5];
Encoder_Data[1] = USART_Buffer[i+6]*256 + USART_Buffer[i+7];
Encoder_Data[2] = USART_Buffer[i+8]*256 + USART_Buffer[i+9];
Encoder_Data[3] = USART_Buffer[i+10]*256 + USART_Buffer[i+11];
Encoder_Data[4] = USART_Buffer[i+12]*256 + USART_Buffer[i+13];
Encoder_Data[5] = USART_Buffer[i+14]*256 + USART_Buffer[i+15];
Encoder_Data[6] = USART_Buffer[i+16]*256 + USART_Buffer[i+17];
Encoder_Data[7] = USART_Buffer[i+18]*256 + USART_Buffer[i+19];
Encoder_Data[8] = USART_Buffer[i+20]*256 + USART_Buffer[i+21];
Angle_Temp[0] = (Encoder_Data[0] - 32767)/(REDUCTION_66*CODE_500/2)*180.00;
Angle_Temp[1] = (32767 - Encoder_Data[1])/(REDUCTION_66*CODE_500/2)*180.00;
Angle_Temp[2] = (Encoder_Data[2] - 32767)/(REDUCTION_51*CODE_500/2)*180.00;
Angle_Temp[3] = (Encoder_Data[3] - 32767)/(REDUCTION_19*CODE_128/2)*180.00;
Angle_Temp[4] = (Encoder_Data[4] - 32767)/(REDUCTION_19*CODE_128/2)*180.00;
Angle_Temp[5] = (Encoder_Data[5] - 32767)/(REDUCTION_19*CODE_128/2)*180.00;
Angle_Temp[6] = (Encoder_Data[6] - 32767)/(REDUCTION_24*CODE_256/2)*180.00;
Angle_Temp[7] = (Encoder_Data[7] - 32767)/(REDUCTION_24*CODE_256/2)*180.00;
Angle_Temp[8] = (Encoder_Data[8] - 32767)/(REDUCTION_24*CODE_256/2)*180.00;
WaitForSingleObject(Mutex, INFINITE);
if(firstflag){
for(int k=0;k<9;k++)
Angle[k] = Angle_Temp[k];
firstflag = false;
}
else{
for (int k=0;k<9;k++){
for (int k=0;k<9;k++){
if (((Angle_Temp[k] - Angle[k])<15.000) && ((Angle[k] - Angle_Temp[k]) <15.000) || (Angle_Temp[k] == 0)){
Angle[k] = Angle_Temp[k];
}
}
}
}
ReleaseMutex(Mutex);
break;
}
}
}
void ForceFeedBack::SingleUpdate(){
if(is_update)
return;
DataFresh();
}
void ForceFeedBack::StartCycUpdate(){
if(is_update)
return;
//当前的线程句柄未被关闭, 则将其关闭
if(NULL != UpdateThread){
Sleep(5);
if(NULL != UpdateThread)
CloseHandle(UpdateThread);
}
is_update = true;
UpdateThread = CreateThread(NULL, 0, CycUpdate, this, 0, NULL);
is_thread_running = true;
}
void ForceFeedBack::StopCycUpdate(){
is_update = false;
if(NULL != UpdateThread){
CloseHandle(UpdateThread);
UpdateThread = NULL;
}
is_thread_running = false;
}
PosInfo ForceFeedBack::Read(){
PosInfo res;
WaitForSingleObject(Mutex, INFINITE);
if(firstflag){
res.p_x = res.p_y = res.p_z = 0;
}else{
res.p_x = L1*cos(Angle[1]/180*PI)*cos(PI/2-Angle[0]/180*PI)/sqrt(cos(Angle[1]/180*PI)*cos(Angle[1]/180*PI)+sin(Angle[1]/180*PI)*sin(PI/2-Angle[0]/180*PI)*sin(Angle[1]/180*PI)*sin(PI/2-Angle[0]/180*PI));
res.p_y = L1*sin(Angle[1]/180*PI)*sin(PI/2-Angle[0]/180*PI)/sqrt(cos(Angle[1]/180*PI)*cos(Angle[1]/180*PI)+sin(Angle[1]/180*PI)*sin(PI/2-Angle[0]/180*PI)*sin(Angle[1]/180*PI)*sin(PI/2-Angle[0]/180*PI));
res.p_z = L1*cos(Angle[1]/180*PI)*sin(PI/2-Angle[0]/180*PI)/sqrt(cos(Angle[1]/180*PI)*cos(Angle[1]/180*PI)+sin(Angle[1]/180*PI)*sin(PI/2-Angle[0]/180*PI)*sin(Angle[1]/180*PI)*sin(PI/2-Angle[0]/180*PI))+2*L2*cos(85.00/180.00*PI-Angle[2]/180.00*PI)-
(L1*cos(0/180*PI)*sin(PI/2-0 /180*PI)/sqrt(cos(0/180*PI)*cos(0/180*PI)+sin(0/180*PI)*sin(PI/2-0/180*PI)*sin(0/180*PI)*sin(PI/2-0/180*PI))+2*L2*cos(85.00/180.00*PI-0/180.00*PI));
}
res.r_x = Angle[4];
res.r_y = Angle[5];
res.r_z = Angle[3];
ReleaseMutex(Mutex);
return res;
}
RawData ForceFeedBack::ReadRaw(){
RawData res;
WaitForSingleObject(Mutex, INFINITE);
for(int i=0;i<9;i++)
res.m_angle[i] = Angle[i];
ReleaseMutex(Mutex);
return res;
}
bool ForceFeedBack::SetForceFinger(const FingerForce& force, const int mask){
if(mask_finger1 & mask){
if(force.finger_force[0] == 0){
Motor_Data[16] = Motor_Data[17] = 0x00;
}else{
float temp = (force.finger_force[0] * arm_finger1 / measure_arm_finger + 0.2135 ) / 0.0227;
Motor_Data[16] = (temp>0)? 0x01: 0x02;
Motor_Data[17] = (unsigned char)abs(temp);
}
}
if(mask_finger2 & mask){
if(force.finger_force[1] == 0){
Motor_Data[18] = Motor_Data[19] = 0x00;
}else{
float temp = (force.finger_force[1] * arm_finger2 / measure_arm_finger + 0.2135 ) / 0.0227;
Motor_Data[18] = (temp>0)? 0x01: 0x02;
Motor_Data[19] = (unsigned char)abs(temp);
}
}
if(mask_finger3 & mask){
if(force.finger_force[2] == 0){
Motor_Data[20] = Motor_Data[21] = 0x00;
}else{
float temp = (force.finger_force[2] * arm_finger3 / measure_arm_finger + 0.2135 ) / 0.0227;
Motor_Data[20] = (temp>0)? 0x01: 0x02;
Motor_Data[21] = (unsigned char)abs(temp);
}
}
if(ERROR_SUCCESS != m_serial.Write(Motor_Data, 22, &mWrite))
return false;
return true;
}
bool ForceFeedBack::SetForceWrist(const ForcePara& para){
PosInfo position = Read();
if(para.f_x == 0){
Motor_Data[4] = Motor_Data[5] = 0x00;
}else{
float tempx = ((para.f_x * (position.p_z + 530.0) / measure_arm_force_x + 2.4401) / 0.5355) * 5.0;
Motor_Data[4] = (tempx>0)? 0x01: 0x02;
Motor_Data[5] = (unsigned char)((abs(tempx)<115)?abs(tempx):115);
}
if(para.f_y == 0){
Motor_Data[6] = Motor_Data[7] = 0x00;
}else{
float tempy = ((para.f_y * (position.p_z + 530.0) / measure_arm_force_y + 2.8531) / 0.5771) * 5.0;
Motor_Data[6] = (tempy>0)? 0x01: 0x02;
Motor_Data[7] = (unsigned char)((abs(tempy)<115)?abs(tempy):115);
}
if(para.f_z == 0){
Motor_Data[8] = Motor_Data[9] = 0x00;
}else{
float tempz;
if(position.p_z<150){
tempz = (para.f_z + 0.3459) / 0.2139 * 5.0;
}else if(position.p_z<250){
tempz = (para.f_z + 0.4166) / 0.2325 * 5.0;
}else if(position.p_z<350){
tempz = (para.f_z + 0.4375) / 0.2595 * 5.0;
}else if(position.p_z<450){
tempz = (para.f_z + 1.0310) / 0.3587 * 5.0;
}else if(position.p_z<550){
tempz = (para.f_z + 2.5128) / 0.6880 * 5.0;
}else
tempz = (para.f_z + 2.5128) / 0.6880 * 5.0;
Motor_Data[8] = (tempz>0)? 0x01: 0x02;
Motor_Data[9] = (unsigned char)((abs(tempz)<200)?abs(tempz):200);
}
if(ERROR_SUCCESS != m_serial.Write(Motor_Data, 22, &mWrite))
return false;
return true;
}
bool ForceFeedBack::SetTorqueFinger(const FingerTorque& torque, const int mask){
if(mask_finger1 & mask){
if(torque.finger_torque[0] == 0){
Motor_Data[16] = Motor_Data[17] = 0x00;
}else{
float temp = (torque.finger_torque[0] / measure_arm_finger + 0.2135 ) / 0.0227;
Motor_Data[16] = (temp>0)? 0x01: 0x02;
Motor_Data[17] = (unsigned char)abs(temp);
}
}
if(mask_finger2 & mask){
if(torque.finger_torque[1] == 0){
Motor_Data[18] = Motor_Data[19] = 0x00;
}else{
float temp = (torque.finger_torque[1] / measure_arm_finger + 0.2135 ) / 0.0227;
Motor_Data[18] = (temp>0)? 0x01: 0x02;
Motor_Data[19] = (unsigned char)abs(temp);
}
}
if(mask_finger3 & mask){
if(torque.finger_torque[2] == 0){
Motor_Data[20] = Motor_Data[21] = 0x00;
}else{
float temp = (torque.finger_torque[2] / measure_arm_finger + 0.2135 ) / 0.0227;
Motor_Data[20] = (temp>0)? 0x01: 0x02;
Motor_Data[21] = (unsigned char)abs(temp);
}
}
if(ERROR_SUCCESS != m_serial.Write(Motor_Data, 22, &mWrite))
return false;
return true;
}
bool ForceFeedBack::SetTorqueWrist(const TorquePara& para){
if(para.t_x == 0){
Motor_Data[10] = Motor_Data[11] = 0x00;
}else{
float tempx = ((para.t_x + 0.3503) / 0.0602) * 2.0;
Motor_Data[10] = (tempx>0)? 0x01: 0x02;
Motor_Data[11] = (unsigned char)abs(tempx);
}
if(para.t_y == 0){
Motor_Data[12] = Motor_Data[13] = 0x00;
}else{
float tempy = ((para.t_y + 0.3503) / 0.0602) * 2.0;
Motor_Data[12] = (tempy>0)? 0x01: 0x02;
Motor_Data[13] = (unsigned char)abs(tempy);
}
if(para.t_z == 0){
Motor_Data[14] = Motor_Data[15] = 0x00;
}else{
float tempz = ((para.t_z + 0.3503) / 0.0602) * 2.0;
Motor_Data[14] = (tempz>0)? 0x01: 0x02;
Motor_Data[15] = (unsigned char)abs(tempz);
}
if(ERROR_SUCCESS != m_serial.Write(Motor_Data, 22, &mWrite))
return false;
return true;
}
bool ForceFeedBack::ClearForce(){
for(int i=4;i<22;i++)
Motor_Data[i] = 0x00;
if(ERROR_SUCCESS != m_serial.Write(Motor_Data, 22, &mWrite))
return false;
return true;
}
|
dd64ff7d8a589c4b106e490e28ce2404a3b4735a
|
2107fe6b0016a014cdc173f26ee2209f549707f4
|
/RLGM_test/ColorCorrection8bit.h
|
c90c7a44e08be512fe1021378f9a4459c3c14f35
|
[] |
no_license
|
alexeyaseev/RLGM
|
b9e422562ce65fa765224c971e363430d6fae2a8
|
7e7063c62144a6243478bac9c9adecd44d90c585
|
refs/heads/master
| 2021-01-16T17:55:55.648072
| 2017-08-25T12:17:47
| 2017-08-25T12:17:47
| 100,025,966
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,158
|
h
|
ColorCorrection8bit.h
|
#pragma once
#include <cmath>
#include <cstdint>
class ColorCorrection8bit
{
private:
static const int MAX_VALUE = 255;
double m_lowThr = 0.0;
double m_highThr = 1.0;
double m_gamma = 0.5;
double m_hue = 0.0;
double m_saturation = 0.0;
double m_minLuma = 0;
double m_maxGamma = 1;
double m_minGamma = 1;
double m_alphaThr = 0;
void Update();
double LumaCorrection(double value);
double LumaGammaCorrection(double value);
void ClampTo01(double& value);
public:
uint32_t colorsRGBA[ColorCorrection8bit::MAX_VALUE + 1];
double GetLowThr();
void SetLowThr(double value);
double GetHighThr();
void SetHighThr(double value);
double GetGamma();
double GetGammaPower();
void SetGamma(double value);
double GetHue();
void SetHue(double value);
double GetSaturation();
void SetSaturation(double value);
double GetAlphaThr();
void SetAlphaThr(double value);
static uint32_t HSVtoRGBA(double hue, double sat, double luma, double alpha);
ColorCorrection8bit(double low_thr, double high_thr, double gamma, double hue, double saturation, double min_luma, double max_gamma, double alpha_thr);
~ColorCorrection8bit();
};
|
62f8a9fb02d2648abd9fb37ef3c5fc6b2f906f6f
|
b6d381f96b3f352da426fb37d7c820d9cb752794
|
/Vector4.cpp
|
6ac6b2057af575eeef03e964082e0e6472ed7d4e
|
[] |
no_license
|
CS3258-S2021/josephsgraphiccode
|
a21854e1c7a2ee90d961625cb4d9a16e868c1808
|
a15e65f6db5cb3fe27b103802c9dc8ec773cae52
|
refs/heads/main
| 2023-07-09T20:36:33.270626
| 2021-08-06T16:18:25
| 2021-08-06T16:18:25
| 338,215,272
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,026
|
cpp
|
Vector4.cpp
|
#include "Vector4.h"
#include <algorithm>
Vector4::Vector4(): vec{0, 0, 0, 0} {}
Vector4::Vector4(double a, double b, double c, double d): vec{a, b, c, d} {}
Vector4::Vector4(const Vector4& other): vec{other[0], other[1], other[2], other[3]} {}
Vector4& Vector4::operator=(const Vector4& other) {
if (this != &other) {
Vector4 temp(other);
std::swap(vec, temp.vec);
}
return *this;
}
double& Vector4::operator[](int index) {
return vec[index];
}
const double Vector4::operator[](int index) const {
return vec[index];
}
Vector4& Vector4::operator*=(double scalar) {
for (int i = 0; i < 4; i++) {
vec[i] *= scalar;
}
return *this;
}
Vector4& Vector4::operator+=(double scalar) {
for (int i = 0; i < 4; i++) {
vec[i] += scalar;
}
return *this;
}
std::string Vector4::toString() const {
std::string result = "[ ";
for (int i = 0; i < 4; i++) {
result += std::to_string(vec[i]) + ' ';
}
result += ']';
return result;
}
|
cd6232f4757849c09f9412805037a17968a93944
|
aad087dee8a647eaf88bb821eaca3c03ad7a36a2
|
/cryptimage.cpp
|
989db9f2a0d7a959404493a4e9b8c173bf4a8dfc
|
[] |
no_license
|
istahir/PRG_Praktikum_milestone1
|
4ef7b43d6f7dee825fb1dcf076c99bdce8a373d8
|
4924252af3da80101b500f3c4670db3d8d9e0f9a
|
refs/heads/master
| 2020-04-04T19:44:58.010713
| 2018-11-05T10:14:00
| 2018-11-05T10:14:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 215
|
cpp
|
cryptimage.cpp
|
#include "cryptimage.h"
#include "ui_cryptimage.h"
CryptImage::CryptImage(QWidget *parent) :
QWidget(parent),
ui(new Ui::CryptImage)
{
ui->setupUi(this);
}
CryptImage::~CryptImage()
{
delete ui;
}
|
c402d5c3c1594e2de49fb165dbbbe9d9972abf80
|
4cf7062529292ff0e06d67fd1a2b45c6b82573fb
|
/main.cpp
|
df1b39c3c8909e71dbc15068396965533db668b6
|
[
"MIT"
] |
permissive
|
hstefan/htlib
|
a4354b701d0d8e32a48b29df2cbf7b428130e3a8
|
a62783cf344f8c81158e7463696c4a9a8d914c5f
|
refs/heads/master
| 2020-04-05T19:32:29.071147
| 2010-10-19T00:39:05
| 2010-10-19T00:39:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 220
|
cpp
|
main.cpp
|
#include "hlist.h"
#include <iostream>
int main()
{
htl::list<int> b;
for(int i = 0; i < 20; i++) b.push_back(i);
for(htl::list<int>::iterator it = b.begin(); it != b.end(); it++)
{
std::cout << *it << ",";
}
}
|
5c89ca10433631b65663e2f63724fdffe3a28ecf
|
0e9db639ca3b8987d2c065bfe08a04ece3d19a00
|
/projeto2/nodo_operacaoBinaria.cpp
|
45f1e46b296058c602147771d9f3fee598e1ce9f
|
[] |
no_license
|
nathanfpp/INE5426
|
7a9149079abfc310f83c952261eb442b33918767
|
860a62818524ef404c3d80f168dbf530f1aad484
|
refs/heads/master
| 2020-05-21T10:09:03.684946
| 2016-12-04T23:22:14
| 2016-12-04T23:22:14
| 65,047,346
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 14,204
|
cpp
|
nodo_operacaoBinaria.cpp
|
#include "arvoreSintatica.h"
using namespace AST;
Tipo OperacaoBinaria::analisar(AST::TabelaDeSimbolos *tabelaDeSimbolos, int linha, bool analisador) {
// Os tipos dos filhos à esquerda e à direita da OperacaoBinaria
Tipo e, d;
e = esquerda->analisar(tabelaDeSimbolos, linha, analisador);
// Armazena-se os valores da esquerda que são destruidos no caso de funcao recursiva
bool esquerda_boolean = esquerda->boolean;
int esquerda_inteiro = esquerda->inteiro;
double esquerda_real = esquerda->real;
// Analisa-se o filho à direita da OperacaoBinaria
d = direita->analisar(tabelaDeSimbolos, linha, analisador);
tipoDoRetorno = e;
// Arranjos e Hashes, quando o operando é a variável em si e não seus itens, devem apresentar erro caso a atribuicao nao seja simples e seus tipos diferentes.
if(e == Tipo::arranjo_2_f ||e == Tipo::arranjo_2_i || e == Tipo::arranjo_2_b || e == Tipo::arranjo_f ||e == Tipo::arranjo_i || e == Tipo::arranjo_b || e == hash_bb || e == hash_bi || e == hash_bf || e == hash_ib || e == hash_ii || e == hash_if || e == hash_fb || e == hash_fi || e == hash_ff || d == Tipo::arranjo_2_f ||d == Tipo::arranjo_2_i || d == Tipo::arranjo_2_b || d == Tipo::arranjo_f ||d == Tipo::arranjo_i || d == Tipo::arranjo_b || d == hash_bb || d == hash_bi || d == hash_bf || d == hash_ib || d == hash_ii || d == hash_if || d == hash_fb || d == hash_fi || d == hash_ff ) {
Tipo tipoDeVariavel_e = ((Variavel*)esquerda)->obterTipoDaTabela(tabelaDeSimbolos);
// Caso esta OperacaoBinaria seja uma atribuição
if(operacao == Tipo::atribuicao) {
// Se o tipo da direita e o da esquerda forem diferentes, erro
if(e != d) {
imprimirErroDeOperacao(operacao, e, d, linha);
}
// Caso esteja-se interpretando E o tipo da esquerda for um arranjo/arranjoDuplo/hash
else if(analisador && (tipoDeVariavel_e == Tipo::arranjo || tipoDeVariavel_e == Tipo::arranjo_duplo || tipoDeVariavel_e == Tipo::hash)) {
// Recupera-se o filho da esquerda e o da direita da tabela de símbolos
esquerda = tabelaDeSimbolos->recuperar(esquerda->id, linha, true);
if(direita->tipo == Tipo::funcao_cha){
direita = ((Retorno*)((Chamada*)direita)->retornoEstruturaDados);
}
else {
direita = tabelaDeSimbolos->recuperar(direita->id, linha, true);
}
// Copia-se os valores do arranjo simples, e atualiza-se a variável na tabela
if(tipoDeVariavel_e == Tipo::arranjo){
memcpy(((Arranjo*)esquerda)->inteiro_a, ((Arranjo*)direita)->inteiro_a, ((Arranjo*)direita)->tamanho->inteiro*sizeof(int));
memcpy(((Arranjo*)esquerda)->boolean_a, ((Arranjo*)direita)->real_a, ((Arranjo*)direita)->tamanho->inteiro*sizeof(bool));
memcpy(((Arranjo*)esquerda)->real_a, ((Arranjo*)direita)->real_a, ((Arranjo*)direita)->tamanho->inteiro*sizeof(double));
tabelaDeSimbolos->modificar(esquerda, esquerda->id);
return e;
}
// Copia-se os valores do arranjo duplo, e atualiza-se a variável na tabela
if(tipoDeVariavel_e == Tipo::arranjo_duplo){
memcpy(((Arranjo*)esquerda)->inteiro_a, ((Arranjo*)direita)->inteiro_a, ((Arranjo*)direita)->tamanho->inteiro*((ArranjoDuplo*)direita)->tamanho2->inteiro*sizeof(int));
memcpy(((Arranjo*)esquerda)->boolean_a, ((Arranjo*)direita)->real_a, ((Arranjo*)direita)->tamanho->inteiro*((ArranjoDuplo*)direita)->tamanho2->inteiro*sizeof(bool));
memcpy(((Arranjo*)esquerda)->real_a, ((Arranjo*)direita)->real_a, ((Arranjo*)direita)->tamanho->inteiro*((ArranjoDuplo*)direita)->tamanho2->inteiro*sizeof(double));
tabelaDeSimbolos->modificar(esquerda, esquerda->id);
return e;
}
if(tipoDeVariavel_e == Tipo::hash){
if (((Hash*)direita)->int_int.size() > 0)
((Hash*)esquerda)->int_int = ((Hash*) direita)->int_int;
if (((Hash*)direita)->int_bool.size() > 0)
((Hash*)esquerda)->int_bool = ((Hash*) direita)->int_bool;
if (((Hash*)direita)->int_real.size() > 0)
((Hash*)esquerda)->int_real = ((Hash*) direita)->int_real;
if (((Hash*)direita)->bool_bool.size() > 0)
((Hash*)esquerda)->bool_bool = ((Hash*) direita)->bool_bool;
if (((Hash*)direita)->bool_int.size() > 0)
((Hash*)esquerda)->bool_int = ((Hash*) direita)->bool_int;
if (((Hash*)direita)->bool_real.size() > 0)
((Hash*)esquerda)->bool_real = ((Hash*) direita)->bool_real;
if (((Hash*)direita)->real_real.size() > 0)
((Hash*)esquerda)->real_real = ((Hash*) direita)->real_real;
if (((Hash*)direita)->real_int.size() > 0)
((Hash*)esquerda)->real_int = ((Hash*) direita)->real_int;
if (((Hash*)direita)->real_bool.size() > 0)
((Hash*)esquerda)->real_bool = ((Hash*) direita)->real_bool;
tabelaDeSimbolos->modificar(esquerda, esquerda->id);
return e;
}
}
}
// Caso contrário, tentou-se atribuirum arranjo ou hash à outro arranjo ou hash
else {
std::cerr << "[Line " << linha << "] semantic error: arrays or hashes can only be part of a simple attribution" <<"\n";
}
return Tipo::nulo;
}
// Se um dos tipos for nulo não tem porque seguir adiante
if (e == Tipo::nulo)
return e;
if (d == Tipo::nulo)
return d;
// Tenho que capturar os ponteiros dos filhos da direita e esquerda também
int e_ponteiros = esquerda->recuperarPonteiros(tabelaDeSimbolos, linha);
int d_ponteiros = direita->recuperarPonteiros(tabelaDeSimbolos, linha);
// Gambiarra para conservar os valores originais que são danificados pela recursão
esquerda->boolean = esquerda_boolean;
esquerda->inteiro = esquerda_inteiro;
esquerda->real = esquerda_real;
// Operações Binárias possuem comportamentos diferentes
switch(operacao) {
// A Atribuição recebe "int","float" ou "bool" e retorna "int", "float" ou "bool"
case Tipo::atribuicao:
// O nodo à esquerda não pode ser uma função
if(esquerda->tipo == Tipo::funcao_cha) {
std::cerr << "[Line " << linha << "] semantic error: attribution operation expects a variable on the left side not a function" <<"\n";
return Tipo::nulo;
}
// Os tipos são válidos?
if((e == Tipo::inteiro && (d != Tipo::inteiro && d != Tipo::endereco))
|| (e == Tipo::boolean && (d != Tipo::boolean && d != Tipo::endereco))
|| (e == Tipo::real && d == Tipo::boolean)) {
imprimirErroDeOperacao(operacao, e, d, linha);
}
// Caso não ocorra erro, realiza-se a operação e a coerção
else {
coercao(this, e, d, operacao, linha, analisador);
if(e == Tipo::real || d == Tipo::real) {
tipoDoRetorno = Tipo::real;
}
}
//
if(e_ponteiros > 0 && d_ponteiros == 0 && d!=Tipo::endereco) {
std::cerr << "[Line " << linha << "] semantic error: attribution operation expects "<<imprimirTipoPorExtenso(e)<<" pointer but received "<<imprimirTipoPorExtenso(d) <<"\n";
}
if(analisador) {
// Realiza-se a atribuicao de todos os valores, independente do tipo da variável
esquerda->inteiro = direita->inteiro; esquerda->real = direita->real; esquerda->boolean = direita->boolean;
inteiro = direita->inteiro; real = direita->real; boolean = direita->boolean;
switch (esquerda->tipo) {
case Tipo::arranjo: {
Arranjo *a = (Arranjo*) tabelaDeSimbolos->recuperar(esquerda->id, linha, true);
int i = ((Parametro*)((Chamada*)esquerda)->parametros)->parametro->inteiro;
switch(e){
case Tipo::inteiro:
a->inteiro_a[i] = direita->inteiro;
case Tipo::boolean:
a->boolean_a[i] = direita->boolean;
case Tipo::real:
a->real_a[i] = direita->real;
default: break;
}
tabelaDeSimbolos->modificar(a, esquerda->id);
} break;
case Tipo::arranjo_duplo: {
ArranjoDuplo *d = (ArranjoDuplo*) tabelaDeSimbolos->recuperar(esquerda->id, linha, true);
int i = ((Parametro*)((Chamada*)esquerda)->parametros)->parametro->inteiro;
int j = (((Parametro*)((Parametro*)((Chamada*)esquerda)->parametros)->proximo)->parametro)->inteiro;
switch(e) {
case Tipo::inteiro:
d->inteiro_a[i*d->tamanho2->inteiro + j] = direita->inteiro;
case Tipo::boolean:
d->boolean_a[i*d->tamanho2->inteiro + j] = direita->boolean;
case Tipo::real:
d->real_a[i*d->tamanho2->inteiro + j] = direita->real;
default: break;
}
tabelaDeSimbolos->modificar(d, esquerda->id);
} break;
case Tipo::hash: {
Hash *h = (Hash*) tabelaDeSimbolos->recuperar(esquerda->id, linha, true);
int chave_i = ((Parametro*)((Chamada*)esquerda)->parametros)->parametro->inteiro;
bool chave_b = ((Parametro*)((Chamada*)esquerda)->parametros)->parametro->boolean;
double chave_r = ((Parametro*)((Chamada*)esquerda)->parametros)->parametro->real;
switch (tabelaDeSimbolos->tipoDeHash(h->tipoDeChave, h->tipoDeVariavel)){
case hash_bb:
h->bool_bool[chave_b] = direita->boolean;
break;
case hash_bf:
h->bool_real[chave_b] = direita->real;
break;
case hash_bi:
h->bool_int[chave_b] = direita->inteiro;
break;
case hash_ib:
h->int_bool[chave_i] = direita->boolean;
break;
case hash_if:
h->int_real[chave_i] = direita->real;
break;
case hash_ii:
h->int_int[chave_i] = direita->inteiro;
break;
case hash_fb:
h->real_bool[chave_r] = direita->boolean;
break;
case hash_ff:
h->real_real[chave_r] = direita->real;
break;
case hash_fi:
h->real_int[chave_r] = direita->inteiro;
break;
default: break;
}
tabelaDeSimbolos->modificar(h, esquerda->id);
} break;
// Substitui-se o nodo da tabela de símbolos por este com os valores atualizados
default: {
tabelaDeSimbolos->modificar(esquerda, esquerda->id);
} break;
}
}
// Retorna-se o tipo da esquerda
return e;
// Operaçãos Aritméticas recebem "int" ou "float" e devolvem "int" ou "float"
case Tipo::adicao:
case Tipo::subtracao:
case Tipo::multiplicacao:
case Tipo::divisao:
// O tipo da esquerda é inválido?
if(e == Tipo::boolean || e == Tipo::endereco) {
imprimirErroDeOperacao(operacao, Tipo::inteiro, e, linha);
}
// O tipo da direita é inválido?
else if (d == Tipo::boolean || d == Tipo::endereco) {
imprimirErroDeOperacao(operacao, e, d, linha);
}
// A coerção de tipos é necessária?
if(coercao(this, e, d, operacao, linha, analisador)) {
// Se a coerção ocorre, é garantido que a operação binária retorna um tipo float
tipoDoRetorno = Tipo::real;
return Tipo::real;
}
// Caso não ocorra coerção, os tipos da esquerda e direita são iguais
return e;
// Operações Lógicas recebem "bool" e devolvem "bool"
case Tipo::e:
case Tipo::ou:
//
if(operacao == Tipo::e) {
boolean = esquerda->boolean && direita->boolean;
} else {
boolean = esquerda->boolean || direita->boolean;
}
// O tipo da esquerda é válido?
if(e != Tipo::boolean) {
imprimirErroDeOperacao(operacao, Tipo::boolean, e, linha);
}
// O tipo da direita é válido?
else if (d != Tipo::boolean) {
imprimirErroDeOperacao(operacao, Tipo::boolean, d, linha);
}
// Retorna o tipo boolean
return Tipo::boolean;
break;
// Comparadores recebem "int" ou "float" e devolvem "bool"
case Tipo::igual:
case Tipo::diferente:
case Tipo::maior:
case Tipo::maior_igual:
case Tipo::menor:
case Tipo::menor_igual:
// O tipo da esquerda é válido?
if(e == Tipo::boolean) {
imprimirErroDeOperacao(operacao, Tipo::inteiro, e, linha);
}
// O tipo da direita é válido?
else if (d == Tipo::boolean) {
imprimirErroDeOperacao(operacao, e, d, linha);
}
// Realiza-se coerção, se necessário
coercao(this, e, d, operacao, linha, analisador);
// Independente do retorno da coerção, retorna-se um valor booleano
return Tipo::boolean;
break;
// Atribuicao condicional
case Tipo::atribuicao_condicional:
// Realiza-se coerção, se necessário
coercao(this, e, d, operacao, linha, analisador);
// O tipo da esquerda é válido?
if(e != d) {
imprimirErroDeOperacao(operacao, e, d, linha);
}
// Independente do retorno da coerção, retorna-se o tipo do nodo à esquerda
return e;
break;
// Caso ocorra uma operação inválida, retorna-se Tipo::nulo
default:
return Tipo::nulo;
break;
}
}
void OperacaoBinaria::imprimir(int espaco, bool novaLinha) {
imprimirEspaco(espaco);
imprimirTipo(operacao);
std::cout << " ";
esquerda->imprimir(0, false);
std::cout << " ";
direita->imprimir(0, false);
if(novaLinha) std::cout << "\n";
}
|
122d79dae5d6c1da316278273c3175a46bbd9041
|
465fe842cea448e45e2c1c2a526a6cca888c8181
|
/4.cpp
|
e52c36e992f6e5595f7647afcb8cf55c3ee4d99a
|
[] |
no_license
|
PigTS/Coding-Interviews
|
fdcbe9cf24a9185e173740fa5a129ef41090fd95
|
ca034424ae33709e48bf1a37547b79463fe23575
|
refs/heads/master
| 2020-03-25T07:46:52.949357
| 2018-09-08T08:08:44
| 2018-09-08T08:08:44
| null | 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 2,079
|
cpp
|
4.cpp
|
#include <iostream>
#include <vector>
using namespace std;
//输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。
//例如输入前序遍历序列{1,2,4,7,3,5,6,8}和中序遍历序列{4,7,2,1,5,3,8,6},则重建二叉树并返回。
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
//递归版本一
class Solution {
public:
TreeNode* reConstructBinaryTree(vector<int> pre, vector<int> vin) {
TreeNode* root;
int preEnd = pre.size() - 1;
int vinEnd = vin.size() - 1;
root = reConstructBinaryTreeCore(pre, 0, preEnd, vin, 0, vinEnd);
return root;
}
TreeNode* reConstructBinaryTreeCore(vector<int> &pre, int preStart, int preEnd, vector<int> &vin, int vinStart, int vinEnd) {
if (preStart > preEnd || vinStart > vinEnd)return NULL;
TreeNode* root = new TreeNode(pre[preStart]);
for (int i = vinStart; i < vin.size(); ++i) {
if (vin[i] == pre[preStart]) {
root->left = reConstructBinaryTreeCore(pre, preStart + 1, preStart + i - vinStart, vin, vinStart, i - 1);
root->right = reConstructBinaryTreeCore(pre, preStart + i - vinStart + 1, preEnd, vin, i + 1, vinEnd);
break;
}
}
return root;
}
};
//递归版本二
class Solution {
public:
TreeNode* reConstructBinaryTree(vector<int> pre, vector<int> vin) {
if (pre.empty() || vin.empty())return NULL;
TreeNode* root = new TreeNode(pre[0]);
int equal_idx = 0;
for (int i = 0; i < vin.size(); ++i) {
if (vin[i] == pre[0]) {
equal_idx = i;
break;
}
}
vector<int> left_pre, right_pre, left_vin, right_vin;
for (int i = 0; i < equal_idx; ++i) {
left_pre.push_back(pre[i + 1]);
left_vin.push_back(vin[i]);
}
for (int i = equal_idx + 1; i < vin.size(); ++i) {
right_pre.push_back(pre[i]);
right_vin.push_back(vin[i]);
}
root->left = reConstructBinaryTree(left_pre, left_vin);
root->right = reConstructBinaryTree(right_pre, right_vin);
return root;
}
};
|
1cab980a118c4d5cf992a2ade6e027625c859fae
|
20ce7099910290e00691b8022a216c4e10efd855
|
/MeshLib/Mesh.h
|
618c7e5209ce9ee9269793be99be1690944a11c9
|
[] |
no_license
|
eseon1006/ogs
|
d113c270e3b6c3d28d2cbd014ef35d8b2a575bef
|
e7ea5b3c8470e17bb9ca691295c3a5967894cc26
|
refs/heads/master
| 2021-01-15T15:16:30.977622
| 2012-01-23T07:49:49
| 2012-01-23T07:49:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,869
|
h
|
Mesh.h
|
#pragma once
#include <cmath>
#include <vector>
#include "MemoryTools.h"
#include "Node.h"
#include "Element.h"
#include "ElementFactory.h"
//------------------------------------------------------------------------
namespace MeshLib
{
//-----------------------------------------------------------------------------
// Mesh
//-----------------------------------------------------------------------------
class IMesh
{
public:
virtual ~IMesh(){};
virtual size_t getNumberOfNodes() const = 0;
virtual size_t getNumberOfElements() const = 0;
virtual void getNodeCoordinates( size_t node_id, double pt[3] ) const = 0;
virtual IElement* getElemenet( size_t element_id ) const = 0;
virtual Node* getNode( size_t id ) const = 0;
};
class StructuredMesh : public IMesh
{
private:
double _origin[3];
double _length[3];
double _unit_length[3];
size_t _number_of_nodes_per_dimension[3];
public:
};
class UnstructuredMesh : public IMesh
{
private:
std::vector<Node*> _list_nodes;
std::vector<IElement*> _list_elements;
public:
UnstructuredMesh(){};
virtual ~UnstructuredMesh(){
destroyStdVectorWithPointers(_list_nodes);
destroyStdVectorWithPointers(_list_elements);
};
virtual size_t getNumberOfNodes() const { return _list_nodes.size(); };
virtual size_t getNumberOfElements() const { return _list_elements.size(); };
virtual void getNodeCoordinates(size_t node_id, double pt[3]) const {
Node* nod = _list_nodes[node_id];
pt[0] = (*nod)[0];
pt[1] = (*nod)[1];
pt[2] = (*nod)[2];
}
size_t setNode( size_t node_id, double x, double y, double z ) {
size_t new_node_id = node_id;
if (node_id<_list_nodes.size()) {
Node *node = this->_list_nodes.at(node_id);
(*node)[0] = x;
(*node)[1] = y;
(*node)[2] = z;
} else {
new_node_id = this->_list_nodes.size();
this->_list_nodes.push_back(new Node(new_node_id, x, y, z));
}
return new_node_id;
};
size_t addElement( IElement *e) {
e->setElementID(_list_elements.size());
_list_elements.push_back(e);
return e->getElementID();
};
virtual IElement* getElemenet( size_t element_id ) const {
assert(element_id<_list_elements.size());
return _list_elements.at(element_id);
};
virtual Node* getNode( size_t id ) const {
return _list_nodes.at(id);
};
void construct() {
//set node connectivity
const size_t n_ele = this->getNumberOfElements();
for (size_t i=0; i<n_ele; i++) {
const IElement* e = _list_elements[i];
for (size_t j=0; j<e->getNumberOfNodes(); j++) {
Node* nod_j = getNode(e->getNodeID(j));
for (size_t k=j+1; k<e->getNumberOfNodes(); k++) {
Node* nod_k = getNode(e->getNodeID(k));
nod_j->addConnectedNode(e->getNodeID(k));
nod_k->addConnectedNode(e->getNodeID(j));
}
};
}
};
};
template <size_t N_DIM>
class StaticStructuredMesh : public IMesh
{
private:
size_t _dimensions[N_DIM];
double _origin[N_DIM];
size_t _number_of_nodes[N_DIM];
double _unit_length[N_DIM];
public:
};
template <size_t N_DIM, size_t N_NODES, size_t N_ELEMENTS>
class StaticUnstructuredMesh : public IMesh
{
private:
size_t _nodes[N_NODES];
size_t _elements[N_ELEMENTS];
size_t _edges;
size_t _faces;
public:
StaticUnstructuredMesh(){};
virtual ~StaticUnstructuredMesh(){};
virtual size_t getNumberOfNodes() const { return N_NODES; };
virtual size_t getNumberOfElements() const { return N_ELEMENTS; };
};
class HierarchicalMesh : public IMesh
{
private:
};
} // end namespace
|
20d48796074e2336148b954ae9c450a3e57610b0
|
2e041fb3a61cf15e4a2fa4ca4501df57698c0670
|
/src/VersionNum.h
|
78354bb444ab33a0bcbbdbec632345a21b3b56a5
|
[
"MIT"
] |
permissive
|
xf97/SolidityCheck
|
f84066023b416c08115aabd5454a6860facabf1e
|
a859f4b65c7eea945ef7b9702c85cf3ff42f50f7
|
refs/heads/master
| 2021-08-06T20:32:55.974761
| 2021-06-28T08:38:17
| 2021-06-28T08:38:17
| 185,910,649
| 21
| 5
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,309
|
h
|
VersionNum.h
|
//
// Created by xiaofeng on 2019/11/29.
//
//This part of the program is used to detect version number problems.
//Using operators or unspecified security specifications can lead to
//unexpected consequences.
//head file
/*
author=__xiaofeng__
*/
#ifndef _VERSIONNUM_H_
#define _VERSIONNUM_H_
//using head files
#include <vector>
#include <string>
#include <algorithm>
#include <iterator>
#include <regex>
#include <utility>
//using namespace
using namespace std;
//const constants
const static char VN_OPE = '^';
const static string VN_VERSION1 = " pragma ";
const static string VN_VERSION2 = "pragma ";
const static string VN_SOLIDITY = " solidity ";
const static string VN_EXPE = " experimental ";
const static int VN_INDEX = 0;
const static char NO_MATCH = '<';
//regex
const static string VN_RE_VERSION1 = "(\\s)*(pragma)(\\s)+(solidity)(\\s)+(\\^)(\\d)(\\.)(\\d)(\\.)(\\d)+(\\s)*(;)";
const static string VN_RE_VERSION2 = "(\\s)*(pragma)(\\s)+(solidity)(\\s)+(\\>)(\\=)(\\d)(\\.)(\\d)(\\.)(\\d)+(\\s)+";
const static string VN_RE_EXPER = "(\\s)*(pragma)(\\s)+(experimental)(\\s)+";
const static string VN_RE_GETVERSION = "(\\b)(\\d)(\\.)(\\d)(\\.)(\\d)+(\\b)";
//class version
class VersionNum {
private:
//data
vector<string> content; //be detected contract's content;
string report_name; //report file name
vector<int> row_number; //code lines that may have vulnerabilities
string VNName;
string OtherOperation;
protected:
bool IsPragmaSolidity(const string& _str);
bool ContainOpe(const string& _str);
bool IsSecurity(const string& _str);
void AddReport();
bool IsNewOpe(const string& _str);
pair<string, string> getNowVersion(const string& _str);
bool isDiff(const pair<string, string>& _now, const vector<pair<string, string>>& _all);
public:
//constructor
VersionNum(const string _report_name, const vector<string> _content);
//destructor
~VersionNum();
//get detect report
string MakeReport(vector<int> _row_number);
//execute detection
void Detection();
//return row_number size
int GetNumber();
//return row_number
vector<int> GetRowNumber();
//regex detection
void Re_Detection();
};
#endif
|
50c65c332e063e62df725401af0fb6d928e6256c
|
b05f1cbd207e22f12e7f3076bf56181787b68085
|
/ACM solved the question with Corresponding number/No.8B改.cpp
|
607e69ce182fb3b5cb6043336b3f5f62d5b93787
|
[] |
no_license
|
NikoSoftware/Algorithm
|
e76db0556acdcfedd06d027a5642c6472254c50e
|
ceff66d6d6839ae8deb802e5e2e7e31c02025115
|
refs/heads/master
| 2020-12-30T14:45:13.903814
| 2017-05-12T11:54:42
| 2017-05-12T11:54:42
| 91,084,931
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 862
|
cpp
|
No.8B改.cpp
|
#include<stdio.h>
#include<string.h>
int cur=0;
struct Node
{
int next[26];
char data[100];
void init()
{
memset(next,-1,sizeof(next));
}
}t[10000];
void insert(char* s1,char *s2)
{
int p=0;
for(int i=0;i<strlen(s2);i++)
{
int x=s2[i]-'a';
if(t[p].next[x]==-1)
{ puts("fsda");
t[cur].init();
t[p].next[x]=cur++;
}
p=t[p].next[x];
}
printf("%d",cur);
strcpy(t[p].data,s1);
}
int main()
{
char a[1000],s1[100],s2[100];
t[cur].init();
while(gets(a)!=NULL)
{
int i=0;
while(a[i]!=' ')
{
s1[i]=a[i++];
}
s1[i++]='\0';
strcpy(s2,a+i);
insert(s1,s2);
puts("fsda");
}
//for(int i=0;i<cur;i++)
printf("%s",t[cur-1].data);
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.