aes70 1.6.0 → 1.6.2

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.
Files changed (34) hide show
  1. package/Changelog +30 -0
  2. package/dist/AES70.es5.js +5795 -1
  3. package/package.json +1 -1
  4. package/src/OCP1/encoded_arguments.js +31 -19
  5. package/src/connection.d.ts +5 -0
  6. package/src/controller/ControlClasses/OcaBlock.d.ts +15 -15
  7. package/src/controller/ControlClasses/OcaBlock.js +16 -16
  8. package/src/controller/ControlClasses/OcaControlNetwork.d.ts +5 -0
  9. package/src/controller/ControlClasses/OcaControlNetwork.js +5 -0
  10. package/src/controller/ControlClasses/OcaFilterParametric.d.ts +4 -0
  11. package/src/controller/ControlClasses/OcaFilterParametric.js +5 -0
  12. package/src/controller/ControlClasses/OcaGrouper.d.ts +12 -0
  13. package/src/controller/ControlClasses/OcaGrouper.js +15 -0
  14. package/src/controller/ControlClasses/OcaMediaClockManager.d.ts +4 -0
  15. package/src/controller/ControlClasses/OcaMediaClockManager.js +5 -0
  16. package/src/controller/ControlClasses/OcaMediaTransportNetwork.d.ts +4 -0
  17. package/src/controller/ControlClasses/OcaMediaTransportNetwork.js +5 -0
  18. package/src/controller/ControlClasses/OcaNetworkSignalChannel.d.ts +68 -68
  19. package/src/controller/ControlClasses/OcaNetworkSignalChannel.js +72 -72
  20. package/src/controller/ControlClasses/OcaSecurityManager.d.ts +31 -31
  21. package/src/controller/ControlClasses/OcaSecurityManager.js +29 -29
  22. package/src/controller/ControlClasses/OcaStreamConnector.d.ts +70 -70
  23. package/src/controller/ControlClasses/OcaStreamConnector.js +80 -80
  24. package/src/controller/ControlClasses/OcaStreamNetwork.d.ts +18 -18
  25. package/src/controller/ControlClasses/OcaStreamNetwork.js +49 -49
  26. package/src/controller/ControlClasses/OcaSubscriptionManager.d.ts +13 -13
  27. package/src/controller/ControlClasses/OcaSubscriptionManager.js +12 -12
  28. package/src/controller/base_event.js +2 -2
  29. package/src/controller/client_connection.js +7 -3
  30. package/src/controller/fetch_device_content.js +8 -3
  31. package/src/controller/make_control_class.js +30 -4
  32. package/src/controller/object_base.d.ts +34 -0
  33. package/src/controller/tcp_connection.d.ts +8 -4
  34. package/src/controller/tcp_connection.js +23 -6
@@ -47,45 +47,44 @@ export const OcaStreamConnector = make_control_class(
47
47
  2,
48
48
  OcaAgent,
49
49
  [
50
+ ['GetOwnerNetwork', 3, 1, [], [OcaUint32]],
51
+ ['SetOwnerNetwork', 3, 2, [OcaUint32], []],
52
+ ['GetIDAdvertised', 3, 3, [], [OcaBlob]],
53
+ ['SetIDAdvertised', 3, 4, [OcaBlob], []],
54
+ ['GetSourceOrSink', 3, 5, [], [OcaNetworkMediaSourceOrSink]],
55
+ ['SetSourceOrSink', 3, 6, [OcaNetworkMediaSourceOrSink], []],
50
56
  ['ConnectStream', 3, 7, [OcaStream], [OcaUint16]],
51
57
  ['DisconnectStream', 3, 8, [OcaUint16], []],
52
- ['GetIDAdvertised', 3, 3, [], [OcaBlob]],
53
- ['GetOwnerNetwork', 3, 1, [], [OcaUint32]],
58
+ ['GetStreams', 3, 9, [], [OcaMap(OcaUint16, OcaStream)]],
54
59
  ['GetPins', 3, 10, [], [OcaMap(OcaUint16, OcaUint32)]],
55
- ['GetSourceOrSink', 3, 5, [], [OcaNetworkMediaSourceOrSink]],
56
60
  ['GetStatus', 3, 11, [], [OcaStreamConnectorStatus]],
57
- ['GetStreams', 3, 9, [], [OcaMap(OcaUint16, OcaStream)]],
58
- ['SetIDAdvertised', 3, 4, [OcaBlob], []],
59
- ['SetOwnerNetwork', 3, 2, [OcaUint32], []],
60
- ['SetSourceOrSink', 3, 6, [OcaNetworkMediaSourceOrSink], []],
61
61
  ],
62
62
  [
63
- ['IDAdvertised', [OcaBlob], 3, 2, false, false, null],
64
63
  ['OwnerNetwork', [OcaUint32], 3, 1, false, false, null],
65
- ['Pins', [OcaMap(OcaUint16, OcaUint32)], 3, 5, false, false, null],
64
+ ['IDAdvertised', [OcaBlob], 3, 2, false, false, null],
66
65
  ['SourceOrSink', [OcaNetworkMediaSourceOrSink], 3, 3, false, false, null],
67
- ['Status', [OcaStreamConnectorStatus], 3, 6, false, false, null],
68
66
  ['Streams', [OcaMap(OcaUint16, OcaStream)], 3, 4, false, false, null],
67
+ ['Pins', [OcaMap(OcaUint16, OcaUint32)], 3, 5, false, false, null],
68
+ ['Status', [OcaStreamConnectorStatus], 3, 6, false, false, null],
69
69
  ],
70
70
  []
71
71
  );
72
72
 
73
73
  /**
74
- * Connects a stream to this connector. Return status indicates success of
75
- * operation.
76
- *
77
- * @method OcaStreamConnector#ConnectStream
78
- * @param {IOcaStream} Stream
74
+ * Gets the object number of the **OcaStreamNetwork** object to which this
75
+ * connector belongs. Return status indicates success of operation.
79
76
  *
77
+ * @method OcaStreamConnector#GetOwnerNetwork
80
78
  * @returns {Promise<number>}
81
79
  * A promise which resolves to a single value of type ``number``.
82
80
  */
83
81
  /**
84
- * Disconnects a stream from this connector. Return status indicates success of
85
- * operation.
82
+ * Sets the object number of the **OcaStreamNetwork** object to which this
83
+ * connector belongs. Return status indicates success of operation. Only
84
+ * implemented for reconfigurable devices.
86
85
  *
87
- * @method OcaStreamConnector#DisconnectStream
88
- * @param {number} StreamID
86
+ * @method OcaStreamConnector#SetOwnerNetwork
87
+ * @param {number} Network
89
88
  *
90
89
  * @returns {Promise<void>}
91
90
  */
@@ -98,20 +97,13 @@ export const OcaStreamConnector = make_control_class(
98
97
  * A promise which resolves to a single value of type ``Uint8Array``.
99
98
  */
100
99
  /**
101
- * Gets the object number of the **OcaStreamNetwork** object to which this
102
- * connector belongs. Return status indicates success of operation.
100
+ * Sets the value of the IDAdvertised property. Return status indicates success
101
+ * of operation.
103
102
  *
104
- * @method OcaStreamConnector#GetOwnerNetwork
105
- * @returns {Promise<number>}
106
- * A promise which resolves to a single value of type ``number``.
107
- */
108
- /**
109
- * Gets the list of object numbers of **OcaNetworkSignalChannel** objects
110
- * connected to this connector. Return status indicates success of operation.
103
+ * @method OcaStreamConnector#SetIDAdvertised
104
+ * @param {Uint8Array} IDAdvertised
111
105
  *
112
- * @method OcaStreamConnector#GetPins
113
- * @returns {Promise<Map<number, number>>}
114
- * A promise which resolves to a single value of type ``Map<number, number>``.
106
+ * @returns {Promise<void>}
115
107
  */
116
108
  /**
117
109
  * Gets the value of the SourceOrSink property. Return status indicates success
@@ -122,58 +114,58 @@ export const OcaStreamConnector = make_control_class(
122
114
  * A promise which resolves to a single value of type :class:`OcaNetworkMediaSourceOrSink`.
123
115
  */
124
116
  /**
125
- * Gets the value of the Status property. Return status indicates success of
126
- * operation.
117
+ * Sets the value of the SourceOrSink property. Return status indicates success
118
+ * of operation. Only implemented for reconfigurable devices. Note that this
119
+ * method can only be called when the SignalChannels property is empty, i.e.
120
+ * does not contain any actual channels.
127
121
  *
128
- * @method OcaStreamConnector#GetStatus
129
- * @returns {Promise<OcaStreamConnectorStatus>}
130
- * A promise which resolves to a single value of type :class:`OcaStreamConnectorStatus`.
131
- */
132
- /**
133
- * Gets the map of OcaStream items connected to this connector. Return status
134
- * indicates success of operation.
122
+ * @method OcaStreamConnector#SetSourceOrSink
123
+ * @param {IOcaNetworkMediaSourceOrSink} SourceOrSink
135
124
  *
136
- * @method OcaStreamConnector#GetStreams
137
- * @returns {Promise<Map<number, OcaStream>>}
138
- * A promise which resolves to a single value of type ``Map<number, OcaStream>``.
125
+ * @returns {Promise<void>}
139
126
  */
140
127
  /**
141
- * Sets the value of the IDAdvertised property. Return status indicates success
142
- * of operation.
128
+ * Connects a stream to this connector. Return status indicates success of
129
+ * operation.
143
130
  *
144
- * @method OcaStreamConnector#SetIDAdvertised
145
- * @param {Uint8Array} IDAdvertised
131
+ * @method OcaStreamConnector#ConnectStream
132
+ * @param {IOcaStream} Stream
146
133
  *
147
- * @returns {Promise<void>}
134
+ * @returns {Promise<number>}
135
+ * A promise which resolves to a single value of type ``number``.
148
136
  */
149
137
  /**
150
- * Sets the object number of the **OcaStreamNetwork** object to which this
151
- * connector belongs. Return status indicates success of operation. Only
152
- * implemented for reconfigurable devices.
138
+ * Disconnects a stream from this connector. Return status indicates success of
139
+ * operation.
153
140
  *
154
- * @method OcaStreamConnector#SetOwnerNetwork
155
- * @param {number} Network
141
+ * @method OcaStreamConnector#DisconnectStream
142
+ * @param {number} StreamID
156
143
  *
157
144
  * @returns {Promise<void>}
158
145
  */
159
146
  /**
160
- * Sets the value of the SourceOrSink property. Return status indicates success
161
- * of operation. Only implemented for reconfigurable devices. Note that this
162
- * method can only be called when the SignalChannels property is empty, i.e.
163
- * does not contain any actual channels.
147
+ * Gets the map of OcaStream items connected to this connector. Return status
148
+ * indicates success of operation.
164
149
  *
165
- * @method OcaStreamConnector#SetSourceOrSink
166
- * @param {IOcaNetworkMediaSourceOrSink} SourceOrSink
150
+ * @method OcaStreamConnector#GetStreams
151
+ * @returns {Promise<Map<number, OcaStream>>}
152
+ * A promise which resolves to a single value of type ``Map<number, OcaStream>``.
153
+ */
154
+ /**
155
+ * Gets the list of object numbers of **OcaNetworkSignalChannel** objects
156
+ * connected to this connector. Return status indicates success of operation.
167
157
  *
168
- * @returns {Promise<void>}
158
+ * @method OcaStreamConnector#GetPins
159
+ * @returns {Promise<Map<number, number>>}
160
+ * A promise which resolves to a single value of type ``Map<number, number>``.
169
161
  */
170
162
  /**
171
- * This event is emitted when the property ``IDAdvertised`` changes in the remote object.
172
- * The property ``IDAdvertised`` is described in the AES70 standard as follows.
173
- * Character name or binary identifier of this connector. This ID is advertised
174
- * on the network to be found by other devices' discovery processes.
163
+ * Gets the value of the Status property. Return status indicates success of
164
+ * operation.
175
165
  *
176
- * @member {PropertyEvent<Uint8Array>} OcaStreamConnector#OnIDAdvertisedChanged
166
+ * @method OcaStreamConnector#GetStatus
167
+ * @returns {Promise<OcaStreamConnectorStatus>}
168
+ * A promise which resolves to a single value of type :class:`OcaStreamConnectorStatus`.
177
169
  */
178
170
  /**
179
171
  * This event is emitted when the property ``OwnerNetwork`` changes in the remote object.
@@ -188,15 +180,12 @@ export const OcaStreamConnector = make_control_class(
188
180
  * @member {PropertyEvent<number>} OcaStreamConnector#OnOwnerNetworkChanged
189
181
  */
190
182
  /**
191
- * This event is emitted when the property ``Pins`` changes in the remote object.
192
- * The property ``Pins`` is described in the AES70 standard as follows.
193
- * The map of connector pin indexes to **OcaNetworkSignalChannel[Source|Sink]**
194
- * objects collected by this connector. The pin indexes are fixed indexes 1 to
195
- * n, where n is the number of channels the connector accommodates (determined
196
- * when the connector is created). If a certain pin in the connector is
197
- * currently not attached the OcaONo of that index is 0.
183
+ * This event is emitted when the property ``IDAdvertised`` changes in the remote object.
184
+ * The property ``IDAdvertised`` is described in the AES70 standard as follows.
185
+ * Character name or binary identifier of this connector. This ID is advertised
186
+ * on the network to be found by other devices' discovery processes.
198
187
  *
199
- * @member {PropertyEvent<Map<number, number>>} OcaStreamConnector#OnPinsChanged
188
+ * @member {PropertyEvent<Uint8Array>} OcaStreamConnector#OnIDAdvertisedChanged
200
189
  */
201
190
  /**
202
191
  * This event is emitted when the property ``SourceOrSink`` changes in the remote object.
@@ -206,13 +195,6 @@ export const OcaStreamConnector = make_control_class(
206
195
  *
207
196
  * @member {PropertyEvent<OcaNetworkMediaSourceOrSink>} OcaStreamConnector#OnSourceOrSinkChanged
208
197
  */
209
- /**
210
- * This event is emitted when the property ``Status`` changes in the remote object.
211
- * The property ``Status`` is described in the AES70 standard as follows.
212
- * Status of this terminus.
213
- *
214
- * @member {PropertyEvent<OcaStreamConnectorStatus>} OcaStreamConnector#OnStatusChanged
215
- */
216
198
  /**
217
199
  * This event is emitted when the property ``Streams`` changes in the remote object.
218
200
  * The property ``Streams`` is described in the AES70 standard as follows.
@@ -221,3 +203,21 @@ export const OcaStreamConnector = make_control_class(
221
203
  *
222
204
  * @member {PropertyEvent<Map<number, OcaStream>>} OcaStreamConnector#OnStreamsChanged
223
205
  */
206
+ /**
207
+ * This event is emitted when the property ``Pins`` changes in the remote object.
208
+ * The property ``Pins`` is described in the AES70 standard as follows.
209
+ * The map of connector pin indexes to **OcaNetworkSignalChannel[Source|Sink]**
210
+ * objects collected by this connector. The pin indexes are fixed indexes 1 to
211
+ * n, where n is the number of channels the connector accommodates (determined
212
+ * when the connector is created). If a certain pin in the connector is
213
+ * currently not attached the OcaONo of that index is 0.
214
+ *
215
+ * @member {PropertyEvent<Map<number, number>>} OcaStreamConnector#OnPinsChanged
216
+ */
217
+ /**
218
+ * This event is emitted when the property ``Status`` changes in the remote object.
219
+ * The property ``Status`` is described in the AES70 standard as follows.
220
+ * Status of this terminus.
221
+ *
222
+ * @member {PropertyEvent<OcaStreamConnectorStatus>} OcaStreamConnector#OnStatusChanged
223
+ */
@@ -23,14 +23,14 @@ import { OcaAgent } from './OcaAgent';
23
23
  */
24
24
  export declare class OcaStreamNetwork extends OcaAgent {
25
25
  /**
26
- * This event is emitted whenever ControlProtocol changes.
26
+ * This event is emitted whenever IDAdvertised changes.
27
27
  */
28
- OnControlProtocolChanged: PropertyEvent<OcaNetworkControlProtocol>;
28
+ OnIDAdvertisedChanged: PropertyEvent<Uint8Array>;
29
29
 
30
30
  /**
31
- * This event is emitted whenever IDAdvertised changes.
31
+ * This event is emitted whenever ControlProtocol changes.
32
32
  */
33
- OnIDAdvertisedChanged: PropertyEvent<Uint8Array>;
33
+ OnControlProtocolChanged: PropertyEvent<OcaNetworkControlProtocol>;
34
34
 
35
35
  /**
36
36
  * This event is emitted whenever MediaProtocol changes.
@@ -38,39 +38,39 @@ export declare class OcaStreamNetwork extends OcaAgent {
38
38
  OnMediaProtocolChanged: PropertyEvent<OcaNetworkMediaProtocol>;
39
39
 
40
40
  /**
41
- * This event is emitted whenever SignalChannelsSink changes.
41
+ * This event is emitted whenever Status changes.
42
42
  */
43
- OnSignalChannelsSinkChanged: PropertyEvent<number[]>;
43
+ OnStatusChanged: PropertyEvent<OcaNetworkStatus>;
44
44
 
45
45
  /**
46
- * This event is emitted whenever SignalChannelsSource changes.
46
+ * This event is emitted whenever SystemInterfaces changes.
47
47
  */
48
- OnSignalChannelsSourceChanged: PropertyEvent<number[]>;
48
+ OnSystemInterfacesChanged: PropertyEvent<OcaNetworkSystemInterfaceID[]>;
49
49
 
50
50
  /**
51
- * This event is emitted whenever Statistics changes.
51
+ * This event is emitted whenever StreamConnectorsSource changes.
52
52
  */
53
- OnStatisticsChanged: PropertyEvent<OcaNetworkStatistics>;
53
+ OnStreamConnectorsSourceChanged: PropertyEvent<number[]>;
54
54
 
55
55
  /**
56
- * This event is emitted whenever Status changes.
56
+ * This event is emitted whenever StreamConnectorsSink changes.
57
57
  */
58
- OnStatusChanged: PropertyEvent<OcaNetworkStatus>;
58
+ OnStreamConnectorsSinkChanged: PropertyEvent<number[]>;
59
59
 
60
60
  /**
61
- * This event is emitted whenever StreamConnectorsSink changes.
61
+ * This event is emitted whenever SignalChannelsSource changes.
62
62
  */
63
- OnStreamConnectorsSinkChanged: PropertyEvent<number[]>;
63
+ OnSignalChannelsSourceChanged: PropertyEvent<number[]>;
64
64
 
65
65
  /**
66
- * This event is emitted whenever StreamConnectorsSource changes.
66
+ * This event is emitted whenever SignalChannelsSink changes.
67
67
  */
68
- OnStreamConnectorsSourceChanged: PropertyEvent<number[]>;
68
+ OnSignalChannelsSinkChanged: PropertyEvent<number[]>;
69
69
 
70
70
  /**
71
- * This event is emitted whenever SystemInterfaces changes.
71
+ * This event is emitted whenever Statistics changes.
72
72
  */
73
- OnSystemInterfacesChanged: PropertyEvent<OcaNetworkSystemInterfaceID[]>;
73
+ OnStatisticsChanged: PropertyEvent<OcaNetworkStatistics>;
74
74
 
75
75
  constructor(objectNumber: number, device: RemoteDevice);
76
76
 
@@ -49,16 +49,11 @@ export const OcaStreamNetwork = make_control_class(
49
49
  ['Shutdown', 3, 20, [], []],
50
50
  ],
51
51
  [
52
- ['ControlProtocol', [OcaNetworkControlProtocol], 3, 3, false, false, null],
53
- ['IDAdvertised', [OcaBlob], 3, 2, false, false, null],
54
52
  ['LinkType', [OcaNetworkLinkType], 3, 1, true, false, null],
53
+ ['IDAdvertised', [OcaBlob], 3, 2, false, false, null],
54
+ ['ControlProtocol', [OcaNetworkControlProtocol], 3, 3, false, false, null],
55
55
  ['MediaProtocol', [OcaNetworkMediaProtocol], 3, 4, false, false, null],
56
- ['SignalChannelsSink', [OcaList(OcaUint32)], 3, 10, false, false, null],
57
- ['SignalChannelsSource', [OcaList(OcaUint32)], 3, 9, false, false, null],
58
- ['Statistics', [OcaNetworkStatistics], 3, 11, false, false, null],
59
56
  ['Status', [OcaNetworkStatus], 3, 5, false, false, null],
60
- ['StreamConnectorsSink', [OcaList(OcaUint32)], 3, 8, false, false, null],
61
- ['StreamConnectorsSource', [OcaList(OcaUint32)], 3, 7, false, false, null],
62
57
  [
63
58
  'SystemInterfaces',
64
59
  [OcaList(OcaNetworkSystemInterfaceID)],
@@ -68,6 +63,11 @@ export const OcaStreamNetwork = make_control_class(
68
63
  false,
69
64
  null,
70
65
  ],
66
+ ['StreamConnectorsSource', [OcaList(OcaUint32)], 3, 7, false, false, null],
67
+ ['StreamConnectorsSink', [OcaList(OcaUint32)], 3, 8, false, false, null],
68
+ ['SignalChannelsSource', [OcaList(OcaUint32)], 3, 9, false, false, null],
69
+ ['SignalChannelsSink', [OcaList(OcaUint32)], 3, 10, false, false, null],
70
+ ['Statistics', [OcaNetworkStatistics], 3, 11, false, false, null],
71
71
  ],
72
72
  []
73
73
  );
@@ -282,14 +282,6 @@ export const OcaStreamNetwork = make_control_class(
282
282
  * @method OcaStreamNetwork#Shutdown
283
283
  * @returns {Promise<void>}
284
284
  */
285
- /**
286
- * This event is emitted when the property ``ControlProtocol`` changes in the remote object.
287
- * The property ``ControlProtocol`` is described in the AES70 standard as follows.
288
- * Type of control protocol used by the network (OCAnn) or NONE if this network
289
- * is not used for control.
290
- *
291
- * @member {PropertyEvent<OcaNetworkControlProtocol>} OcaStreamNetwork#OnControlProtocolChanged
292
- */
293
285
  /**
294
286
  * This event is emitted when the property ``IDAdvertised`` changes in the remote object.
295
287
  * The property ``IDAdvertised`` is described in the AES70 standard as follows.
@@ -298,6 +290,14 @@ export const OcaStreamNetwork = make_control_class(
298
290
  *
299
291
  * @member {PropertyEvent<Uint8Array>} OcaStreamNetwork#OnIDAdvertisedChanged
300
292
  */
293
+ /**
294
+ * This event is emitted when the property ``ControlProtocol`` changes in the remote object.
295
+ * The property ``ControlProtocol`` is described in the AES70 standard as follows.
296
+ * Type of control protocol used by the network (OCAnn) or NONE if this network
297
+ * is not used for control.
298
+ *
299
+ * @member {PropertyEvent<OcaNetworkControlProtocol>} OcaStreamNetwork#OnControlProtocolChanged
300
+ */
301
301
  /**
302
302
  * This event is emitted when the property ``MediaProtocol`` changes in the remote object.
303
303
  * The property ``MediaProtocol`` is described in the AES70 standard as follows.
@@ -307,34 +307,30 @@ export const OcaStreamNetwork = make_control_class(
307
307
  * @member {PropertyEvent<OcaNetworkMediaProtocol>} OcaStreamNetwork#OnMediaProtocolChanged
308
308
  */
309
309
  /**
310
- * This event is emitted when the property ``SignalChannelsSink`` changes in the remote object.
311
- * The property ``SignalChannelsSink`` is described in the AES70 standard as follows.
312
- * List of object numbers of sink **OcaNetworkSignalChannel** objects collected
313
- * by this network.
314
- *
315
- * @member {PropertyEvent<number[]>} OcaStreamNetwork#OnSignalChannelsSinkChanged
316
- */
317
- /**
318
- * This event is emitted when the property ``SignalChannelsSource`` changes in the remote object.
319
- * The property ``SignalChannelsSource`` is described in the AES70 standard as follows.
320
- * List of object numbers of source **OcaNetworkSignalChannel** objects
321
- * collected by this network.
310
+ * This event is emitted when the property ``Status`` changes in the remote object.
311
+ * The property ``Status`` is described in the AES70 standard as follows.
312
+ * Operational status of the network.
322
313
  *
323
- * @member {PropertyEvent<number[]>} OcaStreamNetwork#OnSignalChannelsSourceChanged
314
+ * @member {PropertyEvent<OcaNetworkStatus>} OcaStreamNetwork#OnStatusChanged
324
315
  */
325
316
  /**
326
- * This event is emitted when the property ``Statistics`` changes in the remote object.
327
- * The property ``Statistics`` is described in the AES70 standard as follows.
328
- * Error statistics for this network
317
+ * This event is emitted when the property ``SystemInterfaces`` changes in the remote object.
318
+ * The property ``SystemInterfaces`` is described in the AES70 standard as follows.
319
+ * Collection of identifiers of system interface(s) used by the network. A
320
+ * "system interface" is the system service through which network traffic passes
321
+ * into and out of the device -- e.g. a socket. The identifier format is system
322
+ * and network dependent; for OCA purposes, it is maintained as a
323
+ * variable-length blob which the protocol does not inspect.
329
324
  *
330
- * @member {PropertyEvent<OcaNetworkStatistics>} OcaStreamNetwork#OnStatisticsChanged
325
+ * @member {PropertyEvent<OcaNetworkSystemInterfaceID[]>} OcaStreamNetwork#OnSystemInterfacesChanged
331
326
  */
332
327
  /**
333
- * This event is emitted when the property ``Status`` changes in the remote object.
334
- * The property ``Status`` is described in the AES70 standard as follows.
335
- * Operational status of the network.
328
+ * This event is emitted when the property ``StreamConnectorsSource`` changes in the remote object.
329
+ * The property ``StreamConnectorsSource`` is described in the AES70 standard as follows.
330
+ * List of object numbers of source **OcaStreamConnector** objects collected by
331
+ * this network.
336
332
  *
337
- * @member {PropertyEvent<OcaNetworkStatus>} OcaStreamNetwork#OnStatusChanged
333
+ * @member {PropertyEvent<number[]>} OcaStreamNetwork#OnStreamConnectorsSourceChanged
338
334
  */
339
335
  /**
340
336
  * This event is emitted when the property ``StreamConnectorsSink`` changes in the remote object.
@@ -345,21 +341,25 @@ export const OcaStreamNetwork = make_control_class(
345
341
  * @member {PropertyEvent<number[]>} OcaStreamNetwork#OnStreamConnectorsSinkChanged
346
342
  */
347
343
  /**
348
- * This event is emitted when the property ``StreamConnectorsSource`` changes in the remote object.
349
- * The property ``StreamConnectorsSource`` is described in the AES70 standard as follows.
350
- * List of object numbers of source **OcaStreamConnector** objects collected by
351
- * this network.
344
+ * This event is emitted when the property ``SignalChannelsSource`` changes in the remote object.
345
+ * The property ``SignalChannelsSource`` is described in the AES70 standard as follows.
346
+ * List of object numbers of source **OcaNetworkSignalChannel** objects
347
+ * collected by this network.
352
348
  *
353
- * @member {PropertyEvent<number[]>} OcaStreamNetwork#OnStreamConnectorsSourceChanged
349
+ * @member {PropertyEvent<number[]>} OcaStreamNetwork#OnSignalChannelsSourceChanged
354
350
  */
355
351
  /**
356
- * This event is emitted when the property ``SystemInterfaces`` changes in the remote object.
357
- * The property ``SystemInterfaces`` is described in the AES70 standard as follows.
358
- * Collection of identifiers of system interface(s) used by the network. A
359
- * "system interface" is the system service through which network traffic passes
360
- * into and out of the device -- e.g. a socket. The identifier format is system
361
- * and network dependent; for OCA purposes, it is maintained as a
362
- * variable-length blob which the protocol does not inspect.
352
+ * This event is emitted when the property ``SignalChannelsSink`` changes in the remote object.
353
+ * The property ``SignalChannelsSink`` is described in the AES70 standard as follows.
354
+ * List of object numbers of sink **OcaNetworkSignalChannel** objects collected
355
+ * by this network.
363
356
  *
364
- * @member {PropertyEvent<OcaNetworkSystemInterfaceID[]>} OcaStreamNetwork#OnSystemInterfacesChanged
357
+ * @member {PropertyEvent<number[]>} OcaStreamNetwork#OnSignalChannelsSinkChanged
358
+ */
359
+ /**
360
+ * This event is emitted when the property ``Statistics`` changes in the remote object.
361
+ * The property ``Statistics`` is described in the AES70 standard as follows.
362
+ * Error statistics for this network
363
+ *
364
+ * @member {PropertyEvent<OcaNetworkStatistics>} OcaStreamNetwork#OnStatisticsChanged
365
365
  */
@@ -45,19 +45,6 @@ export declare class OcaSubscriptionManager extends OcaManager {
45
45
 
46
46
  constructor(objectNumber: number, device: RemoteDevice);
47
47
 
48
- /**
49
- * Removes all subscriptions to the given event with the given **OcaMethod**.
50
- * The return value indicates whether the subscription(s) was (were)
51
- * successfully removed.
52
- *
53
- * @method OcaSubscriptionManager#RemoveSubscription
54
- * @param {IOcaEvent} Event
55
- * @param {IOcaMethod} Subscriber
56
- *
57
- * @returns {Promise<void>}
58
- */
59
- RemoveSubscription(Event: IOcaEvent, Subscriber: IOcaMethod): Promise<void>;
60
-
61
48
  /**
62
49
  * Adds a subscription to an event. The subscription is added for the session
63
50
  * on which the command came in. If a subscription identical to the one being
@@ -84,6 +71,19 @@ export declare class OcaSubscriptionManager extends OcaManager {
84
71
  DestinationInformation: Uint8Array
85
72
  ): Promise<void>;
86
73
 
74
+ /**
75
+ * Removes all subscriptions to the given event with the given **OcaMethod**.
76
+ * The return value indicates whether the subscription(s) was (were)
77
+ * successfully removed.
78
+ *
79
+ * @method OcaSubscriptionManager#RemoveSubscription
80
+ * @param {IOcaEvent} Event
81
+ * @param {IOcaMethod} Subscriber
82
+ *
83
+ * @returns {Promise<void>}
84
+ */
85
+ RemoveSubscription(Event: IOcaEvent, Subscriber: IOcaMethod): Promise<void>;
86
+
87
87
  /**
88
88
  * Temporarily disables emitting of event notifications (to all subscribers,
89
89
  * not just to the subscriber calling this method). Events from the
@@ -32,7 +32,6 @@ export const OcaSubscriptionManager = make_control_class(
32
32
  2,
33
33
  OcaManager,
34
34
  [
35
- ['RemoveSubscription', 3, 2, [OcaEvent, OcaMethod], []],
36
35
  [
37
36
  'AddSubscription',
38
37
  3,
@@ -40,6 +39,7 @@ export const OcaSubscriptionManager = make_control_class(
40
39
  [OcaEvent, OcaMethod, OcaBlob, OcaNotificationDeliveryMode, OcaBlob],
41
40
  [],
42
41
  ],
42
+ ['RemoveSubscription', 3, 2, [OcaEvent, OcaMethod], []],
43
43
  ['DisableNotifications', 3, 3, [], []],
44
44
  ['ReEnableNotifications', 3, 4, [], []],
45
45
  [
@@ -72,17 +72,6 @@ export const OcaSubscriptionManager = make_control_class(
72
72
  ]
73
73
  );
74
74
 
75
- /**
76
- * Removes all subscriptions to the given event with the given **OcaMethod**.
77
- * The return value indicates whether the subscription(s) was (were)
78
- * successfully removed.
79
- *
80
- * @method OcaSubscriptionManager#RemoveSubscription
81
- * @param {IOcaEvent} Event
82
- * @param {IOcaMethod} Subscriber
83
- *
84
- * @returns {Promise<void>}
85
- */
86
75
  /**
87
76
  * Adds a subscription to an event. The subscription is added for the session on
88
77
  * which the command came in. If a subscription identical to the one being
@@ -100,6 +89,17 @@ export const OcaSubscriptionManager = make_control_class(
100
89
  *
101
90
  * @returns {Promise<void>}
102
91
  */
92
+ /**
93
+ * Removes all subscriptions to the given event with the given **OcaMethod**.
94
+ * The return value indicates whether the subscription(s) was (were)
95
+ * successfully removed.
96
+ *
97
+ * @method OcaSubscriptionManager#RemoveSubscription
98
+ * @param {IOcaEvent} Event
99
+ * @param {IOcaMethod} Subscriber
100
+ *
101
+ * @returns {Promise<void>}
102
+ */
103
103
  /**
104
104
  * Temporarily disables emitting of event notifications (to all subscribers, not
105
105
  * just to the subscriber calling this method). Events from the Subscription
@@ -53,8 +53,8 @@ export class BaseEvent {
53
53
  * Unsubscribe all event handlers.
54
54
  */
55
55
  Dipose() {
56
- this.handlers.clear();
57
-
58
56
  if (this.handlers.size) this.do_unsubscribe().catch(function () {});
57
+
58
+ this.handlers.clear();
59
59
  }
60
60
  }
@@ -21,13 +21,17 @@ class PendingCommand {
21
21
  this.retries = 0;
22
22
  }
23
23
 
24
+ handleError(error) {
25
+ if (this.stack && error instanceof Error) error.stack = this.stack;
26
+ this.reject(error);
27
+ }
28
+
24
29
  response(o) {
25
30
  const { resolve, reject, returnTypes, command } = this;
26
31
 
27
32
  if (o.status_code !== 0) {
28
33
  const error = new RemoteError(new OcaStatus(o.status_code), command);
29
- if (this.stack) error.stack = this.stack;
30
- reject(error);
34
+ this.handleError(error);
31
35
  } else if (!returnTypes) {
32
36
  resolve(o);
33
37
  } else {
@@ -84,7 +88,7 @@ export class ClientConnection extends Connection {
84
88
  this._pendingCommands = null;
85
89
  const e = new Error('closed');
86
90
  pendingCommands.forEach((pendingCommand, id) => {
87
- pendingCommand.reject(e);
91
+ pendingCommand.handleError(structuredClone(e));
88
92
  });
89
93
  }
90
94
 
@@ -34,8 +34,8 @@ function formatReturnValue(name, value) {
34
34
  if (value instanceof Arguments) {
35
35
  return {
36
36
  [name]: value.item(0),
37
- ['min' + name]: value.item(1),
38
- ['max' + name]: value.item(2),
37
+ ['Min' + name]: value.item(1),
38
+ ['Max' + name]: value.item(2),
39
39
  };
40
40
  } else {
41
41
  value = formatValue(value);
@@ -60,7 +60,12 @@ async function fetchObjectInfo(o) {
60
60
  await Promise.all(
61
61
  o.get_properties().forEach(async (p) => {
62
62
  const { name } = p;
63
- if (name === 'ClassID' || name === 'ClassVersion' || name === 'Owner')
63
+ if (
64
+ name === 'ClassID' ||
65
+ name === 'ClassVersion' ||
66
+ name === 'Owner' ||
67
+ name === 'ObjectNumber'
68
+ )
64
69
  return;
65
70
  if (o instanceof OcaBlock && name === 'Members') return;
66
71
  const getter = p.getter(o);