@robotical/webapp-types 3.17.45 → 3.17.47
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.
|
@@ -17,6 +17,8 @@ export default class RAFT implements RICInterface {
|
|
|
17
17
|
isSerialNoRegisteredInWarranty: boolean | null;
|
|
18
18
|
systemInfo: RaftSystemInfo | null;
|
|
19
19
|
raftStateInfo: RICStateInfo | SimplifiedCogStateInfo | null;
|
|
20
|
+
isVerified: boolean;
|
|
21
|
+
hasVerifiedConnection(): boolean;
|
|
20
22
|
/**
|
|
21
23
|
* Method to get ledLcdColours, to be implemented in child classes.
|
|
22
24
|
*/
|
|
@@ -57,7 +57,11 @@ var RAFT = /** @class */ (function () {
|
|
|
57
57
|
this.systemInfo = null;
|
|
58
58
|
// RAFT State Info
|
|
59
59
|
this.raftStateInfo = null;
|
|
60
|
+
this.isVerified = false;
|
|
60
61
|
}
|
|
62
|
+
RAFT.prototype.hasVerifiedConnection = function () {
|
|
63
|
+
return this.isVerified;
|
|
64
|
+
};
|
|
61
65
|
Object.defineProperty(RAFT.prototype, "ledLcdColours", {
|
|
62
66
|
/**
|
|
63
67
|
* Method to get ledLcdColours, to be implemented in child classes.
|
|
@@ -169,6 +173,15 @@ var RAFT = /** @class */ (function () {
|
|
|
169
173
|
* Receiveds events from the RICConnector
|
|
170
174
|
*/
|
|
171
175
|
RAFT.prototype.receivedRICEvent = function (eventType, eventEnum, eventName, eventData) {
|
|
176
|
+
if (eventType === "conn") {
|
|
177
|
+
if (eventEnum === RaftConnEvent.CONN_VERIFIED_CORRECT) {
|
|
178
|
+
this.isVerified = true;
|
|
179
|
+
}
|
|
180
|
+
else if (eventEnum === RaftConnEvent.CONN_DISCONNECTED ||
|
|
181
|
+
eventEnum === RaftConnEvent.CONN_REJECTED) {
|
|
182
|
+
this.isVerified = false;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
172
185
|
this.publish(eventType, eventEnum, eventName, eventData);
|
|
173
186
|
this.handleRaftEvent(eventType, eventEnum, eventName, eventData);
|
|
174
187
|
};
|