This is a Flatbuffers library for the ctrlX Data Layer Node.js API.
This library provides generated TypeScript classes of FlatBuffers models for use in the ctrlX Data Layer API for Node.js.
npm install ctrlx-datalayer-flatbuffers --save
The following code snippet demonstrates how to create a FlatBuffers byte buffer with the FlatBuffers builder and the provided TypeScript classes:
//Build metadata
const builder = new flatbuffers.Builder(1024);
//Setup allowed operations
const operationsOffset = AllowedOperations.createAllowedOperations(
builder, true, true, false, false, true);
const descriptionOffset = builder.createString('my description');
const descriptionUrlOffset = builder.createString('my descriptionUrl');
const displayNameOffset = builder.createString('my displayName');
const unitOffset = builder.createString('my unit');
//Setup metadata
Metadata.startMetadata(builder);
Metadata.addDescription(builder, descriptionOffset);
Metadata.addDescriptionUrl(builder, descriptionUrlOffset);
Metadata.addDisplayName(builder, displayNameOffset)
Metadata.addUnit(builder, unitOffset);
Metadata.addNodeClass(builder, NodeClass.Variable);
Metadata.addOperations(builder, operationsOffset);
const offset = Metadata.endMetadata(builder);
Metadata.finishMetadataBuffer(builder, offset);
const metaDataBytes = builder.asUint8Array()
It might be helpful to have a look at the README Node.js Apps @ ctrlX document to find implementations of the different use-cases.
This repository is provided and maintained by Bosch Rexroth.
Feel free to check out and be part of the ctrlX AUTOMATION Community. Get additional support, e.g. related to Bosch Rexroth Devices, Apps, SDKs and Services, or leave some ideas and feedback.
Please join the discussions in the SDK Forum ctrlX AUTOMATION:
To report bugs, request changes and discuss new ideas you may also have a look at the issue tracker of this repository: https://github.com/boschrexroth/ctrlx-automation-sdk/issues
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. Please 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
-
See LICENSES/*.fossinfo.xml for used open source software licenses.
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