@ospin/fct-graph
Advanced tools
Comparing version 2.8.1 to 2.9.0
{ | ||
"name": "@ospin/fct-graph", | ||
"author": "danielseehausen", | ||
"version": "2.8.1", | ||
"version": "2.9.0", | ||
"description": "Graph data structure with conditional edges via 'slots' on nodes. Intended to represent physical and virtual functionalities on a device.", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
const Joi = require('joi') | ||
const RegexUtils = require('../utils/RegexUtils') | ||
const Slot = require('../slots/Slot') | ||
const InSlot = require('../slots/InSlot') | ||
@@ -138,4 +139,25 @@ const OutSlot = require('../slots/OutSlot') | ||
_getConnectedFcts(targetSlots = this.slots) { | ||
return targetSlots.reduce((connectedFcts, slot) => { | ||
const fcts = slot.connectedFunctionalities.filter( | ||
connectedFct => connectedFct !== this, | ||
) | ||
return connectedFcts.concat(fcts) | ||
}, []) | ||
} | ||
get connectedFcts() { | ||
return this._getConnectedFcts() | ||
} | ||
get sources() { | ||
return this._getConnectedFcts(this.inSlots) | ||
} | ||
get sinks() { | ||
return this._getConnectedFcts(this.outSlots) | ||
} | ||
} | ||
module.exports = Functionality |
@@ -31,4 +31,10 @@ const ActuatorSeeder = require('./ActuatorSeeder') | ||
static generateCelsiusHeater(data) { | ||
const slots = [ FloatInSlotSeeder.generateCelsiusIn(data) ] | ||
return this.generate({ slots, name: 'Celsius Heater' }) | ||
} | ||
} | ||
module.exports = HeaterActuatorSeeder |
@@ -42,4 +42,8 @@ const ControllerSeeder = require('./ControllerSeeder') | ||
static seedTemperatureControllerCelsius(data) { | ||
return this.seedOne(this.generateTemperatureControllerCelsius(data)) | ||
} | ||
} | ||
module.exports = PIDControllerSeeder |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124646
2541