[go: nahoru, domu]

Skip to content

lhcstation/LCM-DLL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LCM is a set of libraries and tools for message passing and data marshalling, targeted at real-time systems where high-bandwidth and low latency are critical. It provides a publish/subscribe message passing model and automatic marshalling/unmarshalling code generation with bindings for applications in a variety of programming languages.

LCM源码编译

  • lcm-proj/lcm

  • LCM在Linux环境下的安装十分的简单,但是在windows环境中,由于众嗦周知的原因,需要配置各种环境,较为繁琐,可以参考下面这篇博客:LCM通信包在Windows 64位环境下的编译

  • 如果每次使用LCM都要从源码进行编译,显然这是一种非常愚蠢的做法,因此我已经把编译好的dll文件放在我的GitHub上面了,里面包含C++版本的dll和一个C#版本的dll,直接拿来用就可以了。

Visual Studio配置

  • 如果是从源码进行的编译,会在lcm根目录下生成build文件夹,里面是已经配置好的各种示例工程

  • 如果不是从源码进行编译,直接使用预先编译好的dll,则可以参考GitHub仓库中build文件夹中VS的配置方式,主要使用lcm-listenerlcm-senderlcm-gen这三个工程

VISSIM-DriverModel.DLL

  • 建议从VISSIM官方给出的DriverModel模板入手,进行开发;一个可以参考的例子是lhcstation/LCM-DLL

  • 需要定义数据模板,即在lcm-gen文件夹根目录下新建文件example_t.lcm,并配置数据类型,一个示例如下:

package exlcm;
struct example_t
{
    int8_t velID;
    double time;
    double velFrontcoorX;
    double velFrontcoorY;
    double velEndcoorX;
    double velEndcoorY;
}
  • 随后执行lcm-gen -x example_t.lcm,若使用VS,则添加控制台命令-x example_t.lcm,运行后会在当前文件夹生成一个exlcm/example_t.hpp文件

  • 发送端VISSIM-dll提供一个可行的参考示例:LCM-DLL/DriverModel_DLL/DriverModel.cpp

请将lhcstation/LCM-DLL文件夹中所有dll文件放置到本机C:\Windows\System32文件夹下,在编译生成DroverModel.dll,否则VISSIM会提示如下错误:

U3D接收端(基于C#)

通信速度

enjoy it 😀

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published