lb_writer

Last updated:

0 purchases

lb_writer Image
lb_writer Images
Add to Cart

Description:

lb writer

Logbot Writer SDK for Flutter #
This is a package that enables read and write capabilities in the device.
This Dart package is automatically generated by the OpenAPI Generator project:

API version: 1.0.1
Build package: org.openapitools.codegen.languages.DartClientCodegen

Requirements #
Dart 2.17 or later
Installation & Usage #
Add the dependencies from pub.dev:
dependencies:
lb_auth:
lb_writer:
copied to clipboard
lb_auth is always required to make authorized calls to the APIs.
To use the SDK on you application see the example below:
/// Remember to call LogbotSetup.init() after ensureInitialized()
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await LogbotSetup.init();
runApp(const MyApp());
}

import 'package:lb_auth/lb_auth.dart';
import 'package:lb_writer/lb_writer.dart';

class Example {

Future<void> run() async {
/// Initialize Logbot SDK by logging in with Logbot Credentials
await LogbotAuth.init(LogbotCredentials(
username: username,
password: password,
clientId: clientId,
clientSecret: clientSecret,
));
/// Starts the Logbot Discovery to search for local devices
await LogbotDiscovery.startDiscovery();
/// Starts the background service to retrieve device status every minute
/// (needed to read device status from cache)
LogbotStateManager.start();
/// Now you can use every API included on the SDK
/// for example:
List<Connection>? response = await LogbotWriter.connections.listConnections();
}
}
copied to clipboard
Tests #
To run all tests:
flutter test
copied to clipboard
Documentation for API Endpoints #
All URIs are relative to https://devices.logbotiot.cloud



Class
Method
HTTP request
Description




ConnectionApi
addConnection
POST /connection
Creates a new connection


ConnectionApi
clearConnections
DELETE /connection
Deletes all active connections


ConnectionApi
connectionDiscover
POST /connection/{id}/discover
Discovers PLC metrics.


ConnectionApi
connectionRead
POST /connection/{id}/read
Read one metric over the specified connection


ConnectionApi
connectionWrite
POST /connection/{id}/write
Write one metric over the specified connection


ConnectionApi
deleteConnection
DELETE /connection/{id}
Deletes the connection


ConnectionApi
discover
POST /connection/discover
Creates a temporary connection and discover its metrics


ConnectionApi
getConnection
GET /connection/{id}
Retrives informations about the connection


ConnectionApi
listConnections
GET /connection
Retrives informations about all active connections


ConnectionApi
read
POST /connection/read
Creates a temporary connection and reads the given metric


ConnectionApi
write
POST /connection/write
Creates a temporary connection and writes the given metric


DeviceApi
getInfo
GET /info
Get the device informations


DeviceApi
getStats
GET /stats
Get device stats


DeviceApi
healthcheck
GET /healthcheck
Checks the device status



Documentation For Models #


AddConnectionResponse


AddConnectionRequest


Connection


ConnectionAllOf


ConnectionDiscoverRequest


AddConnectionModbus


AddConnectionOPCUA


ConnectionReadModbus


ConnectionReadOPCUA


ConnectionReadRequest


ConnectionReadS7


ConnectionS7


ConnectionWriteModbus


ConnectionWriteModbusMetrics


ConnectionWriteOPCUA


ConnectionWriteOPCUAMetrics


ConnectionWriteRequest


ConnectionWriteS7


ConnectionWriteS7Metrics


ConnectionWriteS7MetricsInnerValue


DeviceInfo


DeviceStats


DeviceStatsCpu


DeviceStatsCpuTemperature


DeviceStatsMemory


DiscoverResponse


DiscoverResponseAllOf


DiscoverRequest


Error


MetricModbus


MetricModbusAllOf


MetricModbusBool


MetricModbusNumber


MetricOPCUA


MetricOPCUAAllOf


MetricS7


NodeOPCUA


NodeOPCUAIdentifier


ParametersModbus


ParametersOPCUA


ParametersS7


ParametersS7Host


ReadModbus


ReadOPCUA


ReadRequest


ReadS7


Status


Value


ValueValue


WriteModbus


WriteModbusMetrics


WriteOPCUA


WriteOPCUAMetrics


WriteRequest


WriteS7


WriteS7Metrics



Author #
Logbot SRL [email protected]

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.