|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 2.0.0-beta.8 (2020-01-23) |
| 4 | +- Added CIPAttribute.Get() as a helper method for creating a GetAttributeSingle service CIPRequest |
| 5 | + ```javascript |
| 6 | + /** |
| 7 | + * Creates a GetAttributeSingle service CIPRequest for retrieving the device |
| 8 | + * type of Identity object instance 1 |
| 9 | + */ |
| 10 | + const request = CIP.Core.Objects.Identity.InstanceAttribute.DeviceType.Get(1); |
| 11 | + ``` |
| 12 | +- Improved CIPRequest and CIPMultiServiceRequest |
| 13 | + - A CIPRequest can be specified as the data handler for another CIPRequest (see ConnectionManager's UnconnectedSend method) |
| 14 | + - CIPMultiServiceRequest (CIPRequest.Multi) now works |
| 15 | + - Here is an example of two requests inside of a multi service request inside of an unconnected send |
| 16 | + ```javascript |
| 17 | + const { TCP, CIP } = require('../../src'); |
| 18 | + |
| 19 | + const tcpLayer = new TCP('1.2.3.4'); |
| 20 | + const cipLayer = new CIP(tcpLayer); |
| 21 | + |
| 22 | + /** Create an Unconnected Send request */ |
| 23 | + const request = CIP.Core.Objects.ConnectionManager.UnconnectedSend( |
| 24 | + /** multi service request */ |
| 25 | + new CIP.Core.Request.Multi([ |
| 26 | + /** two different GetAttributeSingle requests */ |
| 27 | + CIP.Core.Objects.MessageRouter.InstanceAttribute.ObjectList.Get(1), |
| 28 | + CIP.Core.Objects.Port.InstanceAttribute.Name.Get(1) |
| 29 | + ]), |
| 30 | + /** routing out of port 1 to address 0 */ |
| 31 | + CIP.Core.EPath.Encode(true, [ |
| 32 | + new CIP.Core.EPath.Segments.Port(1, 0) |
| 33 | + ]) |
| 34 | + ); |
| 35 | + |
| 36 | + /** Use the CIP layer to send the unconnected message */ |
| 37 | + const res = await cipLayer.sendRequest(false, request); |
| 38 | + |
| 39 | + /** res.value is an array of response objects (2 responses in this case) */ |
| 40 | + console.log(res.value); |
| 41 | + |
| 42 | + await tcpLayer.close(); |
| 43 | + ``` |
| 44 | +- Fixed CIP Layer sendRequest not propagating errors |
| 45 | + |
3 | 46 | ## 2.0.0-beta.7 (2020-01-22) |
4 | 47 | - The Layers object exported by the package has been removed. |
5 | 48 | ```javascript |
|
77 | 120 | ```javascript |
78 | 121 | let i = 0; |
79 | 122 | logix.listTags(function(tag) { |
80 | | - i++; |
81 | | - console.log(i, tag); |
82 | | - return i < 10; // return true to continue listing tags |
| 123 | + if (tag != null) { |
| 124 | + i++; |
| 125 | + console.log(i, tag); |
| 126 | + return i < 10; // return true to continue listing tags |
| 127 | + } else { |
| 128 | + // tag is null so listing is finished |
| 129 | + } |
83 | 130 | }); |
84 | 131 | ``` |
85 | 132 | - Improved EIP Layer listIdentities timeout handling, it should be much faster to resolve |
|
0 commit comments