forked from mathiask88/node-snap7
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode-snap7.js
More file actions
54 lines (41 loc) · 1.96 KB
/
node-snap7.js
File metadata and controls
54 lines (41 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Copyright (c) 2015, Mathias Küsel
* MIT License <https://github.com/mathiask88/node-snap7/blob/master/LICENSE>
*/
module.exports = snap7 = require('bindings')('node_snap7.node');
snap7.S7Client.prototype.DBRead = function (dbNumber, start, size, cb) {
return this.ReadArea(this.S7AreaDB, dbNumber, start, size, this.S7WLByte, cb);
}
snap7.S7Client.prototype.DBWrite = function (dbNumber, start, size, buf, cb) {
return this.WriteArea(this.S7AreaDB, dbNumber, start, size, this.S7WLByte, buf, cb);
}
snap7.S7Client.prototype.MBRead = function (start, size, cb) {
return this.ReadArea(this.S7AreaMK, 0, start, size, this.S7WLByte, cb);
}
snap7.S7Client.prototype.MBWrite = function (start, size, buf, cb) {
return this.WriteArea(this.S7AreaMK, 0, start, size, this.S7WLByte, buf, cb);
}
snap7.S7Client.prototype.EBRead = function (start, size, cb) {
return this.ReadArea(this.S7AreaPE, 0, start, size, this.S7WLByte, cb);
}
snap7.S7Client.prototype.EBWrite = function (start, size, buf, cb) {
return this.WriteArea(this.S7AreaPE, 0, start, size, this.S7WLByte, buf, cb);
}
snap7.S7Client.prototype.ABRead = function (start, size, cb) {
return this.ReadArea(this.S7AreaPA, 0, start, size, this.S7WLByte, cb);
}
snap7.S7Client.prototype.ABWrite = function (start, size, buf, cb) {
return this.WriteArea(this.S7AreaPA, 0, start, size, this.S7WLByte, buf, cb);
}
snap7.S7Client.prototype.TMRead = function (start, size, cb) {
return this.ReadArea(this.S7AreaTM, 0, start, size, this.S7WLTimer, cb);
}
snap7.S7Client.prototype.TMWrite = function (start, size, buf, cb) {
return this.WriteArea(this.S7AreaTM, 0, start, size, this.S7WLTimer, buf, cb);
}
snap7.S7Client.prototype.CTRead = function (start, size, cb) {
return this.ReadArea(this.S7AreaCT, 0, start, size, this.S7WLCounter, cb);
}
snap7.S7Client.prototype.CTWrite = function (start, size, buf, cb) {
return this.WriteArea(this.S7AreaCT, 0, start, size, this.S7WLCounter, buf, cb);
}