scheduler-node-models 1.1.30 → 1.1.32

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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface IExploitation {
5
5
  id: string;
6
- exploitation: string;
6
+ explanation: string;
7
7
  sortID: number;
8
8
  }
9
9
  /**
@@ -11,7 +11,7 @@ export interface IExploitation {
11
11
  */
12
12
  export declare class Exploitation implements IExploitation {
13
13
  id: string;
14
- exploitation: string;
14
+ explanation: string;
15
15
  sortID: number;
16
16
  constructor(ex?: IExploitation);
17
17
  compareTo(other?: Exploitation): number;
@@ -6,11 +6,11 @@ exports.Exploitation = void 0;
6
6
  */
7
7
  class Exploitation {
8
8
  id;
9
- exploitation;
9
+ explanation;
10
10
  sortID;
11
11
  constructor(ex) {
12
12
  this.id = (ex) ? ex.id : '';
13
- this.exploitation = (ex) ? ex.exploitation : '';
13
+ this.explanation = (ex) ? ex.explanation : '';
14
14
  this.sortID = (ex) ? ex.sortID : 0;
15
15
  }
16
16
  compareTo(other) {
@@ -56,6 +56,7 @@ class GroundSystemExploitation {
56
56
  */
57
57
  use(platform, sensor, exploit, comm, enclave) {
58
58
  let answer = false;
59
+ console.log(`${this.platformID} - ${this.sensorType} - ${this.exploitation} - ${this.communicationID}`);
59
60
  if (platform.toLowerCase() === this.platformID.toLowerCase()
60
61
  && sensor.toLowerCase() === this.sensorType.toLowerCase()
61
62
  && exploit.toLowerCase() === this.exploitation.toLowerCase()
@@ -129,9 +130,9 @@ class GroundSystem {
129
130
  * @returns boolean value to indicate whether all the conditions are present
130
131
  */
131
132
  useSensor(platform, sensor, exploit, comm, enclave) {
132
- let answer = false;
133
133
  if (this.exploitations.length === 0)
134
134
  return true;
135
+ let answer = false;
135
136
  this.exploitations.forEach(exp => {
136
137
  if (exp.use(platform, sensor, exploit, comm, enclave)) {
137
138
  answer = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scheduler-node-models",
3
- "version": "1.1.30",
3
+ "version": "1.1.32",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "files": [