ads-client 1.11.1 → 1.12.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/CHANGELOG.md CHANGED
@@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.12.0] - 28.12.2021
8
+ ### Changed
9
+ - Improving handling of connection losses ([See pull request #78](https://github.com/jisotalo/ads-client/pull/78))
10
+ - Thank you [Hopperpop](https://github.com/Hopperpop) for contribution!
11
+ - Re-design of connection, reconnection and disconnection system
12
+ - Re-design of automatic reconnection
13
+ - Calling `reconnect()` now automatically re-subscribes all existing subscriptions
14
+
15
+ ## [1.11.4] - 17.10.2021
16
+ ### Added
17
+ - Added optional `targetAdsPort` parameter to basic raw read and write methods. ([Pull request #79](https://github.com/jisotalo/ads-client/pull/79))
18
+ - Thank you [Hopperpop](https://github.com/Hopperpop) for contribution!
19
+
20
+ ## [1.11.3] - 08.08.2021
21
+ ### Changed
22
+ - Minor bug fix for unhandled exception ([node-red-contrib-ads-client, issue #12](https://github.com/jisotalo/node-red-contrib-ads-client/issues/12#issuecomment-894711952))
23
+
24
+ ## [1.11.2] - 01.08.2021
25
+ ### Changed
26
+ - Mainly minor bug fixes / adjustments that have been found during Node-RED development
27
+ - Updated operation during sudden disconnect (preventing multiple simultaneous reconnects)
28
+ - Added timeout timer to port registering and unregistering to fix some edge cases
29
+ - Bug fix: Sometimes unhandled exception was thrown during disconnect
30
+
7
31
  ## [1.11.1] - 10.07.2021
8
32
  ### Changed
9
33
  - Tried to fix edge cases where unhandled exception was thrown ([node-red-contrib-ads-client, issue #13](https://github.com/jisotalo/node-red-contrib-ads-client/issues/13))
@@ -13,7 +37,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
37
  - `byteArrayToAmsNedIdStr` --> `byteArrayToAmsNetIdStr`
14
38
  - `amsNedIdStrToByteArray `--> `amsNetIdStrToByteArray`
15
39
 
16
-
17
40
  ## [1.11.0] - 29.06.2021
18
41
  ### Added
19
42
  - Added public access to a method `sendAdsCommand()` for sending raw ADS commands
package/README.md CHANGED
@@ -10,6 +10,8 @@ Beckhoff TwinCAT ADS client library for Node.js (unofficial). Connects to Beckho
10
10
 
11
11
  Coded from scratch using [TwinCAT ADS specification](https://infosys.beckhoff.com/content/1033/tc3_ads_intro/116157835.html?id=124964102706356243) and [Beckhoff.TwinCAT.Ads nuget package](https://www.nuget.org/packages/Beckhoff.TwinCAT.Ads/5.0.0-preview6). Inspiration from similar projects like [node-ads](https://www.npmjs.com/package/node-ads), [beckhoff-js](https://www.npmjs.com/package/beckhoff-js) and [iecstruct](https://www.npmjs.com/package/iecstruct).
12
12
 
13
+ There is automatically created documentation available at https://jisotalo.github.io/ads-client/
14
+
13
15
  # Project status
14
16
  This project is currently "ready". It's maintained actively and used in projects by the author and others.
15
17
 
@@ -20,60 +22,65 @@ Check out the [node-red-contrib-ads-client](https://www.npmjs.com/package/node-r
20
22
 
21
23
 
22
24
  # Table of contents
23
-
24
25
  - [Installation](#installation)
25
- - [Features](#installation)
26
+ - [Features](#features)
26
27
  - [Supported and tested platforms](#supported-and-tested-platforms)
27
28
  - [Connection setups and possibilities](#connection-setups-and-possibilities)
28
- - [Enabling localhost support](#enabling-localhost-support)
29
+ - [Enabling localhost support on TwinCAT 3](#enabling-localhost-support-on-twincat-3)
29
30
  - [IMPORTANT: Writing STRUCT variables](#important-writing-struct-variables)
30
31
  - [IMPORTANT: Things to know when using with TwinCAT 2](#important-things-to-know-when-using-with-twincat-2)
31
32
  - [Getting started](#getting-started)
32
- - [Data types used in getting started](data-types-used-in-getting-started)
33
- - [Creating a new Client instance](#creating-a-new-client-instance)
34
- - [Connecting and disconnecting](#connecting-and-disconnecting)
35
- - [Reading any type PLC variable](#reading-any-type-plc-variable)
36
- - [Example: Reading INT type variable](#example-reading-int-type-variable)
37
- - [Example: Reading STRING type variable](#example-reading-string-type-variable)
38
- - [Example: Reading ENUM type variable](#example-reading-enum-type-variable)
39
- - [Example: Reading STRUCT type variable](#example-reading-struct-type-variable)
40
- - [Example: Reading ARRAY OF INT type variable](#example-reading-array-of-int-type-variable)
41
- - [Example: Reading ARRAY OF STRUCT type variable](#example-reading-array-of-struct-type-variable)
42
- - [Example: Reading FUNCTION BLOCK type variable](#example-reading-function-block-type-variable)
43
- - [Writing any type PLC variable](#writing-any-type-plc-variable)
44
- - [Example: Writing INT type variable](#example-writing-int-type-variable)
45
- - [Example: Writing STRING type variable](#example-writing-string-type-variable)
46
- - [Example: Writing ENUM type variable](#example-writing-enum-type-variable)
47
- - [Example: Writing STRUCT type variable](#example-writing-struct-type-variable)
48
- - [Example: Writing STRUCT type variable (with autoFill parameter)](#example-writing-struct-type-variable-with-autofill-parameter)
49
- - [Example: Writing ARRAY OF INT type variable](#example-writing-array-of-int-type-variable)
50
- - [Example: Writing ARRAY of STRUCT type variable](#example-writing-array-of-struct-type-variable)
51
- - [Example: Writing FUNCTION BLOCK type variable](#example-writing-function-block-type-variable)
52
- - [Subscribing to PLC variables (device notifications)](#subscribing-to-plc-variables-device-notifications)
53
- - [Subcribe to variable value (on-change)](#subcribe-to-variable-value-on-change)
54
- - [Subcribe to variable value (cyclic)](#subcribe-to-variable-value-cyclic)
55
- - [Reading and writing raw data](#reading-and-writing-raw-data)
56
- - [Getting symbol index group, offset and size](#getting-symbol-index-group-offset-and-size)
57
- - [Reading a single raw value](#reading-a-single-raw-value)
58
- - [Writing a single raw value](#writing-a-single-raw-value)
59
- - [Reading multiple raw values](#reading-multiple-raw-values)
60
- - [Writing multiple raw values](#writing-multiple-raw-values)
61
- - [Creating a variable handle and reading a raw value](#creating-a-variable-handle-and-reading-a-raw-value)
62
- - [Creating a variable handle and writing a raw value](#creating-a-variable-handle-and-writing-a-raw-value)
63
- - [Creating and deleting multiple variable handles](#creating-and-deleting-multiple-variable-handles)
64
- - [Converting a raw value to Javascript object](#converting-a-raw-value-to-javascript-object)
65
- - [Converting a Javascript object to raw value](#converting-a-javascript-object-to-raw-value)
66
- - [Reading and writing POINTER TO and REFERENCE TO variables](#reading-and-writing-pointer-to-and-reference-to-variables)
67
- - [Reading a REFERENCE TO value](#reading-a-reference-to-value)
68
- - [Writing a REFERENCE TO value](#writing-a-reference-to-value)
69
- - [Reading a POINTER TO value](#reading-a-pointer-to-value)
70
- - [Writing a POINTER TO value](#writing-a-pointer-to-value)
71
- - [Calling a function block method with parameters using RPC (remote procedure call)](#calling-a-function-block-method-with-parameters-using-rpc-remote-procedure-call)
72
- - [Starting and stopping the PLC](#starting-and-stopping-the-plc)
73
- - [Starting and stopping the TwinCAT system](#starting-and-stopping-the-twincat-system)
74
- - [Sending custom ADS commands](#sending-custom-ads-commands)
75
- - [Available ads-client events](#available-ads-client-events)
33
+ * [Data types used in getting started](#data-types-used-in-getting-started)
34
+ * [Creating a new Client instance](#creating-a-new-client-instance)
35
+ * [Connecting and disconnecting](#connecting-and-disconnecting)
36
+ * [Reading any type PLC variable](#reading-any-type-plc-variable)
37
+ + [Example: Reading `INT` type variable](#example-reading-int-type-variable)
38
+ + [Example: Reading `STRING` type variable](#example-reading-string-type-variable)
39
+ + [Example: Reading `ENUM` type variable](#example-reading-enum-type-variable)
40
+ + [Example: Reading `STRUCT` type variable](#example-reading-struct-type-variable)
41
+ + [Example: Reading `ARRAY OF INT` type variable](#example-reading-array-of-int-type-variable)
42
+ + [Example: Reading `ARRAY OF STRUCT` type variable](#example-reading-array-of-struct-type-variable)
43
+ + [Example: Reading `FUNCTION BLOCK` type variable](#example-reading-function-block-type-variable)
44
+ * [Writing any type PLC variable](#writing-any-type-plc-variable)
45
+ + [Example: Writing `INT` type variable](#example-writing-int-type-variable)
46
+ + [Example: Writing `STRING` type variable](#example-writing-string-type-variable)
47
+ + [Example: Writing `ENUM` type variable](#example-writing-enum-type-variable)
48
+ + [Example: Writing `STRUCT` type variable](#example-writing-struct-type-variable)
49
+ + [Example: Writing `STRUCT` type variable (with autoFill parameter)](#example-writing-struct-type-variable-with-autofill-parameter-)
50
+ + [Example: Writing `ARRAY OF INT` type variable](#example-writing-array-of-int-type-variable)
51
+ + [Example: Writing `ARRAY of STRUCT` type variable](#example-writing-array-of-struct-type-variable)
52
+ + [Example: Writing `FUNCTION BLOCK` type variable](#example-writing-function-block-type-variable)
53
+ * [Subscribing to PLC variables (device notifications)](#subscribing-to-plc-variables-device-notifications-)
54
+ + [Subcribe to variable value (on-change)](#subcribe-to-variable-value-on-change-)
55
+ + [Subcribe to variable value (cyclic)](#subcribe-to-variable-value-cyclic-)
56
+ * [Reading and writing raw data](#reading-and-writing-raw-data)
57
+ + [Getting symbol index group, offset and size](#getting-symbol-index-group-offset-and-size)
58
+ + [Reading a single raw value](#reading-a-single-raw-value)
59
+ + [Writing a single raw value](#writing-a-single-raw-value)
60
+ + [Reading multiple raw values](#reading-multiple-raw-values)
61
+ + [Writing multiple raw values](#writing-multiple-raw-values)
62
+ + [Creating a variable handle and reading a raw value](#creating-a-variable-handle-and-reading-a-raw-value)
63
+ + [Creating a variable handle and writing a raw value](#creating-a-variable-handle-and-writing-a-raw-value)
64
+ + [Creating and deleting multiple variable handles](#creating-and-deleting-multiple-variable-handles)
65
+ + [Converting a raw value to Javascript object](#converting-a-raw-value-to-javascript-object)
66
+ + [Converting a Javascript object to raw value](#converting-a-javascript-object-to-raw-value)
67
+ * [Reading and writing `POINTER TO` and `REFERENCE TO` variables](#reading-and-writing-pointer-to-and-reference-to-variables)
68
+ + [Reading a `REFERENCE TO` value](#reading-a-reference-to-value)
69
+ + [Writing a `REFERENCE TO` value](#writing-a-reference-to-value)
70
+ + [Reading a `POINTER TO` value](#reading-a-pointer-to-value)
71
+ + [Writing a `POINTER TO` value](#writing-a-pointer-to-value)
72
+ * [Calling a function block method with parameters using RPC (remote procedure call)](#calling-a-function-block-method-with-parameters-using-rpc-remote-procedure-call-)
73
+ + [Calling a simple RPC method](#calling-a-simple-rpc-method)
74
+ + [Using structs with RPC methods](#using-structs-with-rpc-methods)
75
+ * [Starting and stopping the PLC](#starting-and-stopping-the-plc)
76
+ * [Starting and stopping the TwinCAT system](#starting-and-stopping-the-twincat-system)
77
+ * [Sending custom ADS commands](#sending-custom-ads-commands)
78
+ - [Available ads-client events](#available-ads-client-events)
79
+ * [Example: Printing to console when PLC runtime state changes:](#example-printing-to-console-when-plc-runtime-state-changes-)
80
+ * [Example: Catching an error that is not directly from a method call](#example-catching-an-error-that-is-not-directly-from-a-method-call)
76
81
  - [Debugging](#debugging)
82
+ * [Enabling debug from code](#enabling-debug-from-code)
83
+ * [Enabling debugging from terminal](#enabling-debugging-from-terminal)
77
84
  - [FAQ](#faq)
78
85
  - [Documentation](#documentation)
79
86
  - [License](#license)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ads-client",
3
- "version": "1.11.1",
3
+ "version": "1.12.0",
4
4
  "description": "Beckhoff TwinCAT ADS client library for Node.js (unofficial). Connects to Beckhoff TwinCAT automation systems using ADS protocol.",
5
5
  "main": "./src/ads-client.js",
6
6
  "scripts": {
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "author": "Jussi Isotalo <j.isotalo91@gmail.com> (https://github.com/jisotalo)",
26
26
  "license": "MIT",
27
- "homepage": "https://jisotalo.github.io/ads-client/",
27
+ "homepage": "https://github.com/jisotalo/ads-client/",
28
28
  "bugs": {
29
29
  "url": "https://github.com/jisotalo/ads-client/issues"
30
30
  },