Parent: [4e2ee0] (diff)

Child: [a550af] (diff)

Download this file

data.js    109 lines (95 with data), 2.4 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
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
var template = module.exports;
template.description = 'An empty Device Driver, without any configured ' +
'protocols or datasources';
template.name = "OPC UA (Driver skeleton with OPC UA support, Beta)";
template.type='driver';
template.category='generic';
template.package = {
'version': '1.0.0'
};
template.common = {
};
// Swagger file location in 'files' folder
template.swagger = '/swagger/Driver_v2.yaml';
template.files = [{
src: 'drivercomponent/opc_ua.js',
destination: 'common/driverImplementation/opc_ua.js'
},{
src: 'boot/create-sample-models.js',
destination: 'server/boot/create-sample-models.js'
},{
src: 'models/sensor.js',
destination: 'common/models/sensor.js'
},{
src: 'models/device.js',
destination: 'common/models/device.js'
},{
src: 'server/datasources.json',
destination: 'server/datasources.json'
},{
src: 'server/model-config.json',
destination: 'server/model-config.json'
},{
src: 'pubsub/index.js',
destination: 'common/pubsub/index.js'
}];
//Inquirer prompts
template.prompts = {
questions: [{
type: 'input',
name: 'deviceName',
message: "Provide a name for the device (eg. Device1)",
default: "Device1"
},
{
type: 'input',
name: 'resourcepath',
message: "Provide a url to the opc server: ex. opc.tcp://127.0.0.1:49320",
default: "opc.tcp://127.0.0.1:49320"
},{
type: 'input',
name: 'sensorName',
message: "Provide a name for the sensor (eg. Sensor1)",
default: "Sensor1"
},{
type: 'input',
name: 'namespace',
message: "Provide the opc namespace of the node (eg. 2)",
default: "2"
},{
type: 'input',
name: 'nodeId',
message: "Provide the OPC nodeId of the node (eg. Channel1.Device1.EstadoTS)",
default: "Channel1.Device1.EstadoTS"
}],
vars: [{
forQuestion: 'deviceName',
name: 'deviceName'
},{
forQuestion: 'resourcepath',
name: 'resourcepath'
},{
forQuestion: 'sensorName',
name: 'sensorName'
},{
forQuestion: 'namespace',
name: 'ns'
},{
forQuestion: 'nodeId',
name: 'nodeId'
}]
};
template.dependencies = {
"math-expression-evaluator": "^1.2.17",
"mocha": "^4.0.1",
"node-opcua": "0.3.0"
};
template.devDependencies = {
"jenkins-mocha": "^6.0.0",
"mocha": "^4.0.1",
"nsp": "^2.1.0",
"should": "^13.1.3",
"supertest": "^3.0.0"
};
template.transformstream = function () {
};