• git及dbc的学习


    1)git的使用方法

    Command line instructions
    You can also upload existing files from your computer using the instructions below.
    Git global setup
    git config --global user.name "username"
    git config --global user.email "xxx@.com"
    Create a new repository
    
    cd edr
    touch README.md
    git add README.md
    git commit -m "add README"
    git push -u origin main
    Push an existing folder
    cd existing_folder
    git init
    
    git add .
    git commit -m "Initial commit"
    git push -u origin main
    Push an existing Git repository
    cd existing_repo
    git remote rename origin old-origin
    
    git push -u origin --all
    git push -u origin --tags
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25

    2)dbc的学习

    BS_ 波特率设置
    BU_ 网络节点定义
    BO_ 报文帧消息,巧记方法: BAO,是报的读音,所以也报文帧消息关键字;
    SG_ 信号
    
    版本与新符号 version&NS_
    波特率定义 BS_
    网络节点定义 BU_;如BU_: node7 node6 node5
    报文帧定义 BO_
    信号定义	SG_
    注释部分 CM_
    属性定义 两种: BA_DEF_ 属性定义; BA_DEF_DEF_ 定义属性初始值;
    数值表定义 VAL_;
    
    
    BO_ 897 TimeSync: 64 Vector__XXX  
    BA_DEF_DEF_为关键字,表示定义属性的初始值;
    https://blog.csdn.net/weixin_44536482/article/details/89030152 //dbc文件格式说明
    
    发下旋球就是相当于拿水瓢蒯水的感觉;
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20

    3)cin.ignore的使用

    //清除以回车结束的输入缓冲区的内容,消除上一次输入对下一次输入的影响
        //案例:cin.ignore(1024, ‘\n'); 通常把第一个参数设置得足够大,这样实际上是为了只有第二个参数 ‘\n’ 起作用,
        //所以这一句就是把回车(包括回车)之前的所以字符从输入缓冲流中清除出去
        in.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
    
    • 1
    • 2
    • 3
    • 4

    4)子类做实参,父类做形参的使用案例:

    class A
    {
    public:
        int a_ = 10;
    };
    class B : public A
    {
    public:
        int b_ = 20;
    };
    //如果形参是父类,而实参是子类,临时对象构造时只会构造父类的部分,而不会构造子类的任何特有的部分;
    void func(A aa) //只能输出a_,不能输出b_;
    {
        cout<<aa.a_<<endl;
    }
    int main(int argc, char** argv)
    {
        B bobj;
        func(bobj);
        return 0;
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
  • 相关阅读:
    详解ConCurrentHashMap源码(jdk1.8)
    msvc++中的预编译头文件pch.hpp和stdafx.h
    Python+Appium自动化搭建新手教程
    值得拥有的 12 大最佳照片恢复软件 [持续更新]
    TiDB Data Migration 查询状态
    【无标题】
    uniapp调起拨打手机号
    K8s部署单机mysql
    NumPy中einsum使用笔记
    pytest的内置插件盘点9. debugging
  • 原文地址:https://blog.csdn.net/qq_30143193/article/details/132971389