跳转到内容

新增内容?

节点仿真 v1.2 变更

节点仿真中的 J1939_MSG 已更新,以便于访问消息属性和信号值,并支持大端信号,如下所示 class J1939_MSG { unsigned __int64 timeStamp; unsigned char cluster; EJ1939_MSG_TYPE msgType; enum EDIRECTION direction; J1939Id id; unsigned int dlc; unsigned char data[1785]; // To set data bool byteAt(int index, unsigned char val); bool wordAt(int index, unsigned short val); bool longAt(int index, unsigned long val); // To get data unsigned char byteAt(int index); unsigned short wordAt(int index); unsigned long longAt(int index); }; class J1939Id { unsigned int extendedId; // Setters void setId(unsigned int _extendedId); void setSourceAddress(unsigned char _sourceAddress) void setPGN(unsigned int _pgn); void setPDUFormat(unsigned char _pduFormat) void setDataPage(unsigned char _dataPage); void setPriority(unsigned char _priority); void setPDUSpecific(unsigned char _pduSpecific); // Getters unsigned char getSourceAddress(); unsigned char getPDUFormat(); unsigned int getPGN(); unsigned char getDataPage(); unsigned char getPriority(); unsigned char getPDUSpecific(); };

支持以下函数来访问/更新信号值 若要设置信号原始值或物理值 1. rawvalue(int x); // Type ‘int’ will vary as per the signal type 2. physicalvalue(double x); 若要获取信号原始值或物理值 1. rawvalue(); // returns signal rawvalue 2. physicalvalue(); // returns signal physicalvalue 有关更多详细信息,请参阅“J1939->Node Simulation”下的“Examples”部分

有关更多详细信息,请参阅安装文件夹中“SimulatedSystems\include”下的“BMJ1939Defines.h”


权威来源: BUSMASTER DITA help source what_is_new_nodesim_J1939.dita, compiled into BUSMASTER.CHM with the application.