LibModbus

所属分类:通讯编程
开发工具:Julia
文件大小:0KB
下载次数:0
上传日期:2023-08-10 21:20:19
上 传 者sh-1993
说明:  Libmodbus库的Julia包装器,
(Julia wrapper for Libmodbus library,)

文件列表:
LICENSE (1120, 2023-08-10)
Project.toml (449, 2023-08-10)
src/ (0, 2023-08-10)
src/LibModbus.jl (49524, 2023-08-10)
test/ (0, 2023-08-10)
test/runtests.jl (708, 2023-08-10)
test/unit_test_client.jl (22171, 2023-08-10)
test/unit_test_constants.jl (3154, 2023-08-10)
test/unit_test_functions.jl (617, 2023-08-10)
test/unit_test_server.jl (4274, 2023-08-10)

# LibModbus.jl [![Build Status](https://github.com/kagalenko-m-b/LibModbus.jl/workflows/CI/badge.svg)](https://github.com/kagalenko-m-b/LibModbus.jl/actions) [![Codecov](https://codecov.io/gh/kagalenko-m-b/LibModbus.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/kagalenko-m-b/LibModbus.jl) Julia wrapper for [Libmodbus](http://libmodbus.org/) library ## Installation Within julia, execute ```julia using Pkg; Pkg.add("LibModbus") ``` ## Usage example ```julia julia> ctx = RtuContext(raw"\\.\COM10", 9600, :even, 8, 1) RtuContext(serial_port \\.\COM10, baud 9600, parity even, data_bits 8, stop_bits 1) julia> connect(ctx) 0 julia> ctx.slave_address=1 1 julia> res=read_input_registers(ctx, 0, 15) read input registers: 15-element Vector{UInt16}: 0xd9f6 0x00fc 0xded1 0x806a 0xbe81 0xcf72 0xbfae 0x7487 0xb42d 0xe370 0xc9d8 0x67a9 0xeb4f 0xc288 0xd686 julia> disconnect(ctx) ``` If you reassigned `ctx` while the serial port is still connected, call `GC.gc()` to trigger the finalizer on `ModbusContext`. See the test directory for more usage examples.

近期下载者

相关文件


收藏者