node-opcua-transport 2.52.0 → 2.56.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.
Files changed (42) hide show
  1. package/.mocharc.yml +10 -10
  2. package/LICENSE +20 -20
  3. package/dist/source/AcknowledgeMessage.js +5 -5
  4. package/dist/source/AcknowledgeMessage.js.map +1 -1
  5. package/dist/source/TCPErrorMessage.js.map +1 -1
  6. package/dist/source/client_tcp_transport.d.ts +3 -3
  7. package/dist/source/client_tcp_transport.js +2 -2
  8. package/dist/source/client_tcp_transport.js.map +1 -1
  9. package/dist/source/server_tcp_transport.d.ts +3 -0
  10. package/dist/source/server_tcp_transport.js +2 -7
  11. package/dist/source/server_tcp_transport.js.map +1 -1
  12. package/dist/source/tools.d.ts +1 -1
  13. package/dist/source/tools.js +4 -4
  14. package/dist/source/tools.js.map +1 -1
  15. package/dist/source/utils.js +1 -1
  16. package/dist/source/utils.js.map +1 -1
  17. package/dist/test-fixtures/fixture_full_tcp_packets.js +8 -8
  18. package/dist/test-fixtures/fixture_full_tcp_packets.js.map +1 -1
  19. package/dist/test_helpers/direct_transport.d.ts +1 -1
  20. package/dist/test_helpers/direct_transport.js.map +1 -1
  21. package/dist/test_helpers/fake_server.d.ts +2 -2
  22. package/dist/test_helpers/fake_server.js +1 -1
  23. package/dist/test_helpers/fake_server.js.map +1 -1
  24. package/dist/test_helpers/half_com_channel.js +2 -4
  25. package/dist/test_helpers/half_com_channel.js.map +1 -1
  26. package/dist/test_helpers/socket_transport.js +1 -0
  27. package/dist/test_helpers/socket_transport.js.map +1 -1
  28. package/package.json +18 -16
  29. package/source/AcknowledgeMessage.ts +7 -9
  30. package/source/TCPErrorMessage.ts +5 -4
  31. package/source/client_tcp_transport.ts +366 -366
  32. package/source/index.ts +11 -11
  33. package/source/message_builder_base.ts +2 -2
  34. package/source/server_tcp_transport.ts +11 -12
  35. package/source/tcp_transport.ts +455 -455
  36. package/source/tools.ts +4 -4
  37. package/source/utils.ts +1 -1
  38. package/test_helpers/direct_transport.ts +2 -2
  39. package/test_helpers/fake_server.ts +8 -10
  40. package/test_helpers/half_com_channel.ts +2 -5
  41. package/test_helpers/index.ts +4 -4
  42. package/test_helpers/socket_transport.ts +5 -6
@@ -5,7 +5,8 @@ import { decodeUInt32, encodeUInt32, UInt32 } from "node-opcua-basic-types";
5
5
  import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
6
6
  import {
7
7
  BaseUAObject,
8
- buildStructuredType, check_options_correctness_against_schema,
8
+ buildStructuredType,
9
+ check_options_correctness_against_schema,
9
10
  initialize_field,
10
11
  parameters,
11
12
  StructuredTypeSchema
@@ -46,7 +47,6 @@ interface AcknowledgeMessageOptions {
46
47
  }
47
48
 
48
49
  export class AcknowledgeMessage extends BaseUAObject {
49
-
50
50
  public static possibleFields: string[] = [
51
51
  "protocolVersion",
52
52
  "receiveBufferSize",
@@ -63,7 +63,6 @@ export class AcknowledgeMessage extends BaseUAObject {
63
63
  public maxChunkCount: UInt32;
64
64
 
65
65
  constructor(options?: AcknowledgeMessageOptions) {
66
-
67
66
  options = options || {};
68
67
 
69
68
  super();
@@ -81,7 +80,6 @@ export class AcknowledgeMessage extends BaseUAObject {
81
80
  }
82
81
 
83
82
  public encode(stream: OutputBinaryStream): void {
84
-
85
83
  super.encode(stream);
86
84
  encodeUInt32(this.protocolVersion, stream);
87
85
  encodeUInt32(this.receiveBufferSize, stream);
@@ -102,11 +100,11 @@ export class AcknowledgeMessage extends BaseUAObject {
102
100
 
103
101
  public toString(): string {
104
102
  let str = "";
105
- str += 'protocolVersion = ' + this.protocolVersion +'\n';
106
- str += 'receiveBufferSize = ' + this.receiveBufferSize +'\n';
107
- str += 'sendBufferSize = ' + this.sendBufferSize +'\n';
108
- str += 'maxMessageSize = ' + this.maxMessageSize +'\n';
109
- str += 'maxChunkCount = ' + this.maxChunkCount +'\n';
103
+ str += "protocolVersion = " + this.protocolVersion + "\n";
104
+ str += "receiveBufferSize = " + this.receiveBufferSize + "\n";
105
+ str += "sendBufferSize = " + this.sendBufferSize + "\n";
106
+ str += "maxMessageSize = " + this.maxMessageSize + "\n";
107
+ str += "maxChunkCount = " + this.maxChunkCount + "\n";
110
108
  return str;
111
109
  }
112
110
  }
@@ -5,7 +5,8 @@ import { decodeString, encodeString, UAString } from "node-opcua-basic-types";
5
5
  import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
6
6
  import {
7
7
  BaseUAObject,
8
- buildStructuredType, check_options_correctness_against_schema,
8
+ buildStructuredType,
9
+ check_options_correctness_against_schema,
9
10
  initialize_field,
10
11
  parameters
11
12
  } from "node-opcua-factory";
@@ -19,8 +20,8 @@ const schemaTCPErrorMessage = buildStructuredType({
19
20
  baseType: "BaseUAObject",
20
21
 
21
22
  fields: [
22
- {name: "statusCode", fieldType: "StatusCode"},
23
- {name: "reason", fieldType: "String"} // A more verbose description of the error.
23
+ { name: "statusCode", fieldType: "StatusCode" },
24
+ { name: "reason", fieldType: "String" } // A more verbose description of the error.
24
25
  ]
25
26
  });
26
27
 
@@ -28,7 +29,7 @@ export class TCPErrorMessage extends BaseUAObject {
28
29
  public static possibleFields: string[] = ["statusCode", "reason"];
29
30
  public statusCode: StatusCode;
30
31
  public reason: UAString;
31
- constructor(options?: { statusCode?: StatusCode, reason?: string}) {
32
+ constructor(options?: { statusCode?: StatusCode; reason?: string }) {
32
33
  options = options || {};
33
34
  const schema = schemaTCPErrorMessage;
34
35