ctrlX-DataLayer 5.0.0
Bosch Rexroth ctrlX Data Layer .NET API
This is the Bosch Rexroth ctrlX Data Layer API for .NET Core and .NET Standard 2.0.
Usage
Example: Read a ctrlX Data Layer node's value
// Create a new ctrlX Data Layer system to connect to a ctrlX and start.
using var system = new DatalayerSystem();
system.Start(startBroker: false);
// Create a remote according to your environment (options see Remote class).
var remote = new Remote(ip: "192.168.1.1", sslPort: 443).ToString();
// Create the client.
using var client = system.Factory.CreateClient(remote);
// Read a node with by it's node address.
var (result, value) = client.Read("framework/metrics/system/memused-percent");
if (result.IsGood())
{
Console.WriteLine($"memused-percent: {value.ToFloat()}");
}
Example: Subscribe a ctrlX Data Layer node's value
// Create a new ctrlX Data Layer system to connect to a ctrlX and start.
using var system = new DatalayerSystem();
system.Start(startBroker: false);
// Create a remote according to your environment (options see Remote class).
var remote = new Remote(ip: "192.168.1.1", sslPort: 443).ToString();
// Create the client.
using var client = system.Factory.CreateClient(remote);
// Create the subscription properties by using helper class SubscriptionPropertiesBuilder.
var propertiesFlatbuffers = new SubscriptionPropertiesBuilder("mySubscription")
.SetKeepAliveIntervalMillis(10000)
.SetPublishIntervalMillis(1000)
.SetErrorIntervalMillis(1000)
.Build();
// Create the subscription
var (createResult, subscription) = client.CreateSubscription(propertiesFlatbuffers, userData: null);
// Add DataChanged Event Handler
subscription.DataChanged += (subscription, eventArgs) =>
{
var notifyInfo = NotifyInfo.GetRootAsNotifyInfo(eventArgs.Item.Info.ToFlatbuffers());
var timestampUtc = DateTime.FromFileTimeUtc(Convert.ToInt64(notifyInfo.Timestamp));
Console.WriteLine($"{timestampUtc}, {notifyInfo.Node}: {eventArgs.Item.Value.ToFloat()}");
};
// Subscribe a node by it's node address.
const string cpuLoad = "framework/metrics/system/cpu-utilisation-percent";
var subscribeResult = subscription.Subscribe(address: cpuLoad);
Links
Please find the code coverage reports in folder ./coverage.
License
The binary files "datalayer.dll" and "comm.datalayer.so*" are licensed under the "Terms and Conditions for the Provision of Products of Bosch Rexroth AG Free of Charge" supplemented by the right to redistribution, any other software code in this repository is licensed under the:
SPDX-FileCopyrightText: Bosch Rexroth AG
SPDX-License-Identifier: MIT
Terms and Conditions for the Provision of Products of Bosch Rexroth AG Free of Charge
See LICENSES/tc_for_provision_of_products_free_of_charge.pdf inside this package. Download the latest version from https://www.boschrexroth.com. Navigate to Legal Notice (footer) -> Terms and Conditions for the Provision of Products Free of Charge.
Open Source Software Licenses
See LICENSES/FossInfo.json or LICENSES/FossInfo.csv for used open source software licenses.
About
Please note that any trademarks, logos and pictures contained or linked to in this Software are owned by or copyright © Bosch Rexroth AG and not licensed under the Software's license terms.
Bosch Rexroth AG
Bgm.-Dr.-Nebel-Str. 2
97816 Lohr am Main
GERMANY
No packages depend on ctrlX-DataLayer.
.NET 8.0
- ctrlX-DataLayer.Flatbuffers (>= 4.4.0)
.NET Standard 2.0
- ctrlX-DataLayer.Flatbuffers (>= 4.4.0)
| Version | Downloads | Last updated |
|---|---|---|
| 5.0.0 | 4 | 01/22/2026 |