openmodbus_dart 0.1.1 copy "openmodbus_dart: ^0.1.1" to clipboard
openmodbus_dart: ^0.1.1 copied to clipboard

An OpenModbus JSON Spec Parser, fromJson and toJson

example/openmodbus_dart_example.dart

import 'package:openmodbus_dart/openmodbus_dart.dart';

import 'dart:io';

void main() async {
  List<String> jsonFileNameList = ["ascii-safe-system-example.json", "rtu-lights-example.json", "tcp-air-condition-example.json"];

  String currentWorkingDirectory = Directory.current.path;
  jsonFileNameList.forEach((jsonFileName) async {
    print("FILE_NAME: $jsonFileName");
    String jsonPath = "$currentWorkingDirectory/example/json/$jsonFileName";
    OpenModbusLoader openModbusLoader = OpenModbusLoader();
    OpenModbus openModbus = await openModbusLoader.loadFromFile(jsonPath);
    print("title: ${openModbus.info.title}");
  });
}
1
likes
140
points
28
downloads

Publisher

verified publisherlitevar.com

Weekly Downloads

An OpenModbus JSON Spec Parser, fromJson and toJson

Documentation

API reference

License

MIT (license)

Dependencies

json_annotation

More

Packages that depend on openmodbus_dart