@aj-shadow/z-abs-complayer-visualizationsequencediagram-client 0.0.0-aj-beta.221
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.
- package/.gitattributes +26 -0
- package/LICENSE.txt +96 -0
- package/README.md +5 -0
- package/npm-shrinkwrap.json +13 -0
- package/package.json +10 -0
- package/project/client/_build/Bundle-CompLayer-VisualizationSequenceDiagram-client.bld +36 -0
- package/project/client/_build/Client-CompLayer-VisualizationSequenceDiagram-client-jsx.bld +10 -0
- package/project/client/_build/Client-CompLayer-VisualizationSequenceDiagram-client.bld +10 -0
- package/project/client/_build/Client-css-CompLayer-VisualizationSequenceDiagram-bundle.bld +9 -0
- package/project/client/_build/z-abs-complayer-visualizationsequencediagram-client.prj +36 -0
- package/project/client/content-decoders/content-decoder.js +22 -0
- package/project/client/content-decoders/image-decoder.js +98 -0
- package/project/client/content-decoders/text-decoder.js +65 -0
- package/project/client/css/seq-dia-buttons.css +40 -0
- package/project/client/css/seq-dia-connection-closed.css +11 -0
- package/project/client/css/seq-dia-connection-closing.css +11 -0
- package/project/client/css/seq-dia-connection-connected-not.css +16 -0
- package/project/client/css/seq-dia-connection-connected.css +5 -0
- package/project/client/css/seq-dia-connection-connecting.css +5 -0
- package/project/client/css/seq-dia-connection-half-closed.css +11 -0
- package/project/client/css/seq-dia-connection-half-closing.css +11 -0
- package/project/client/css/seq-dia-connection-upgrading.css +5 -0
- package/project/client/css/seq-dia-connection.css +27 -0
- package/project/client/css/seq-dia-event-gui.css +86 -0
- package/project/client/css/seq-dia-event-state.css +13 -0
- package/project/client/css/seq-dia-event.css +55 -0
- package/project/client/css/seq-dia-inner.css +246 -0
- package/project/client/css/seq-dia-ip-address-name.css +14 -0
- package/project/client/css/seq-dia-phase.css +90 -0
- package/project/client/css/seq-dia-protocol.css +119 -0
- package/project/client/css/seq-dia-receive.css +5 -0
- package/project/client/css/seq-dia-send.css +5 -0
- package/project/client/css/seq-dia-sequence-diagram.css +10 -0
- package/project/client/css/seq-dia-server-accepted.css +5 -0
- package/project/client/css/seq-dia-server-accepting.css +5 -0
- package/project/client/css/seq-dia-server-attached.css +5 -0
- package/project/client/css/seq-dia-server-detached.css +5 -0
- package/project/client/css/seq-dia-server-not-started.css +5 -0
- package/project/client/css/seq-dia-server-started.css +5 -0
- package/project/client/css/seq-dia-server-starting.css +5 -0
- package/project/client/css/seq-dia-server-stopped.css +5 -0
- package/project/client/css/seq-dia-server-stopping.css +5 -0
- package/project/client/css/seq-dia-stack.css +51 -0
- package/project/client/css/seq-dia-state.css +188 -0
- package/project/client/css/seq-dia-template-msg.css +0 -0
- package/project/client/css/seq-dia-test-case-end.css +45 -0
- package/project/client/css/seq-dia-test-case-header.css +20 -0
- package/project/client/css/seq-dia-test-case-start.css +17 -0
- package/project/client/data/data-seq-dia-client-connected-not.js +69 -0
- package/project/client/data/data-seq-dia-client-connected.js +78 -0
- package/project/client/data/data-seq-dia-client-connecting.js +84 -0
- package/project/client/data/data-seq-dia-client-dns-failure.js +29 -0
- package/project/client/data/data-seq-dia-connection-closed.js +73 -0
- package/project/client/data/data-seq-dia-connection-closing.js +71 -0
- package/project/client/data/data-seq-dia-connection-half-closed.js +73 -0
- package/project/client/data/data-seq-dia-connection-half-closing.js +71 -0
- package/project/client/data/data-seq-dia-connection-upgrading.js +32 -0
- package/project/client/data/data-seq-dia-gui-result.js +48 -0
- package/project/client/data/data-seq-dia-gui.js +78 -0
- package/project/client/data/data-seq-dia-phase-end-result.js +31 -0
- package/project/client/data/data-seq-dia-phase-end.js +57 -0
- package/project/client/data/data-seq-dia-phase-start-result.js +30 -0
- package/project/client/data/data-seq-dia-phase-start.js +57 -0
- package/project/client/data/data-seq-dia-protocol-single-node-result.js +61 -0
- package/project/client/data/data-seq-dia-protocol-single-node.js +81 -0
- package/project/client/data/data-seq-dia-protocol-two-nodes-result.js +91 -0
- package/project/client/data/data-seq-dia-protocol-two-nodes.js +64 -0
- package/project/client/data/data-seq-dia-receive.js +90 -0
- package/project/client/data/data-seq-dia-send.js +90 -0
- package/project/client/data/data-seq-dia-server-accepted.js +70 -0
- package/project/client/data/data-seq-dia-server-accepting.js +61 -0
- package/project/client/data/data-seq-dia-server-attached.js +61 -0
- package/project/client/data/data-seq-dia-server-detached.js +61 -0
- package/project/client/data/data-seq-dia-server-not-started.js +61 -0
- package/project/client/data/data-seq-dia-server-started.js +61 -0
- package/project/client/data/data-seq-dia-server-starting.js +61 -0
- package/project/client/data/data-seq-dia-server-stopped.js +61 -0
- package/project/client/data/data-seq-dia-server-stopping.js +61 -0
- package/project/client/data/data-seq-dia-stack-result.js +40 -0
- package/project/client/data/data-seq-dia-stack.js +73 -0
- package/project/client/data/data-seq-dia-state-result.js +38 -0
- package/project/client/data/data-seq-dia-state.js +70 -0
- package/project/client/data/data-seq-dia-test-case-end-result.js +30 -0
- package/project/client/data/data-seq-dia-test-case-end.js +49 -0
- package/project/client/data/data-seq-dia-test-case-header-result.js +30 -0
- package/project/client/data/data-seq-dia-test-case-header.js +49 -0
- package/project/client/data/data-seq-dia-test-case-start-result.js +30 -0
- package/project/client/data/data-seq-dia-test-case-start.js +50 -0
- package/project/client/logic/analyze.js +41 -0
- package/project/client/logic/cache-array.js +45 -0
- package/project/client/logic/cache-map-double.js +64 -0
- package/project/client/logic/cache-map-shared.js +73 -0
- package/project/client/logic/cache-map.js +48 -0
- package/project/client/logic/cache-type-connection-closed.js +56 -0
- package/project/client/logic/cache-type-connection-closing.js +56 -0
- package/project/client/logic/cache-type-connection-connected.js +58 -0
- package/project/client/logic/cache-type-connection-connecting.js +58 -0
- package/project/client/logic/cache-type-connection-half-closed.js +56 -0
- package/project/client/logic/cache-type-connection-half-closing.js +56 -0
- package/project/client/logic/cache-type-connection-not-connected.js +58 -0
- package/project/client/logic/cache-type-phase-end.js +49 -0
- package/project/client/logic/cache-type-phase-start.js +49 -0
- package/project/client/logic/cache-type-receive.js +58 -0
- package/project/client/logic/cache-type-send.js +58 -0
- package/project/client/logic/cache-type-server-accepted.js +36 -0
- package/project/client/logic/cache-type-server-accepting.js +64 -0
- package/project/client/logic/cache-type-server-attached.js +64 -0
- package/project/client/logic/cache-type-server-detached.js +55 -0
- package/project/client/logic/cache-type-server-not-started.js +64 -0
- package/project/client/logic/cache-type-server-started.js +66 -0
- package/project/client/logic/cache-type-server-starting.js +53 -0
- package/project/client/logic/cache-type-server-stopped.js +64 -0
- package/project/client/logic/cache-type-server-stopping.js +64 -0
- package/project/client/logic/cache-type-stack.js +64 -0
- package/project/client/logic/cache-type-state.js +53 -0
- package/project/client/logic/cache-type-test-case-end.js +30 -0
- package/project/client/logic/cache-type-test-case-header.js +30 -0
- package/project/client/logic/cache-type-test-case-start.js +30 -0
- package/project/client/logic/cache.js +202 -0
- package/project/client/logic/connection-data.js +60 -0
- package/project/client/logic/const.js +207 -0
- package/project/client/logic/content-cache.js +23 -0
- package/project/client/logic/data-log-row.js +24 -0
- package/project/client/logic/filter-size.js +81 -0
- package/project/client/logic/seq-dia-filter.js +496 -0
- package/project/client/logic/shared-template-data.js +62 -0
- package/project/client/react-component/sequence-diagram.jsx +387 -0
- package/project/client/templates/components/component-seq-dia-arrow.js +26 -0
- package/project/client/templates/components/component-seq-dia-caption.js +44 -0
- package/project/client/templates/components/component-seq-dia-envelope.js +188 -0
- package/project/client/templates/components/component-seq-dia-event-info.js +108 -0
- package/project/client/templates/components/component-seq-dia-event-row.js +147 -0
- package/project/client/templates/components/component-seq-dia-protocol.js +314 -0
- package/project/client/templates/components/component-seq-dia-shared.js +58 -0
- package/project/client/templates/template-seq-dia-client-connected-not.js +67 -0
- package/project/client/templates/template-seq-dia-client-connected.js +67 -0
- package/project/client/templates/template-seq-dia-client-connecting.js +71 -0
- package/project/client/templates/template-seq-dia-client-dns-failure.js +82 -0
- package/project/client/templates/template-seq-dia-connection-closed.js +70 -0
- package/project/client/templates/template-seq-dia-connection-closing.js +72 -0
- package/project/client/templates/template-seq-dia-connection-half-closed.js +70 -0
- package/project/client/templates/template-seq-dia-connection-half-closing.js +80 -0
- package/project/client/templates/template-seq-dia-connection-upgraded-not.js +82 -0
- package/project/client/templates/template-seq-dia-connection-upgraded.js +57 -0
- package/project/client/templates/template-seq-dia-connection-upgrading.js +57 -0
- package/project/client/templates/template-seq-dia-gui.js +250 -0
- package/project/client/templates/template-seq-dia-msg.js +500 -0
- package/project/client/templates/template-seq-dia-phase-end.js +59 -0
- package/project/client/templates/template-seq-dia-phase-start.js +59 -0
- package/project/client/templates/template-seq-dia-protocol-base.js +107 -0
- package/project/client/templates/template-seq-dia-receive.js +119 -0
- package/project/client/templates/template-seq-dia-send.js +121 -0
- package/project/client/templates/template-seq-dia-server-accepted.js +61 -0
- package/project/client/templates/template-seq-dia-server-accepting.js +45 -0
- package/project/client/templates/template-seq-dia-server-attached.js +72 -0
- package/project/client/templates/template-seq-dia-server-detached.js +60 -0
- package/project/client/templates/template-seq-dia-server-not-started.js +77 -0
- package/project/client/templates/template-seq-dia-server-started.js +49 -0
- package/project/client/templates/template-seq-dia-server-starting.js +49 -0
- package/project/client/templates/template-seq-dia-server-stopped.js +45 -0
- package/project/client/templates/template-seq-dia-server-stopping.js +45 -0
- package/project/client/templates/template-seq-dia-stack.js +195 -0
- package/project/client/templates/template-seq-dia-state.js +118 -0
- package/project/client/templates/template-seq-dia-test-case-end.js +73 -0
- package/project/client/templates/template-seq-dia-test-case-header.js +70 -0
- package/project/client/templates/template-seq-dia-test-case-start.js +68 -0
- package/project/z-abs-complayer-visualizationsequencediagram-client.tree +171 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMapDouble from './cache-map-double';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypeConnectionHalfClosing {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMapDouble();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMapDouble('connection-half-closing');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
this.key1 = 0;
|
|
17
|
+
this.key2 = 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
get(data) {
|
|
21
|
+
this._setKeys(data);
|
|
22
|
+
return this.elementCache.get(this.key1, this.key2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
set(data, element) {
|
|
26
|
+
this._setKeys(data);
|
|
27
|
+
this.elementCache.set(this.key1, this.key2, element);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
clear() {
|
|
31
|
+
this.elementCache.clear();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_setKeys(data) {
|
|
35
|
+
let pos1 = 0;
|
|
36
|
+
this.key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
37
|
+
let pos2 = 0;
|
|
38
|
+
this.key2 = data.renderNodes | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION));
|
|
39
|
+
#BUILD_DEBUG_START
|
|
40
|
+
if(null == data.localActorIndex || null == data.nbrOfActors || null == data.phaseId || null == data.renderNodes || null == data.reverseDirection || null == data.protocolIndex) {
|
|
41
|
+
console.log('connection-closing ***************************************************', data.localActorIndex, data.nbrOfActors, data.phaseId, data.renderNodes, data.reverseDirection, data.protocolIndex);
|
|
42
|
+
}
|
|
43
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
44
|
+
if(pos1 >= 32) {
|
|
45
|
+
ddb.error('connection-closing key1 exceeds 32 bits. It is:', pos1);
|
|
46
|
+
}
|
|
47
|
+
pos2 += Const.SIZE_REVERSE_DIRECTION;
|
|
48
|
+
if(pos2 >= 32) {
|
|
49
|
+
ddb.error('connection-closing key2 exceeds 32 bits. It is:', pos2);
|
|
50
|
+
}
|
|
51
|
+
#BUILD_DEBUG_STOP
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
module.exports = CacheTypeConnectionHalfClosing;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMapDouble from './cache-map-double';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypeConnectionNotConnected {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMapDouble();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMapDouble('connection-not-connected');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
this.key1 = 0;
|
|
17
|
+
this.key2 = 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
get(data) {
|
|
21
|
+
this._setKeys(data);
|
|
22
|
+
return this.elementCache.get(this.key1, this.key2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
set(data, element) {
|
|
26
|
+
this._setKeys(data);
|
|
27
|
+
this.elementCache.set(this.key1, this.key2, element);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
clear() {
|
|
31
|
+
this.elementCache.clear();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_setKeys(data) {
|
|
35
|
+
let pos1 = 0;
|
|
36
|
+
// 14 + 14 + 3 = 31
|
|
37
|
+
this.key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
38
|
+
let pos2 = 0;
|
|
39
|
+
// 14 + 1 + 1 + 12 + 1 = 29
|
|
40
|
+
this.key2 = data.remoteActorIndex | (data.renderNodes << (pos2 += Const.SIZE_ACTOR_INDEX)) | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
41
|
+
#BUILD_DEBUG_START
|
|
42
|
+
if(null == data.localActorIndex || null == data.nbrOfActors || null == data.phaseId || null == data.remoteActorIndex || null == data.renderNodes || null == data.reverseDirection || null == data.protocolIndex || null == data.renderPosition) {
|
|
43
|
+
console.log('connection-not-connected ***************************************************');
|
|
44
|
+
}
|
|
45
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
46
|
+
if(pos1 >= 32) {
|
|
47
|
+
ddb.error('connection-not-connected key1 exceeds 32 bits. It is:', pos1);
|
|
48
|
+
}
|
|
49
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
50
|
+
if(pos2 >= 32) {
|
|
51
|
+
ddb.error('connection-not-connected key2 exceeds 32 bits. It is:', pos2);
|
|
52
|
+
}
|
|
53
|
+
#BUILD_DEBUG_STOP
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
module.exports = CacheTypeConnectionNotConnected;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMap from './cache-map';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypePhaseEnd {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMap();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMap('phase-end');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
this.key = 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
get(data) {
|
|
20
|
+
this._setKeys(data);
|
|
21
|
+
return this.elementCache.get(this.key);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
set(data, element) {
|
|
25
|
+
this._setKeys(data);
|
|
26
|
+
this.elementCache.set(this.key, element);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
clear() {
|
|
30
|
+
this.elementCache.clear();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
_setKeys(data) {
|
|
34
|
+
let pos = 0;
|
|
35
|
+
this.key = data.nbrOfActors| (data.phaseId << (pos += Const.SIZE_ACTOR_INDEX));
|
|
36
|
+
#BUILD_DEBUG_START
|
|
37
|
+
if(null == data.nbrOfActors || null == data.phaseId) {
|
|
38
|
+
console.log('phase-end ***************************************************', data.nbrOfActors, data.phaseId);
|
|
39
|
+
}
|
|
40
|
+
pos += Const.SIZE_PHASE_ID;
|
|
41
|
+
if(pos >= 32) {
|
|
42
|
+
ddb.error('phase-end key exceeds 32 bits. It is:', pos);
|
|
43
|
+
}
|
|
44
|
+
#BUILD_DEBUG_STOP
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
module.exports = CacheTypePhaseEnd;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMap from './cache-map';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypePhaseStart {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMap();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMap('phase-start');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
this.key = 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
get(data) {
|
|
20
|
+
this._setKeys(data);
|
|
21
|
+
return this.elementCache.get(this.key);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
set(data, element) {
|
|
25
|
+
this._setKeys(data);
|
|
26
|
+
this.elementCache.set(this.key, element);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
clear() {
|
|
30
|
+
this.elementCache.clear();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
_setKeys(data) {
|
|
34
|
+
let pos = 0;
|
|
35
|
+
this.key = data.nbrOfActors| (data.phaseId << (pos += Const.SIZE_ACTOR_INDEX));
|
|
36
|
+
#BUILD_DEBUG_START
|
|
37
|
+
if(null == data.nbrOfActors || null == data.phaseId) {
|
|
38
|
+
console.log('phase-start ***************************************************', data.nbrOfActors, data.phaseId);
|
|
39
|
+
}
|
|
40
|
+
pos += Const.SIZE_PHASE_ID;
|
|
41
|
+
if(pos >= 32) {
|
|
42
|
+
ddb.error('phase-start key exceeds 32 bits. It is:', pos);
|
|
43
|
+
}
|
|
44
|
+
#BUILD_DEBUG_STOP
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
module.exports = CacheTypePhaseStart;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMapShared from './cache-map-shared';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypeReceive {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMapShared();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMapShared('receive');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
this.key1 = 0;
|
|
17
|
+
this.key2 = 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
get(data) {
|
|
21
|
+
this._setKeys(data);
|
|
22
|
+
return this.elementCache.get(data, this.key1, this.key2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
set(data, element) {
|
|
26
|
+
this._setKeys(data);
|
|
27
|
+
this.elementCache.set(data, element, this.key1, this.key2);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
clear() {
|
|
31
|
+
this.elementCache.clear();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_setKeys(data) {
|
|
35
|
+
let pos1 = 0;
|
|
36
|
+
// 14 + 14 + 3 = 31
|
|
37
|
+
this.key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
38
|
+
let pos2 = 0;
|
|
39
|
+
// 14 + 1 + 1 + 12 + 1 = 29
|
|
40
|
+
this.key2 = data.remoteActorIndex | (data.renderNodes << (pos2 += Const.SIZE_ACTOR_INDEX)) | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
41
|
+
#BUILD_DEBUG_START
|
|
42
|
+
if(null == data.localActorIndex || null == data.nbrOfActors || null == data.phaseId || null == data.remoteActorIndex || null == data.renderNodes || null == data.reverseDirection || null == data.protocolIndex || null == data.renderPosition) {
|
|
43
|
+
console.log('receive ***************************************************');
|
|
44
|
+
}
|
|
45
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
46
|
+
if(pos1 >= 32) {
|
|
47
|
+
ddb.error('receive key1 exceeds 32 bits. It is:', pos1);
|
|
48
|
+
}
|
|
49
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
50
|
+
if(pos2 >= 32) {
|
|
51
|
+
ddb.error('receive key2 exceeds 32 bits. It is:', pos2);
|
|
52
|
+
}
|
|
53
|
+
#BUILD_DEBUG_STOP
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
module.exports = CacheTypeReceive;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMapShared from './cache-map-shared';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypeSend {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMapShared();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMapShared('send');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
this.key1 = 0;
|
|
17
|
+
this.key2 = 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
get(data) {
|
|
21
|
+
this._setKeys(data);
|
|
22
|
+
return this.elementCache.get(data, this.key1, this.key2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
set(data, element) {
|
|
26
|
+
this._setKeys(data);
|
|
27
|
+
this.elementCache.set(data, element, this.key1, this.key2);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
clear() {
|
|
31
|
+
this.elementCache.clear();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_setKeys(data) {
|
|
35
|
+
let pos1 = 0;
|
|
36
|
+
// 14 + 14 + 3 = 31
|
|
37
|
+
this.key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
38
|
+
let pos2 = 0;
|
|
39
|
+
// 14 + 1 + 1 + 12 + 1 = 29
|
|
40
|
+
this.key2 = data.remoteActorIndex | (data.renderNodes << (pos2 += Const.SIZE_ACTOR_INDEX)) | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
41
|
+
#BUILD_DEBUG_START
|
|
42
|
+
if(null == data.localActorIndex || null == data.nbrOfActors || null == data.phaseId || null == data.remoteActorIndex || null == data.renderNodes || null == data.reverseDirection || null == data.protocolIndex || null == data.renderPosition) {
|
|
43
|
+
console.log('send ***************************************************');
|
|
44
|
+
}
|
|
45
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
46
|
+
if(pos1 >= 32) {
|
|
47
|
+
ddb.error('send key1 exceeds 32 bits. It is:', pos1);
|
|
48
|
+
}
|
|
49
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
50
|
+
if(pos2 >= 32) {
|
|
51
|
+
ddb.error('send key2 exceeds 32 bits. It is:', pos2);
|
|
52
|
+
}
|
|
53
|
+
#BUILD_DEBUG_STOP
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
module.exports = CacheTypeSend;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMapDouble from './cache-map-double';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypeServerAccepted {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMapDouble();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMapDouble('server-accepted');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
get(data) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
set(data, element) {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
clear() {
|
|
27
|
+
this.elementCache.clear();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
_setKeys(data) {
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
module.exports = CacheTypeServerAccepted;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMapDouble from './cache-map-double';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypeServerAccepting {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMapDouble();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMapDouble('server-accepting');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
get(data) {
|
|
19
|
+
let pos1 = 0;
|
|
20
|
+
const key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
21
|
+
let pos2 = 0;
|
|
22
|
+
const key2 = data.renderNodes | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
23
|
+
#BUILD_DEBUG_START
|
|
24
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
25
|
+
if(pos1 >= 32) {
|
|
26
|
+
ddb.error('getAccepting key1 exceeds 32 bits. It is:', pos1);
|
|
27
|
+
}
|
|
28
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
29
|
+
if(pos2 >= 32) {
|
|
30
|
+
ddb.error('getAccepting key2 exceeds 32 bits. It is:', pos2);
|
|
31
|
+
}
|
|
32
|
+
#BUILD_DEBUG_STOP
|
|
33
|
+
return this.elementCache.get(key1, key2);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
set(data, element) {
|
|
37
|
+
let pos1 = 0;
|
|
38
|
+
const key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
39
|
+
let pos2 = 0;
|
|
40
|
+
const key2 = data.renderNodes | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
41
|
+
#BUILD_DEBUG_START
|
|
42
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
43
|
+
if(pos1 >= 32) {
|
|
44
|
+
ddb.error('setAccepting key1 exceeds 32 bits. It is:', pos1);
|
|
45
|
+
}
|
|
46
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
47
|
+
if(pos2 >= 32) {
|
|
48
|
+
ddb.error('setAccepting key2 exceeds 32 bits. It is:', pos2);
|
|
49
|
+
}
|
|
50
|
+
#BUILD_DEBUG_STOP
|
|
51
|
+
this.elementCache.set(key1, key2, element);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
clear() {
|
|
55
|
+
this.elementCache.clear();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_setKeys(data) {
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
module.exports = CacheTypeServerAccepting;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMapDouble from './cache-map-double';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypeServerAttached {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMapDouble();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMapDouble('server-attached');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
get(data) {
|
|
19
|
+
let pos1 = 0;
|
|
20
|
+
const key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
21
|
+
let pos2 = 0;
|
|
22
|
+
const key2 = data.renderNodes | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
23
|
+
#BUILD_DEBUG_START
|
|
24
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
25
|
+
if(pos1 >= 32) {
|
|
26
|
+
ddb.error('getServerAttached key1 exceeds 32 bits. It is:', pos1);
|
|
27
|
+
}
|
|
28
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
29
|
+
if(pos2 >= 32) {
|
|
30
|
+
ddb.error('getServerAttached key2 exceeds 32 bits. It is:', pos2);
|
|
31
|
+
}
|
|
32
|
+
#BUILD_DEBUG_STOP
|
|
33
|
+
return this.elementCache.get(key1, key2);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
set(data, element) {
|
|
37
|
+
let pos1 = 0;
|
|
38
|
+
const key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
39
|
+
let pos2 = 0;
|
|
40
|
+
const key2 = data.renderNodes | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
41
|
+
#BUILD_DEBUG_START
|
|
42
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
43
|
+
if(pos1 >= 32) {
|
|
44
|
+
ddb.error('setServerAttached key1 exceeds 32 bits. It is:', pos1);
|
|
45
|
+
}
|
|
46
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
47
|
+
if(pos2 >= 32) {
|
|
48
|
+
ddb.error('setServerAttached key2 exceeds 32 bits. It is:', pos2);
|
|
49
|
+
}
|
|
50
|
+
#BUILD_DEBUG_STOP
|
|
51
|
+
this.elementCache.set(key1, key2, element);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
clear() {
|
|
55
|
+
this.elementCache.clear();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_setKeys(data) {
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
module.exports = CacheTypeServerAttached;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMapDouble from './cache-map-double';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypeServerDetached {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMapDouble();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMapDouble('server-detached');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
this.key1 = 0;
|
|
17
|
+
this.key2 = 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
get(data) {
|
|
21
|
+
this._setKeys(data);
|
|
22
|
+
//console.log('GET server-detached', data.localActorIndex, data.nbrOfActors, data.phaseId, '---', data.renderNodes, data.reverseDirection, data.protocolIndex);
|
|
23
|
+
return this.elementCache.get(this.key1, this.key2);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
set(data, element) {
|
|
27
|
+
this._setKeys(data);
|
|
28
|
+
//console.log('SET server-detached', data.localActorIndex, data.nbrOfActors, data.phaseId, '---', data.renderNodes, data.reverseDirection, data.protocolIndex);
|
|
29
|
+
this.elementCache.set(this.key1, this.key2, element);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
clear() {
|
|
33
|
+
this.elementCache.clear();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_setKeys(data) {
|
|
37
|
+
let pos1 = 0;
|
|
38
|
+
this.key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Cache.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Cache.SIZE_NBR_OF_ACTORS));
|
|
39
|
+
let pos2 = 0;
|
|
40
|
+
this.key2 = data.renderNodes | (data.reverseDirection << (pos2 += Cache.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Cache.SIZE_REVERSE_DIRECTION));
|
|
41
|
+
#BUILD_DEBUG_START
|
|
42
|
+
pos1 += Cache.SIZE_PHASE_ID;
|
|
43
|
+
if(pos1 >= 32) {
|
|
44
|
+
ddb.error('server-detached key1 exceeds 32 bits. It is:', pos1);
|
|
45
|
+
}
|
|
46
|
+
pos2 += Cache.SIZE_REVERSE_DIRECTION;
|
|
47
|
+
if(pos2 >= 32) {
|
|
48
|
+
ddb.error('server-detached key2 exceeds 32 bits. It is:', pos2);
|
|
49
|
+
}
|
|
50
|
+
#BUILD_DEBUG_STOP
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
module.exports = CacheTypeServerDetached;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMapDouble from './cache-map-double';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypeServerNotStarted {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMapDouble();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMapDouble('server-not-started');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
get(data) {
|
|
19
|
+
let pos1 = 0;
|
|
20
|
+
const key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
21
|
+
let pos2 = 0;
|
|
22
|
+
const key2 = data.renderNodes | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
23
|
+
#BUILD_DEBUG_START
|
|
24
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
25
|
+
if(pos1 >= 32) {
|
|
26
|
+
ddb.error('getServerNotStarted key1 exceeds 32 bits. It is:', pos1);
|
|
27
|
+
}
|
|
28
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
29
|
+
if(pos2 >= 32) {
|
|
30
|
+
ddb.error('getServerNotStarted key2 exceeds 32 bits. It is:', pos2);
|
|
31
|
+
}
|
|
32
|
+
#BUILD_DEBUG_STOP
|
|
33
|
+
return this.elementCache.get(key1, key2);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
set(data, element) {
|
|
37
|
+
let pos1 = 0;
|
|
38
|
+
const key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
39
|
+
let pos2 = 0;
|
|
40
|
+
const key2 = data.renderNodes | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
41
|
+
#BUILD_DEBUG_START
|
|
42
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
43
|
+
if(pos1 >= 32) {
|
|
44
|
+
ddb.error('setServerNotStarted key1 exceeds 32 bits. It is:', pos1);
|
|
45
|
+
}
|
|
46
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
47
|
+
if(pos2 >= 32) {
|
|
48
|
+
ddb.error('setServerNotStarted key2 exceeds 32 bits. It is:', pos2);
|
|
49
|
+
}
|
|
50
|
+
#BUILD_DEBUG_STOP
|
|
51
|
+
this.elementCache.set(key1, key2, element);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
clear() {
|
|
55
|
+
this.elementCache.clear();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_setKeys(data) {
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
module.exports = CacheTypeServerNotStarted;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import CacheMapDouble from './cache-map-double';
|
|
5
|
+
import Const from './const';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CacheTypeServerStarted {
|
|
9
|
+
constructor() {
|
|
10
|
+
#BUILD_RELEASE_START
|
|
11
|
+
this.elementCache = new CacheMapDouble();
|
|
12
|
+
#BUILD_RELEASE_STOP
|
|
13
|
+
#BUILD_DEBUG_START
|
|
14
|
+
this.elementCache = new CacheMapDouble('server-started');
|
|
15
|
+
#BUILD_DEBUG_STOP
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
get(data) {
|
|
19
|
+
let pos1 = 0;
|
|
20
|
+
// 14 + 14 + 3 = 31
|
|
21
|
+
const key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
22
|
+
let pos2 = 0;
|
|
23
|
+
// 1 + 1 + 12 + 1 = 15
|
|
24
|
+
const key2 = data.renderNodes | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
25
|
+
#BUILD_DEBUG_START
|
|
26
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
27
|
+
if(pos1 >= 32) {
|
|
28
|
+
ddb.error('getServerStarted key1 exceeds 32 bits. It is:', pos1);
|
|
29
|
+
}
|
|
30
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
31
|
+
if(pos2 >= 32) {
|
|
32
|
+
ddb.error('getServerStarted key2 exceeds 32 bits. It is:', pos2);
|
|
33
|
+
}
|
|
34
|
+
#BUILD_DEBUG_STOP
|
|
35
|
+
return this.elementCache.get(key1, key2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
set(data, element) {
|
|
39
|
+
let pos1 = 0;
|
|
40
|
+
const key1 = data.localActorIndex | (data.nbrOfActors << (pos1 += Const.SIZE_ACTOR_INDEX)) | (data.phaseId << (pos1 += Const.SIZE_NBR_OF_ACTORS));
|
|
41
|
+
let pos2 = 0;
|
|
42
|
+
const key2 = data.renderNodes | (data.reverseDirection << (pos2 += Const.SIZE_RENDER_NODES)) | (data.protocolIndex << (pos2 += Const.SIZE_REVERSE_DIRECTION)) | (data.renderPosition << (pos2 += Const.SIZE_PROTOCOL_INDEX));
|
|
43
|
+
#BUILD_DEBUG_START
|
|
44
|
+
pos1 += Const.SIZE_PHASE_ID;
|
|
45
|
+
if(pos1 >= 32) {
|
|
46
|
+
ddb.error('setServerStarted key1 exceeds 32 bits. It is:', pos1);
|
|
47
|
+
}
|
|
48
|
+
pos2 += Const.SIZE_RENDER_POSITION;
|
|
49
|
+
if(pos2 >= 32) {
|
|
50
|
+
ddb.error('setServerStarted key2 exceeds 32 bits. It is:', pos2);
|
|
51
|
+
}
|
|
52
|
+
#BUILD_DEBUG_STOP
|
|
53
|
+
this.elementCache.set(key1, key2, element);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
clear() {
|
|
57
|
+
this.elementCache.clear();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
_setKeys(data) {
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
module.exports = CacheTypeServerStarted;
|