node-red-contrib-uos-nats 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -0
- package/icons/white/datahub-input.svg +4 -0
- package/icons/white/datahub-output.svg +4 -0
- package/lib/auth.js +27 -0
- package/lib/config.js +23 -0
- package/lib/consumer.js +41 -0
- package/lib/fbs/weidmueller/ucontrol/hub/duration.js +67 -0
- package/lib/fbs/weidmueller/ucontrol/hub/provider-definition-changed-event.js +69 -0
- package/lib/fbs/weidmueller/ucontrol/hub/provider-definition-state.js +20 -0
- package/lib/fbs/weidmueller/ucontrol/hub/provider-definition.js +118 -0
- package/lib/fbs/weidmueller/ucontrol/hub/provider-list.js +76 -0
- package/lib/fbs/weidmueller/ucontrol/hub/provider.js +59 -0
- package/lib/fbs/weidmueller/ucontrol/hub/providers-changed-event.js +69 -0
- package/lib/fbs/weidmueller/ucontrol/hub/read-provider-definition-query-request.js +51 -0
- package/lib/fbs/weidmueller/ucontrol/hub/read-provider-definition-query-response.js +68 -0
- package/lib/fbs/weidmueller/ucontrol/hub/read-providers-query-request.js +51 -0
- package/lib/fbs/weidmueller/ucontrol/hub/read-providers-query-response.js +69 -0
- package/lib/fbs/weidmueller/ucontrol/hub/read-variables-query-request.js +88 -0
- package/lib/fbs/weidmueller/ucontrol/hub/read-variables-query-response.js +69 -0
- package/lib/fbs/weidmueller/ucontrol/hub/state-changed-event.js +67 -0
- package/lib/fbs/weidmueller/ucontrol/hub/state.js +14 -0
- package/lib/fbs/weidmueller/ucontrol/hub/timestamp.js +62 -0
- package/lib/fbs/weidmueller/ucontrol/hub/uuid.js +43 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-access-type.js +17 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-data-type.js +15 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-definition.js +115 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-list.js +106 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-quality.js +31 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-value-boolean.js +57 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-value-duration.js +58 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-value-float64.js +57 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-value-int64.js +57 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-value-string.js +58 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-value-timestamp.js +58 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable-value.js +45 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variable.js +131 -0
- package/lib/fbs/weidmueller/ucontrol/hub/variables-changed-event.js +71 -0
- package/lib/fbs/weidmueller/ucontrol/hub/write-variables-command.js +69 -0
- package/lib/fbs/weidmueller/ucontrol/hub.js +17 -0
- package/lib/models.js +1 -0
- package/lib/payloads.js +182 -0
- package/lib/provider.js +51 -0
- package/lib/simulation.js +54 -0
- package/lib/subjects.js +11 -0
- package/nodes/datahub-input.html +157 -0
- package/nodes/datahub-input.js +129 -0
- package/nodes/datahub-output.html +36 -0
- package/nodes/datahub-output.js +189 -0
- package/nodes/uos-config.html +48 -0
- package/nodes/uos-config.js +173 -0
- package/package.json +25 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
import { ProviderList } from '../../../weidmueller/ucontrol/hub/provider-list.js';
|
|
5
|
+
/**
|
|
6
|
+
* An event that describes a list of providers that have just changed.
|
|
7
|
+
*/
|
|
8
|
+
export class ProvidersChangedEvent {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.bb = null;
|
|
11
|
+
this.bb_pos = 0;
|
|
12
|
+
}
|
|
13
|
+
__init(i, bb) {
|
|
14
|
+
this.bb_pos = i;
|
|
15
|
+
this.bb = bb;
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
static getRootAsProvidersChangedEvent(bb, obj) {
|
|
19
|
+
return (obj || new ProvidersChangedEvent()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
20
|
+
}
|
|
21
|
+
static getSizePrefixedRootAsProvidersChangedEvent(bb, obj) {
|
|
22
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
23
|
+
return (obj || new ProvidersChangedEvent()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A list of providers that have just been changed.
|
|
27
|
+
*/
|
|
28
|
+
providers(obj) {
|
|
29
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
30
|
+
return offset ? (obj || new ProviderList()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
31
|
+
}
|
|
32
|
+
static startProvidersChangedEvent(builder) {
|
|
33
|
+
builder.startObject(1);
|
|
34
|
+
}
|
|
35
|
+
static addProviders(builder, providersOffset) {
|
|
36
|
+
builder.addFieldOffset(0, providersOffset, 0);
|
|
37
|
+
}
|
|
38
|
+
static endProvidersChangedEvent(builder) {
|
|
39
|
+
const offset = builder.endObject();
|
|
40
|
+
builder.requiredField(offset, 4); // providers
|
|
41
|
+
return offset;
|
|
42
|
+
}
|
|
43
|
+
static finishProvidersChangedEventBuffer(builder, offset) {
|
|
44
|
+
builder.finish(offset);
|
|
45
|
+
}
|
|
46
|
+
static finishSizePrefixedProvidersChangedEventBuffer(builder, offset) {
|
|
47
|
+
builder.finish(offset, undefined, true);
|
|
48
|
+
}
|
|
49
|
+
static createProvidersChangedEvent(builder, providersOffset) {
|
|
50
|
+
ProvidersChangedEvent.startProvidersChangedEvent(builder);
|
|
51
|
+
ProvidersChangedEvent.addProviders(builder, providersOffset);
|
|
52
|
+
return ProvidersChangedEvent.endProvidersChangedEvent(builder);
|
|
53
|
+
}
|
|
54
|
+
unpack() {
|
|
55
|
+
return new ProvidersChangedEventT((this.providers() !== null ? this.providers().unpack() : null));
|
|
56
|
+
}
|
|
57
|
+
unpackTo(_o) {
|
|
58
|
+
_o.providers = (this.providers() !== null ? this.providers().unpack() : null);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export class ProvidersChangedEventT {
|
|
62
|
+
constructor(providers = null) {
|
|
63
|
+
this.providers = providers;
|
|
64
|
+
}
|
|
65
|
+
pack(builder) {
|
|
66
|
+
const providers = (this.providers !== null ? this.providers.pack(builder) : 0);
|
|
67
|
+
return ProvidersChangedEvent.createProvidersChangedEvent(builder, providers);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
/**
|
|
5
|
+
* A query request that requests a provider's definition.
|
|
6
|
+
*/
|
|
7
|
+
export class ReadProviderDefinitionQueryRequest {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.bb = null;
|
|
10
|
+
this.bb_pos = 0;
|
|
11
|
+
}
|
|
12
|
+
__init(i, bb) {
|
|
13
|
+
this.bb_pos = i;
|
|
14
|
+
this.bb = bb;
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
static getRootAsReadProviderDefinitionQueryRequest(bb, obj) {
|
|
18
|
+
return (obj || new ReadProviderDefinitionQueryRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
19
|
+
}
|
|
20
|
+
static getSizePrefixedRootAsReadProviderDefinitionQueryRequest(bb, obj) {
|
|
21
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
22
|
+
return (obj || new ReadProviderDefinitionQueryRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
23
|
+
}
|
|
24
|
+
static startReadProviderDefinitionQueryRequest(builder) {
|
|
25
|
+
builder.startObject(0);
|
|
26
|
+
}
|
|
27
|
+
static endReadProviderDefinitionQueryRequest(builder) {
|
|
28
|
+
const offset = builder.endObject();
|
|
29
|
+
return offset;
|
|
30
|
+
}
|
|
31
|
+
static finishReadProviderDefinitionQueryRequestBuffer(builder, offset) {
|
|
32
|
+
builder.finish(offset);
|
|
33
|
+
}
|
|
34
|
+
static finishSizePrefixedReadProviderDefinitionQueryRequestBuffer(builder, offset) {
|
|
35
|
+
builder.finish(offset, undefined, true);
|
|
36
|
+
}
|
|
37
|
+
static createReadProviderDefinitionQueryRequest(builder) {
|
|
38
|
+
ReadProviderDefinitionQueryRequest.startReadProviderDefinitionQueryRequest(builder);
|
|
39
|
+
return ReadProviderDefinitionQueryRequest.endReadProviderDefinitionQueryRequest(builder);
|
|
40
|
+
}
|
|
41
|
+
unpack() {
|
|
42
|
+
return new ReadProviderDefinitionQueryRequestT();
|
|
43
|
+
}
|
|
44
|
+
unpackTo(_o) { }
|
|
45
|
+
}
|
|
46
|
+
export class ReadProviderDefinitionQueryRequestT {
|
|
47
|
+
constructor() { }
|
|
48
|
+
pack(builder) {
|
|
49
|
+
return ReadProviderDefinitionQueryRequest.createReadProviderDefinitionQueryRequest(builder);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
import { ProviderDefinition } from '../../../weidmueller/ucontrol/hub/provider-definition.js';
|
|
5
|
+
/**
|
|
6
|
+
* A query Response that returns a requested provider's definition.
|
|
7
|
+
*/
|
|
8
|
+
export class ReadProviderDefinitionQueryResponse {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.bb = null;
|
|
11
|
+
this.bb_pos = 0;
|
|
12
|
+
}
|
|
13
|
+
__init(i, bb) {
|
|
14
|
+
this.bb_pos = i;
|
|
15
|
+
this.bb = bb;
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
static getRootAsReadProviderDefinitionQueryResponse(bb, obj) {
|
|
19
|
+
return (obj || new ReadProviderDefinitionQueryResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
20
|
+
}
|
|
21
|
+
static getSizePrefixedRootAsReadProviderDefinitionQueryResponse(bb, obj) {
|
|
22
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
23
|
+
return (obj || new ReadProviderDefinitionQueryResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A provider's definition that has been requested.
|
|
27
|
+
*/
|
|
28
|
+
providerDefinition(obj) {
|
|
29
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
30
|
+
return offset ? (obj || new ProviderDefinition()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
31
|
+
}
|
|
32
|
+
static startReadProviderDefinitionQueryResponse(builder) {
|
|
33
|
+
builder.startObject(1);
|
|
34
|
+
}
|
|
35
|
+
static addProviderDefinition(builder, providerDefinitionOffset) {
|
|
36
|
+
builder.addFieldOffset(0, providerDefinitionOffset, 0);
|
|
37
|
+
}
|
|
38
|
+
static endReadProviderDefinitionQueryResponse(builder) {
|
|
39
|
+
const offset = builder.endObject();
|
|
40
|
+
return offset;
|
|
41
|
+
}
|
|
42
|
+
static finishReadProviderDefinitionQueryResponseBuffer(builder, offset) {
|
|
43
|
+
builder.finish(offset);
|
|
44
|
+
}
|
|
45
|
+
static finishSizePrefixedReadProviderDefinitionQueryResponseBuffer(builder, offset) {
|
|
46
|
+
builder.finish(offset, undefined, true);
|
|
47
|
+
}
|
|
48
|
+
static createReadProviderDefinitionQueryResponse(builder, providerDefinitionOffset) {
|
|
49
|
+
ReadProviderDefinitionQueryResponse.startReadProviderDefinitionQueryResponse(builder);
|
|
50
|
+
ReadProviderDefinitionQueryResponse.addProviderDefinition(builder, providerDefinitionOffset);
|
|
51
|
+
return ReadProviderDefinitionQueryResponse.endReadProviderDefinitionQueryResponse(builder);
|
|
52
|
+
}
|
|
53
|
+
unpack() {
|
|
54
|
+
return new ReadProviderDefinitionQueryResponseT((this.providerDefinition() !== null ? this.providerDefinition().unpack() : null));
|
|
55
|
+
}
|
|
56
|
+
unpackTo(_o) {
|
|
57
|
+
_o.providerDefinition = (this.providerDefinition() !== null ? this.providerDefinition().unpack() : null);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export class ReadProviderDefinitionQueryResponseT {
|
|
61
|
+
constructor(providerDefinition = null) {
|
|
62
|
+
this.providerDefinition = providerDefinition;
|
|
63
|
+
}
|
|
64
|
+
pack(builder) {
|
|
65
|
+
const providerDefinition = (this.providerDefinition !== null ? this.providerDefinition.pack(builder) : 0);
|
|
66
|
+
return ReadProviderDefinitionQueryResponse.createReadProviderDefinitionQueryResponse(builder, providerDefinition);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
/**
|
|
5
|
+
* A query request that requests a list of providers.
|
|
6
|
+
*/
|
|
7
|
+
export class ReadProvidersQueryRequest {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.bb = null;
|
|
10
|
+
this.bb_pos = 0;
|
|
11
|
+
}
|
|
12
|
+
__init(i, bb) {
|
|
13
|
+
this.bb_pos = i;
|
|
14
|
+
this.bb = bb;
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
static getRootAsReadProvidersQueryRequest(bb, obj) {
|
|
18
|
+
return (obj || new ReadProvidersQueryRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
19
|
+
}
|
|
20
|
+
static getSizePrefixedRootAsReadProvidersQueryRequest(bb, obj) {
|
|
21
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
22
|
+
return (obj || new ReadProvidersQueryRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
23
|
+
}
|
|
24
|
+
static startReadProvidersQueryRequest(builder) {
|
|
25
|
+
builder.startObject(0);
|
|
26
|
+
}
|
|
27
|
+
static endReadProvidersQueryRequest(builder) {
|
|
28
|
+
const offset = builder.endObject();
|
|
29
|
+
return offset;
|
|
30
|
+
}
|
|
31
|
+
static finishReadProvidersQueryRequestBuffer(builder, offset) {
|
|
32
|
+
builder.finish(offset);
|
|
33
|
+
}
|
|
34
|
+
static finishSizePrefixedReadProvidersQueryRequestBuffer(builder, offset) {
|
|
35
|
+
builder.finish(offset, undefined, true);
|
|
36
|
+
}
|
|
37
|
+
static createReadProvidersQueryRequest(builder) {
|
|
38
|
+
ReadProvidersQueryRequest.startReadProvidersQueryRequest(builder);
|
|
39
|
+
return ReadProvidersQueryRequest.endReadProvidersQueryRequest(builder);
|
|
40
|
+
}
|
|
41
|
+
unpack() {
|
|
42
|
+
return new ReadProvidersQueryRequestT();
|
|
43
|
+
}
|
|
44
|
+
unpackTo(_o) { }
|
|
45
|
+
}
|
|
46
|
+
export class ReadProvidersQueryRequestT {
|
|
47
|
+
constructor() { }
|
|
48
|
+
pack(builder) {
|
|
49
|
+
return ReadProvidersQueryRequest.createReadProvidersQueryRequest(builder);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
import { ProviderList } from '../../../weidmueller/ucontrol/hub/provider-list.js';
|
|
5
|
+
/**
|
|
6
|
+
* A query response that returns a requested list of providers.
|
|
7
|
+
*/
|
|
8
|
+
export class ReadProvidersQueryResponse {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.bb = null;
|
|
11
|
+
this.bb_pos = 0;
|
|
12
|
+
}
|
|
13
|
+
__init(i, bb) {
|
|
14
|
+
this.bb_pos = i;
|
|
15
|
+
this.bb = bb;
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
static getRootAsReadProvidersQueryResponse(bb, obj) {
|
|
19
|
+
return (obj || new ReadProvidersQueryResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
20
|
+
}
|
|
21
|
+
static getSizePrefixedRootAsReadProvidersQueryResponse(bb, obj) {
|
|
22
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
23
|
+
return (obj || new ReadProvidersQueryResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A list of providers that have been requested.
|
|
27
|
+
*/
|
|
28
|
+
providers(obj) {
|
|
29
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
30
|
+
return offset ? (obj || new ProviderList()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
31
|
+
}
|
|
32
|
+
static startReadProvidersQueryResponse(builder) {
|
|
33
|
+
builder.startObject(1);
|
|
34
|
+
}
|
|
35
|
+
static addProviders(builder, providersOffset) {
|
|
36
|
+
builder.addFieldOffset(0, providersOffset, 0);
|
|
37
|
+
}
|
|
38
|
+
static endReadProvidersQueryResponse(builder) {
|
|
39
|
+
const offset = builder.endObject();
|
|
40
|
+
builder.requiredField(offset, 4); // providers
|
|
41
|
+
return offset;
|
|
42
|
+
}
|
|
43
|
+
static finishReadProvidersQueryResponseBuffer(builder, offset) {
|
|
44
|
+
builder.finish(offset);
|
|
45
|
+
}
|
|
46
|
+
static finishSizePrefixedReadProvidersQueryResponseBuffer(builder, offset) {
|
|
47
|
+
builder.finish(offset, undefined, true);
|
|
48
|
+
}
|
|
49
|
+
static createReadProvidersQueryResponse(builder, providersOffset) {
|
|
50
|
+
ReadProvidersQueryResponse.startReadProvidersQueryResponse(builder);
|
|
51
|
+
ReadProvidersQueryResponse.addProviders(builder, providersOffset);
|
|
52
|
+
return ReadProvidersQueryResponse.endReadProvidersQueryResponse(builder);
|
|
53
|
+
}
|
|
54
|
+
unpack() {
|
|
55
|
+
return new ReadProvidersQueryResponseT((this.providers() !== null ? this.providers().unpack() : null));
|
|
56
|
+
}
|
|
57
|
+
unpackTo(_o) {
|
|
58
|
+
_o.providers = (this.providers() !== null ? this.providers().unpack() : null);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export class ReadProvidersQueryResponseT {
|
|
62
|
+
constructor(providers = null) {
|
|
63
|
+
this.providers = providers;
|
|
64
|
+
}
|
|
65
|
+
pack(builder) {
|
|
66
|
+
const providers = (this.providers !== null ? this.providers.pack(builder) : 0);
|
|
67
|
+
return ReadProvidersQueryResponse.createReadProvidersQueryResponse(builder, providers);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
/**
|
|
5
|
+
* A query that requests a list of variables from a single provider.
|
|
6
|
+
*
|
|
7
|
+
* The returned variables can be filtered using an array of IDs.
|
|
8
|
+
*/
|
|
9
|
+
export class ReadVariablesQueryRequest {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.bb = null;
|
|
12
|
+
this.bb_pos = 0;
|
|
13
|
+
}
|
|
14
|
+
__init(i, bb) {
|
|
15
|
+
this.bb_pos = i;
|
|
16
|
+
this.bb = bb;
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
static getRootAsReadVariablesQueryRequest(bb, obj) {
|
|
20
|
+
return (obj || new ReadVariablesQueryRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
+
}
|
|
22
|
+
static getSizePrefixedRootAsReadVariablesQueryRequest(bb, obj) {
|
|
23
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
24
|
+
return (obj || new ReadVariablesQueryRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* An array of IDs which serves as a filter: Only those variables with the given IDs shall be returned by the provider.
|
|
28
|
+
* When no IDs are given, we expect the provider to return all of its variables in the response.
|
|
29
|
+
*/
|
|
30
|
+
ids(index) {
|
|
31
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
32
|
+
return offset ? this.bb.readUint32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0;
|
|
33
|
+
}
|
|
34
|
+
idsLength() {
|
|
35
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
36
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
37
|
+
}
|
|
38
|
+
idsArray() {
|
|
39
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
40
|
+
return offset ? new Uint32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
41
|
+
}
|
|
42
|
+
static startReadVariablesQueryRequest(builder) {
|
|
43
|
+
builder.startObject(1);
|
|
44
|
+
}
|
|
45
|
+
static addIds(builder, idsOffset) {
|
|
46
|
+
builder.addFieldOffset(0, idsOffset, 0);
|
|
47
|
+
}
|
|
48
|
+
static createIdsVector(builder, data) {
|
|
49
|
+
builder.startVector(4, data.length, 4);
|
|
50
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
51
|
+
builder.addInt32(data[i]);
|
|
52
|
+
}
|
|
53
|
+
return builder.endVector();
|
|
54
|
+
}
|
|
55
|
+
static startIdsVector(builder, numElems) {
|
|
56
|
+
builder.startVector(4, numElems, 4);
|
|
57
|
+
}
|
|
58
|
+
static endReadVariablesQueryRequest(builder) {
|
|
59
|
+
const offset = builder.endObject();
|
|
60
|
+
return offset;
|
|
61
|
+
}
|
|
62
|
+
static finishReadVariablesQueryRequestBuffer(builder, offset) {
|
|
63
|
+
builder.finish(offset);
|
|
64
|
+
}
|
|
65
|
+
static finishSizePrefixedReadVariablesQueryRequestBuffer(builder, offset) {
|
|
66
|
+
builder.finish(offset, undefined, true);
|
|
67
|
+
}
|
|
68
|
+
static createReadVariablesQueryRequest(builder, idsOffset) {
|
|
69
|
+
ReadVariablesQueryRequest.startReadVariablesQueryRequest(builder);
|
|
70
|
+
ReadVariablesQueryRequest.addIds(builder, idsOffset);
|
|
71
|
+
return ReadVariablesQueryRequest.endReadVariablesQueryRequest(builder);
|
|
72
|
+
}
|
|
73
|
+
unpack() {
|
|
74
|
+
return new ReadVariablesQueryRequestT(this.bb.createScalarList(this.ids.bind(this), this.idsLength()));
|
|
75
|
+
}
|
|
76
|
+
unpackTo(_o) {
|
|
77
|
+
_o.ids = this.bb.createScalarList(this.ids.bind(this), this.idsLength());
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export class ReadVariablesQueryRequestT {
|
|
81
|
+
constructor(ids = []) {
|
|
82
|
+
this.ids = ids;
|
|
83
|
+
}
|
|
84
|
+
pack(builder) {
|
|
85
|
+
const ids = ReadVariablesQueryRequest.createIdsVector(builder, this.ids);
|
|
86
|
+
return ReadVariablesQueryRequest.createReadVariablesQueryRequest(builder, ids);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
import { VariableList } from '../../../weidmueller/ucontrol/hub/variable-list.js';
|
|
5
|
+
/**
|
|
6
|
+
* A query response that responds to a requested list of provider variables.
|
|
7
|
+
*/
|
|
8
|
+
export class ReadVariablesQueryResponse {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.bb = null;
|
|
11
|
+
this.bb_pos = 0;
|
|
12
|
+
}
|
|
13
|
+
__init(i, bb) {
|
|
14
|
+
this.bb_pos = i;
|
|
15
|
+
this.bb = bb;
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
static getRootAsReadVariablesQueryResponse(bb, obj) {
|
|
19
|
+
return (obj || new ReadVariablesQueryResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
20
|
+
}
|
|
21
|
+
static getSizePrefixedRootAsReadVariablesQueryResponse(bb, obj) {
|
|
22
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
23
|
+
return (obj || new ReadVariablesQueryResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A list of variables that have been requested.
|
|
27
|
+
*/
|
|
28
|
+
variables(obj) {
|
|
29
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
30
|
+
return offset ? (obj || new VariableList()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
31
|
+
}
|
|
32
|
+
static startReadVariablesQueryResponse(builder) {
|
|
33
|
+
builder.startObject(1);
|
|
34
|
+
}
|
|
35
|
+
static addVariables(builder, variablesOffset) {
|
|
36
|
+
builder.addFieldOffset(0, variablesOffset, 0);
|
|
37
|
+
}
|
|
38
|
+
static endReadVariablesQueryResponse(builder) {
|
|
39
|
+
const offset = builder.endObject();
|
|
40
|
+
builder.requiredField(offset, 4); // variables
|
|
41
|
+
return offset;
|
|
42
|
+
}
|
|
43
|
+
static finishReadVariablesQueryResponseBuffer(builder, offset) {
|
|
44
|
+
builder.finish(offset);
|
|
45
|
+
}
|
|
46
|
+
static finishSizePrefixedReadVariablesQueryResponseBuffer(builder, offset) {
|
|
47
|
+
builder.finish(offset, undefined, true);
|
|
48
|
+
}
|
|
49
|
+
static createReadVariablesQueryResponse(builder, variablesOffset) {
|
|
50
|
+
ReadVariablesQueryResponse.startReadVariablesQueryResponse(builder);
|
|
51
|
+
ReadVariablesQueryResponse.addVariables(builder, variablesOffset);
|
|
52
|
+
return ReadVariablesQueryResponse.endReadVariablesQueryResponse(builder);
|
|
53
|
+
}
|
|
54
|
+
unpack() {
|
|
55
|
+
return new ReadVariablesQueryResponseT((this.variables() !== null ? this.variables().unpack() : null));
|
|
56
|
+
}
|
|
57
|
+
unpackTo(_o) {
|
|
58
|
+
_o.variables = (this.variables() !== null ? this.variables().unpack() : null);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export class ReadVariablesQueryResponseT {
|
|
62
|
+
constructor(variables = null) {
|
|
63
|
+
this.variables = variables;
|
|
64
|
+
}
|
|
65
|
+
pack(builder) {
|
|
66
|
+
const variables = (this.variables !== null ? this.variables.pack(builder) : 0);
|
|
67
|
+
return ReadVariablesQueryResponse.createReadVariablesQueryResponse(builder, variables);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
import { State } from '../../../weidmueller/ucontrol/hub/state.js';
|
|
5
|
+
/**
|
|
6
|
+
* An event that describes a state that has just changed.
|
|
7
|
+
*/
|
|
8
|
+
export class StateChangedEvent {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.bb = null;
|
|
11
|
+
this.bb_pos = 0;
|
|
12
|
+
}
|
|
13
|
+
__init(i, bb) {
|
|
14
|
+
this.bb_pos = i;
|
|
15
|
+
this.bb = bb;
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
static getRootAsStateChangedEvent(bb, obj) {
|
|
19
|
+
return (obj || new StateChangedEvent()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
20
|
+
}
|
|
21
|
+
static getSizePrefixedRootAsStateChangedEvent(bb, obj) {
|
|
22
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
23
|
+
return (obj || new StateChangedEvent()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A state that has just been changed.
|
|
27
|
+
*/
|
|
28
|
+
state() {
|
|
29
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
30
|
+
return offset ? this.bb.readInt8(this.bb_pos + offset) : State.UNSPECIFIED;
|
|
31
|
+
}
|
|
32
|
+
static startStateChangedEvent(builder) {
|
|
33
|
+
builder.startObject(1);
|
|
34
|
+
}
|
|
35
|
+
static addState(builder, state) {
|
|
36
|
+
builder.addFieldInt8(0, state, State.UNSPECIFIED);
|
|
37
|
+
}
|
|
38
|
+
static endStateChangedEvent(builder) {
|
|
39
|
+
const offset = builder.endObject();
|
|
40
|
+
return offset;
|
|
41
|
+
}
|
|
42
|
+
static finishStateChangedEventBuffer(builder, offset) {
|
|
43
|
+
builder.finish(offset);
|
|
44
|
+
}
|
|
45
|
+
static finishSizePrefixedStateChangedEventBuffer(builder, offset) {
|
|
46
|
+
builder.finish(offset, undefined, true);
|
|
47
|
+
}
|
|
48
|
+
static createStateChangedEvent(builder, state) {
|
|
49
|
+
StateChangedEvent.startStateChangedEvent(builder);
|
|
50
|
+
StateChangedEvent.addState(builder, state);
|
|
51
|
+
return StateChangedEvent.endStateChangedEvent(builder);
|
|
52
|
+
}
|
|
53
|
+
unpack() {
|
|
54
|
+
return new StateChangedEventT(this.state());
|
|
55
|
+
}
|
|
56
|
+
unpackTo(_o) {
|
|
57
|
+
_o.state = this.state();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export class StateChangedEventT {
|
|
61
|
+
constructor(state = State.UNSPECIFIED) {
|
|
62
|
+
this.state = state;
|
|
63
|
+
}
|
|
64
|
+
pack(builder) {
|
|
65
|
+
return StateChangedEvent.createStateChangedEvent(builder, this.state);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
/**
|
|
4
|
+
* A state of a service.
|
|
5
|
+
*
|
|
6
|
+
* The state names are based on
|
|
7
|
+
* [the status names of the systemd services](https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#is-system-running).
|
|
8
|
+
*/
|
|
9
|
+
export var State;
|
|
10
|
+
(function (State) {
|
|
11
|
+
State[State["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
12
|
+
State[State["RUNNING"] = 1] = "RUNNING";
|
|
13
|
+
State[State["STOPPING"] = 2] = "STOPPING";
|
|
14
|
+
})(State || (State = {}));
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/**
|
|
3
|
+
* A timestamp measured by the number of nanoseconds that have elapsed
|
|
4
|
+
* since 00:00:00 UTC on 1 January 1970, which is referred to as the Unix
|
|
5
|
+
* epoch, without adjustments made due to leap seconds.
|
|
6
|
+
*
|
|
7
|
+
* Based on google protobuf timestamp definition: <https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/timestamp.proto>
|
|
8
|
+
*/
|
|
9
|
+
export class Timestamp {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.bb = null;
|
|
12
|
+
this.bb_pos = 0;
|
|
13
|
+
}
|
|
14
|
+
__init(i, bb) {
|
|
15
|
+
this.bb_pos = i;
|
|
16
|
+
this.bb = bb;
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Represents seconds of UTC time since Unix epoch
|
|
21
|
+
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
|
22
|
+
* 9999-12-31T23:59:59Z inclusive.
|
|
23
|
+
*/
|
|
24
|
+
seconds() {
|
|
25
|
+
return this.bb.readInt64(this.bb_pos);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Non-negative fractions of a second at nanosecond resolution. Negative
|
|
29
|
+
* second values with fractions must still have non-negative nanos values
|
|
30
|
+
* that count forward in time. Must be from 0 to 999,999,999
|
|
31
|
+
* inclusive.
|
|
32
|
+
*/
|
|
33
|
+
nanos() {
|
|
34
|
+
return this.bb.readInt32(this.bb_pos + 8);
|
|
35
|
+
}
|
|
36
|
+
static sizeOf() {
|
|
37
|
+
return 16;
|
|
38
|
+
}
|
|
39
|
+
static createTimestamp(builder, seconds, nanos) {
|
|
40
|
+
builder.prep(8, 16);
|
|
41
|
+
builder.pad(4);
|
|
42
|
+
builder.writeInt32(nanos);
|
|
43
|
+
builder.writeInt64(BigInt(seconds ?? 0));
|
|
44
|
+
return builder.offset();
|
|
45
|
+
}
|
|
46
|
+
unpack() {
|
|
47
|
+
return new TimestampT(this.seconds(), this.nanos());
|
|
48
|
+
}
|
|
49
|
+
unpackTo(_o) {
|
|
50
|
+
_o.seconds = this.seconds();
|
|
51
|
+
_o.nanos = this.nanos();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export class TimestampT {
|
|
55
|
+
constructor(seconds = BigInt('0'), nanos = 0) {
|
|
56
|
+
this.seconds = seconds;
|
|
57
|
+
this.nanos = nanos;
|
|
58
|
+
}
|
|
59
|
+
pack(builder) {
|
|
60
|
+
return Timestamp.createTimestamp(builder, this.seconds, this.nanos);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
export class Uuid {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.bb = null;
|
|
5
|
+
this.bb_pos = 0;
|
|
6
|
+
}
|
|
7
|
+
__init(i, bb) {
|
|
8
|
+
this.bb_pos = i;
|
|
9
|
+
this.bb = bb;
|
|
10
|
+
return this;
|
|
11
|
+
}
|
|
12
|
+
upper() {
|
|
13
|
+
return this.bb.readUint64(this.bb_pos);
|
|
14
|
+
}
|
|
15
|
+
lower() {
|
|
16
|
+
return this.bb.readUint64(this.bb_pos + 8);
|
|
17
|
+
}
|
|
18
|
+
static sizeOf() {
|
|
19
|
+
return 16;
|
|
20
|
+
}
|
|
21
|
+
static createUuid(builder, upper, lower) {
|
|
22
|
+
builder.prep(8, 16);
|
|
23
|
+
builder.writeInt64(BigInt(lower ?? 0));
|
|
24
|
+
builder.writeInt64(BigInt(upper ?? 0));
|
|
25
|
+
return builder.offset();
|
|
26
|
+
}
|
|
27
|
+
unpack() {
|
|
28
|
+
return new UuidT(this.upper(), this.lower());
|
|
29
|
+
}
|
|
30
|
+
unpackTo(_o) {
|
|
31
|
+
_o.upper = this.upper();
|
|
32
|
+
_o.lower = this.lower();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export class UuidT {
|
|
36
|
+
constructor(upper = BigInt('0'), lower = BigInt('0')) {
|
|
37
|
+
this.upper = upper;
|
|
38
|
+
this.lower = lower;
|
|
39
|
+
}
|
|
40
|
+
pack(builder) {
|
|
41
|
+
return Uuid.createUuid(builder, this.upper, this.lower);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
/**
|
|
4
|
+
* The access type of a variable.
|
|
5
|
+
*/
|
|
6
|
+
export var VariableAccessType;
|
|
7
|
+
(function (VariableAccessType) {
|
|
8
|
+
VariableAccessType[VariableAccessType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
9
|
+
/**
|
|
10
|
+
* Consumers can only read the variable.
|
|
11
|
+
*/
|
|
12
|
+
VariableAccessType[VariableAccessType["READ_ONLY"] = 1] = "READ_ONLY";
|
|
13
|
+
/**
|
|
14
|
+
* Consumers can read and write the variable.
|
|
15
|
+
*/
|
|
16
|
+
VariableAccessType[VariableAccessType["READ_WRITE"] = 2] = "READ_WRITE";
|
|
17
|
+
})(VariableAccessType || (VariableAccessType = {}));
|