@zimo-elektronik/zcan 1.0.0

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.
Files changed (202) hide show
  1. package/.dockerignore +7 -0
  2. package/.editorconfig +15 -0
  3. package/.eslintignore +7 -0
  4. package/.eslintrc.cjs +17 -0
  5. package/.gitattributes +1 -0
  6. package/.github/workflows/docs.yml +46 -0
  7. package/.github/workflows/library.yml +59 -0
  8. package/.nvmrc +1 -0
  9. package/.prettierignore +14 -0
  10. package/.prettierrc.json +8 -0
  11. package/LICENSE.md +21 -0
  12. package/README.md +8 -0
  13. package/__tests__/connection.test.ts +58 -0
  14. package/__tests__/dataGroup.test.ts +98 -0
  15. package/__tests__/infoGroup.test.ts +30 -0
  16. package/__tests__/lanDataGroup.test.ts +82 -0
  17. package/__tests__/lanInfoGroup.test.ts +41 -0
  18. package/__tests__/systemControlGroup.test.ts +42 -0
  19. package/__tests__/trackCfgGroup.test.ts +43 -0
  20. package/__tests__/util/index.ts +14 -0
  21. package/__tests__/vehicleGroup.test.ts +128 -0
  22. package/dist/@types/communication.d.ts +30 -0
  23. package/dist/@types/communication.js +2 -0
  24. package/dist/@types/communication.js.map +1 -0
  25. package/dist/@types/models.d.ts +172 -0
  26. package/dist/@types/models.js +2 -0
  27. package/dist/@types/models.js.map +1 -0
  28. package/dist/MX10.d.ts +45 -0
  29. package/dist/MX10.js +233 -0
  30. package/dist/MX10.js.map +1 -0
  31. package/dist/docs_entrypoint.d.ts +6 -0
  32. package/dist/docs_entrypoint.js +7 -0
  33. package/dist/docs_entrypoint.js.map +1 -0
  34. package/dist/index.d.ts +6 -0
  35. package/dist/index.js +7 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/internal/bites.d.ts +9 -0
  38. package/dist/internal/bites.js +10 -0
  39. package/dist/internal/bites.js.map +1 -0
  40. package/dist/internal/speedUtils.d.ts +9 -0
  41. package/dist/internal/speedUtils.js +29 -0
  42. package/dist/internal/speedUtils.js.map +1 -0
  43. package/dist/internal/utils.d.ts +1 -0
  44. package/dist/internal/utils.js +4 -0
  45. package/dist/internal/utils.js.map +1 -0
  46. package/dist/util/enums.d.ts +113 -0
  47. package/dist/util/enums.js +137 -0
  48. package/dist/util/enums.js.map +1 -0
  49. package/dist/util/extended-ascii.d.ts +7 -0
  50. package/dist/util/extended-ascii.js +162 -0
  51. package/dist/util/extended-ascii.js.map +1 -0
  52. package/dist/zcan/accessoryCommandGroup.d.ts +6 -0
  53. package/dist/zcan/accessoryCommandGroup.js +9 -0
  54. package/dist/zcan/accessoryCommandGroup.js.map +1 -0
  55. package/dist/zcan/dataGroup.d.ts +31 -0
  56. package/dist/zcan/dataGroup.js +233 -0
  57. package/dist/zcan/dataGroup.js.map +1 -0
  58. package/dist/zcan/fileControlGroup.d.ts +7 -0
  59. package/dist/zcan/fileControlGroup.js +9 -0
  60. package/dist/zcan/fileControlGroup.js.map +1 -0
  61. package/dist/zcan/fileTransferGroup.d.ts +7 -0
  62. package/dist/zcan/fileTransferGroup.js +9 -0
  63. package/dist/zcan/fileTransferGroup.js.map +1 -0
  64. package/dist/zcan/index.d.ts +18 -0
  65. package/dist/zcan/index.js +19 -0
  66. package/dist/zcan/index.js.map +1 -0
  67. package/dist/zcan/infoGroup.d.ts +15 -0
  68. package/dist/zcan/infoGroup.js +64 -0
  69. package/dist/zcan/infoGroup.js.map +1 -0
  70. package/dist/zcan/lanDataGroup.d.ts +23 -0
  71. package/dist/zcan/lanDataGroup.js +226 -0
  72. package/dist/zcan/lanDataGroup.js.map +1 -0
  73. package/dist/zcan/lanInfoGroup.d.ts +11 -0
  74. package/dist/zcan/lanInfoGroup.js +58 -0
  75. package/dist/zcan/lanInfoGroup.js.map +1 -0
  76. package/dist/zcan/lanNetworkGroup.d.ts +11 -0
  77. package/dist/zcan/lanNetworkGroup.js +37 -0
  78. package/dist/zcan/lanNetworkGroup.js.map +1 -0
  79. package/dist/zcan/lanZimoProgrammableScriptGroup.d.ts +7 -0
  80. package/dist/zcan/lanZimoProgrammableScriptGroup.js +9 -0
  81. package/dist/zcan/lanZimoProgrammableScriptGroup.js.map +1 -0
  82. package/dist/zcan/networkGroup.d.ts +10 -0
  83. package/dist/zcan/networkGroup.js +38 -0
  84. package/dist/zcan/networkGroup.js.map +1 -0
  85. package/dist/zcan/propertyConfigGroup.d.ts +7 -0
  86. package/dist/zcan/propertyConfigGroup.js +9 -0
  87. package/dist/zcan/propertyConfigGroup.js.map +1 -0
  88. package/dist/zcan/railwayControlGroup.d.ts +7 -0
  89. package/dist/zcan/railwayControlGroup.js +9 -0
  90. package/dist/zcan/railwayControlGroup.js.map +1 -0
  91. package/dist/zcan/systemControlGroup.d.ts +13 -0
  92. package/dist/zcan/systemControlGroup.js +35 -0
  93. package/dist/zcan/systemControlGroup.js.map +1 -0
  94. package/dist/zcan/trackCfgGroup.d.ts +16 -0
  95. package/dist/zcan/trackCfgGroup.js +77 -0
  96. package/dist/zcan/trackCfgGroup.js.map +1 -0
  97. package/dist/zcan/trainControlGroup.d.ts +8 -0
  98. package/dist/zcan/trainControlGroup.js +19 -0
  99. package/dist/zcan/trainControlGroup.js.map +1 -0
  100. package/dist/zcan/vehicleGroup.d.ts +26 -0
  101. package/dist/zcan/vehicleGroup.js +145 -0
  102. package/dist/zcan/vehicleGroup.js.map +1 -0
  103. package/dist/zcan/zimoProgrammableScriptGroup.d.ts +7 -0
  104. package/dist/zcan/zimoProgrammableScriptGroup.js +9 -0
  105. package/dist/zcan/zimoProgrammableScriptGroup.js.map +1 -0
  106. package/gulpfile.js +37 -0
  107. package/jest.config.js +26 -0
  108. package/package.json +50 -0
  109. package/protocol_docs/README.md +41 -0
  110. package/protocol_docs/babel.config.js +3 -0
  111. package/protocol_docs/docs/command-groups/_category_.json +4 -0
  112. package/protocol_docs/docs/command-groups/accessories/_category_.json +4 -0
  113. package/protocol_docs/docs/command-groups/accessories/accessory-state.md +7 -0
  114. package/protocol_docs/docs/command-groups/command-groups.md +50 -0
  115. package/protocol_docs/docs/command-groups/data/_category_.json +4 -0
  116. package/protocol_docs/docs/command-groups/data/data-name-extended.md +60 -0
  117. package/protocol_docs/docs/command-groups/data/group-count.md +52 -0
  118. package/protocol_docs/docs/command-groups/data/item-fx-info.md +27 -0
  119. package/protocol_docs/docs/command-groups/data/item-image-config.md +44 -0
  120. package/protocol_docs/docs/command-groups/data/item-list-by-index.md +45 -0
  121. package/protocol_docs/docs/command-groups/data/item-list-by-nid.md +43 -0
  122. package/protocol_docs/docs/command-groups/data/remove-train.md +33 -0
  123. package/protocol_docs/docs/command-groups/info/_category_.json +4 -0
  124. package/protocol_docs/docs/command-groups/info/bidi-info.md +34 -0
  125. package/protocol_docs/docs/command-groups/lan-data/_category_.json +4 -0
  126. package/protocol_docs/docs/command-groups/lan-data/data-value-extended.md +65 -0
  127. package/protocol_docs/docs/command-groups/lan-data/loco-gui-extended.md +48 -0
  128. package/protocol_docs/docs/command-groups/lan-info/_category_.json +4 -0
  129. package/protocol_docs/docs/command-groups/lan-info/module-power-info.md +26 -0
  130. package/protocol_docs/docs/command-groups/lan-network/_category_.json +4 -0
  131. package/protocol_docs/docs/command-groups/lan-network/open-port.md +47 -0
  132. package/protocol_docs/docs/command-groups/network/_category_.json +4 -0
  133. package/protocol_docs/docs/command-groups/network/ping.md +49 -0
  134. package/protocol_docs/docs/command-groups/system/_category_.json +4 -0
  135. package/protocol_docs/docs/command-groups/system/system-state.md +59 -0
  136. package/protocol_docs/docs/command-groups/track/_category_.json +4 -0
  137. package/protocol_docs/docs/command-groups/track/tse-prog-read.md +37 -0
  138. package/protocol_docs/docs/command-groups/track/tse-prog-write.md +35 -0
  139. package/protocol_docs/docs/command-groups/train/_category_.json +4 -0
  140. package/protocol_docs/docs/command-groups/train/train-part-find.md +33 -0
  141. package/protocol_docs/docs/command-groups/vehicles/_category_.json +4 -0
  142. package/protocol_docs/docs/command-groups/vehicles/vehicle-function.md +36 -0
  143. package/protocol_docs/docs/command-groups/vehicles/vehicle-mode.md +143 -0
  144. package/protocol_docs/docs/command-groups/vehicles/vehicle-special-function-switch.md +35 -0
  145. package/protocol_docs/docs/command-groups/vehicles/vehicle-speed.md +55 -0
  146. package/protocol_docs/docs/description.md +4 -0
  147. package/protocol_docs/docs/introduction/_category_.json +4 -0
  148. package/protocol_docs/docs/introduction/how-it-works.md +61 -0
  149. package/protocol_docs/docs/introduction/implementation.md +39 -0
  150. package/protocol_docs/docs/introduction/interface.md +62 -0
  151. package/protocol_docs/docs/introduction/introduction.md +82 -0
  152. package/protocol_docs/docusaurus.config.js +111 -0
  153. package/protocol_docs/package-lock.json +25611 -0
  154. package/protocol_docs/package.json +47 -0
  155. package/protocol_docs/sidebars.js +22 -0
  156. package/protocol_docs/src/components/CommandAndGroup/index.tsx +16 -0
  157. package/protocol_docs/src/components/CommandAndGroup/styles.module.css +12 -0
  158. package/protocol_docs/src/components/HomepageFeatures/index.tsx +70 -0
  159. package/protocol_docs/src/components/HomepageFeatures/styles.module.css +11 -0
  160. package/protocol_docs/src/css/custom.css +76 -0
  161. package/protocol_docs/src/pages/index.module.css +23 -0
  162. package/protocol_docs/src/pages/index.tsx +41 -0
  163. package/protocol_docs/src/pages/markdown-page.md +7 -0
  164. package/protocol_docs/static/.nojekyll +0 -0
  165. package/protocol_docs/static/img/docusaurus.png +0 -0
  166. package/protocol_docs/static/img/favicon.ico +0 -0
  167. package/protocol_docs/static/img/undraw_docusaurus_mountain.svg +171 -0
  168. package/protocol_docs/static/img/undraw_docusaurus_react.svg +170 -0
  169. package/protocol_docs/static/img/undraw_docusaurus_tree.svg +40 -0
  170. package/protocol_docs/static/typedoc/index.html +10 -0
  171. package/protocol_docs/tsconfig.json +7 -0
  172. package/src/@types/communication.ts +73 -0
  173. package/src/@types/models.ts +215 -0
  174. package/src/MX10.ts +351 -0
  175. package/src/docs_entrypoint.ts +34 -0
  176. package/src/index.ts +8 -0
  177. package/src/internal/bites.ts +11 -0
  178. package/src/internal/speedUtils.ts +36 -0
  179. package/src/internal/utils.ts +3 -0
  180. package/src/util/enums.ts +147 -0
  181. package/src/util/extended-ascii.ts +179 -0
  182. package/src/zcan/accessoryCommandGroup.ts +24 -0
  183. package/src/zcan/dataGroup.ts +342 -0
  184. package/src/zcan/fileControlGroup.ts +25 -0
  185. package/src/zcan/fileTransferGroup.ts +25 -0
  186. package/src/zcan/index.ts +37 -0
  187. package/src/zcan/infoGroup.ts +90 -0
  188. package/src/zcan/lanDataGroup.ts +361 -0
  189. package/src/zcan/lanInfoGroup.ts +86 -0
  190. package/src/zcan/lanNetworkGroup.ts +70 -0
  191. package/src/zcan/lanZimoProgrammableScriptGroup.ts +25 -0
  192. package/src/zcan/networkGroup.ts +71 -0
  193. package/src/zcan/propertyConfigGroup.ts +25 -0
  194. package/src/zcan/railwayControlGroup.ts +25 -0
  195. package/src/zcan/systemControlGroup.ts +62 -0
  196. package/src/zcan/trackCfgGroup.ts +109 -0
  197. package/src/zcan/trainControlGroup.ts +48 -0
  198. package/src/zcan/vehicleGroup.ts +267 -0
  199. package/src/zcan/zimoProgrammableScriptGroup.ts +25 -0
  200. package/tsconfig.build.json +12 -0
  201. package/tsconfig.json +49 -0
  202. package/tsconfig.test.json +9 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vehicleGroup.js","sourceRoot":"","sources":["../../src/zcan/vehicleGroup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,OAAO,EAAC,MAAM,MAAM,CAAC;AAQ7B,OAAO,EAGL,gBAAgB,GAIjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,UAAU,GACX,MAAM,wBAAwB,CAAC;AAMhC,MAAM,CAAC,OAAO,OAAO,YAAY;IACvB,IAAI,CAAO;IAEH,cAAc,GAAG,IAAI,OAAO,EAAoB,CAAC;IACjD,aAAa,GAAG,IAAI,OAAO,EAAmB,CAAC;IAC/C,aAAa,GAAG,IAAI,OAAO,EAAoB,CAAC;IAChD,cAAc,GAAG,IAAI,OAAO,EAAoB,CAA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CAAC,CAAC;YAE7C,MAAM,cAAc,GAAG,aAAa,KAAK,IAAI,CAAC;YAE9C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;gBACvB,GAAG,EAAE,GAAG;gBACR,cAAc;gBACd,aAAa,EAAE,cAAc;aAC9B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAGO,2BAA2B,CACjC,IAAY,EACZ,IAAY,EACZ,GAAW,EACX,MAAc;QAEd,IAAI,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YACnC,MAAM,mBAAmB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YACnD,MAAM,oBAAoB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YAEpD,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC;gBAC9B,GAAG,EAAE,GAAG;gBACR,mBAAmB;gBACnB,oBAAoB;aACrB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ import MX10 from '../MX10';
2
+ import { Buffer } from 'buffer';
3
+ export default class ZimoProgrammableScriptGroup {
4
+ private mx10;
5
+ constructor(mx10: MX10);
6
+ parse(size: number, command: number, mode: number, nid: number, buffer: Buffer): void;
7
+ }
@@ -0,0 +1,9 @@
1
+ export default class ZimoProgrammableScriptGroup {
2
+ mx10;
3
+ constructor(mx10) {
4
+ this.mx10 = mx10;
5
+ }
6
+ parse(size, command, mode, nid, buffer) {
7
+ }
8
+ }
9
+ //# sourceMappingURL=zimoProgrammableScriptGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zimoProgrammableScriptGroup.js","sourceRoot":"","sources":["../../src/zcan/zimoProgrammableScriptGroup.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,OAAO,OAAO,2BAA2B;IACtC,IAAI,CAAO;IAEnB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,KAAK,CACH,IAAY,EACZ,OAAe,EACf,IAAY,EACZ,GAAW,EACX,MAAc;IAGhB,CAAC;CACF"}
package/gulpfile.js ADDED
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ import gulp from 'gulp';
4
+ import typedoc from 'gulp-typedoc';
5
+ import {spawn} from 'child_process';
6
+ import {deleteAsync} from 'del';
7
+ import {resolve} from 'node:path';
8
+
9
+ const docsPath = './protocol_docs/';
10
+
11
+ gulp.task('protocol-docs', () => {
12
+ const isWin = process.platform === 'win32';
13
+ const cmd = isWin ? '.cmd' : '';
14
+ let path = resolve(docsPath, 'node_modules', '.bin', 'docusaurus' + cmd);
15
+
16
+ return spawn(path, ['build'], {
17
+ cwd: docsPath,
18
+ stdio: 'inherit',
19
+ });
20
+ });
21
+
22
+ gulp.task('library-docs', () => {
23
+ return gulp.src(['src/docs_entrypoint.ts']).pipe(
24
+ typedoc({
25
+ out: `${docsPath}build/typedoc/`,
26
+ }),
27
+ );
28
+ });
29
+
30
+ gulp.task('clean-protocol', () => {
31
+ return deleteAsync([`${docsPath}build`]);
32
+ });
33
+
34
+ gulp.task(
35
+ 'documentation',
36
+ gulp.series('clean-protocol', 'protocol-docs', 'library-docs'),
37
+ );
package/jest.config.js ADDED
@@ -0,0 +1,26 @@
1
+ const isCI = process.env.CI === 'true'
2
+
3
+ export default {
4
+ verbose: true,
5
+ collectCoverage: false,
6
+ resetModules: true,
7
+ restoreMocks: true,
8
+ testEnvironment: 'node',
9
+ transform: {},
10
+ preset: 'ts-jest/presets/default-esm',
11
+ extensionsToTreatAsEsm: ['.ts'],
12
+ testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
13
+ moduleNameMapper: {
14
+ '^(\\.{1,2}/.*)\\.js$': '$1',
15
+ },
16
+ globals: {
17
+ 'ts-jest': {
18
+ tsconfig: './tsconfig.test.json',
19
+ useESM: true,
20
+ },
21
+ },
22
+ collectCoverageFrom: ['<rootDir>/src/*.ts', '<rootDir>/src/zcan/*.ts', '<rootDir>/src/util/speedUtils.ts'],
23
+ coveragePathIgnorePatterns: ['<rootDir>/dist/', '/node_modules/', '<rootDir>/scripts', '<rootDir>/tools'],
24
+ coverageProvider: 'v8',
25
+ coverageReporters: isCI ? ['json'] : ['text'],
26
+ }
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@zimo-elektronik/zcan",
3
+ "type": "module",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "license": "MIT",
7
+ "repository": "https://github.com/ZIMO-Elektronik/zcan",
8
+ "version": "1.0.0",
9
+ "scripts": {
10
+ "start": "node dist/main.js",
11
+ "start:dev": "nodemon --ext js,ts,json,env --exec \"node --experimental-specifier-resolution=node --loader ts-node/esm\" src/main.ts",
12
+ "build": "tsc --project tsconfig.build.json",
13
+ "build:clean": "rm -rf tsconfig.build.tsbuildinfo && rm -rf ./dist",
14
+ "test": "jest --forceExit",
15
+ "test:coverage": "npm run test -- --coverage",
16
+ "test:ci": "npm run test -- --colors --coverage --ci",
17
+ "lint": "eslint --ext=.ts,.js .",
18
+ "format": "prettier \"./**\" --write --ignore-unknown",
19
+ "format:check": "prettier \"./**\" --ignore-unknown --check",
20
+ "docs": "gulp documentation"
21
+ },
22
+ "dependencies": {
23
+ "rxjs": "^7.8.1",
24
+ "tslib": "^2.7.0"
25
+ },
26
+ "devDependencies": {
27
+ "@jest/globals": "^29.7.0",
28
+ "@jest/types": "^29.6.3",
29
+ "@types/jest": "^29.5.13",
30
+ "@types/node": "^20.1.0",
31
+ "@typescript-eslint/eslint-plugin": "^8.8.1",
32
+ "@typescript-eslint/parser": "^8.8.1",
33
+ "cross-env": "^7.0.3",
34
+ "del": "^8.0.0",
35
+ "eslint": "^8.57.1",
36
+ "eslint-plugin-import": "^2.31.0",
37
+ "eslint-plugin-node": "^11.1.0",
38
+ "eslint-plugin-tsdoc": "^0.3.0",
39
+ "gulp": "^5.0.0",
40
+ "gulp-spawn": "^2.0.0",
41
+ "gulp-typedoc": "git+https://github.com/crutchcorn/gulp-typedoc.git",
42
+ "jest": "^29.7.0",
43
+ "nodemon": "^3.1.7",
44
+ "prettier": "^3.3.3",
45
+ "ts-jest": "^29.2.5",
46
+ "ts-node": "^10.9.2",
47
+ "typedoc": "^0.26.8",
48
+ "typescript": "5.5.4"
49
+ }
50
+ }
@@ -0,0 +1,41 @@
1
+ # Website
2
+
3
+ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4
+
5
+ ### Installation
6
+
7
+ ```
8
+ $ yarn
9
+ ```
10
+
11
+ ### Local Development
12
+
13
+ ```
14
+ $ yarn start
15
+ ```
16
+
17
+ This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18
+
19
+ ### Build
20
+
21
+ ```
22
+ $ yarn build
23
+ ```
24
+
25
+ This command generates static content into the `build` directory and can be served using any static contents hosting service.
26
+
27
+ ### Deployment
28
+
29
+ Using SSH:
30
+
31
+ ```
32
+ $ USE_SSH=true yarn deploy
33
+ ```
34
+
35
+ Not using SSH:
36
+
37
+ ```
38
+ $ GIT_USER=<Your GitHub username> yarn deploy
39
+ ```
40
+
41
+ If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3
+ };
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Commands",
3
+ "position": 1
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Accessories",
3
+ "position": 2
4
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: accessory-state
3
+ title: Accessory
4
+ sidebar_position: 0
5
+ ---
6
+
7
+ The Command Group 0x01 summarizes the accessory commands. Any stationary device is considered to be an accessory starting with simple turnout decoders or S88 feedbacks up to complex modules with RailCom/mfx receivers
@@ -0,0 +1,50 @@
1
+ ---
2
+ id: command-groups
3
+ title: Commands
4
+ sidebar_position: 0
5
+ ---
6
+
7
+ ## Receiving and sending commands
8
+
9
+ There are a few things to watch out for when receiving and sending orders. First, this is what the received message will look like. Also when sending, the message must be in the same format as the received message and the mode will be **0b01**.
10
+
11
+ | Size | Unused | Group | Cmd + Mode | NID | Data |
12
+ |--------|--------|-------|-------------------------------------------|--------|-------------|
13
+ | 16 Bit | 16 Bit | 8 Bit | 8 Bitfirst half = cmd second half = mode | 16 Bit | 0 ... x Bit |
14
+
15
+
16
+ :::note
17
+
18
+ In every group the 'Data' section is used for further parsing of information! <br/> When receiving the message everything will be in byte version! <br/> When creating the message everything has to be changed to byte version!
19
+
20
+ :::
21
+
22
+ ## Command group table
23
+
24
+ Every message contains group code for better handling of commands. All commands are grouped in the following groups:
25
+
26
+ | Group | Code | Use/Content |
27
+ |-------------------------------------------------------------|------|-----------------------------------------------------------------------------------------------------------|
28
+ | System | 0x00 | System critical tasks (on/off, emergency stop, ...) |
29
+ | Accessories | 0x01 | Commands for controlling the accessories. |
30
+ | This refers to both encoders/feedback devices and decoders. | | |
31
+ | Vehicles | 0x02 | Commands for controlling the vehicles (Mobile Decoder) |
32
+ | Free | 0x03 | Currently still unused |
33
+ | GBS | 0x04 | Telegrams for track diagram control panels |
34
+ | Train control | 0x05 | Configuration of devices, ZIMO Command Language |
35
+ | Track config | 0x16 | Configuration of 'Track' accessories |
36
+ | Data | 0x07 | Object data transfer |
37
+ | Info | 0x08 | Status messages, mostly unrequested messages |
38
+ | Free | 0x09 | May be used by third-party systems as required |
39
+ | Network | 0x0A | Network Management, Module Registration, ... |
40
+ | File Control | 0x0E | E Control commands for file transfer such as: File Open, Close, ... |
41
+ | File Transfer | 0x0F | File 'Contents' (data) Telegrams |
42
+ | PC data-grams | 0x0n | To optimize the data throughput between a PC application and the MX10, there are some specific data-grams |
43
+ | Lan Data | 0x17 | 🚧 Add description |
44
+ | Lan Info | 0x18 | 🚧 Add description |
45
+
46
+ :::caution Under construction🚧
47
+
48
+ Add missing description <br/> Check other descriptions
49
+
50
+ :::
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Data",
3
+ "position": 6
4
+ }
@@ -0,0 +1,60 @@
1
+ ---
2
+ id: data-name-extended
3
+ title: Data Name Extended
4
+ sidebar_position: 7
5
+ ---
6
+
7
+ import CommandAndGroup from '@site/src/components/CommandAndGroup';
8
+
9
+ <CommandAndGroup group="07" command="21"/>
10
+
11
+ ## Receiving
12
+
13
+ This command is only available on the PC interface (USB/LAN). This allows an app to transfer texts with up to 192 characters in one command. However, some entries are limited to 32 characters, or there are limitations in the GUI display.
14
+
15
+ :::warning
16
+
17
+ Names and other strings needs to be sent terminated with 0x00
18
+
19
+ :::
20
+
21
+ When receiving command _0x21_ the 'Data' section will look like this:
22
+
23
+ | NID | Sub ID | Value1 | Value2 | Name |
24
+ |--------|--------|--------|--------|-----------|
25
+ | 16 Bit | 16 Bit | 32 Bit | 32 Bit | 191 Bytes |
26
+
27
+
28
+ The 'NID' indicates for which device the text is valid. If 'NID' is e.g.: the NID of a vehicle, the texts are linked to this vehicle. All other texts can also be transmitted with this command.
29
+
30
+ ### Description table for value 1 / 2
31
+
32
+ | NID | Sub ID | Value1 | Value2 | Usage | Max length |
33
+ |-------------|--------------|---------------------------------|--------|----------------------------|---------------|
34
+ | Vehicle | 0 | 0 | 0 | Vehicle name | 32 characters |
35
+ | | 1 | 0 | 0 | Railroad company | 32 characters |
36
+ | Accessories | Port | 0 | 0 | Designation for connection | |
37
+ | 0x7F00 | Vendor | 0 | 0 | Manufacturer names | 32 characters |
38
+ | 0x7F02 | Decoder | 0 | 0 | Decoder name/types | 32 characters |
39
+ | 0x7F04 | CfgName | Type (8Bit)<br/> CgfNum (24Bit) | 0 | CV Designation | 32 characters |
40
+ | 0x7F06 | Cfg Db | | | Cfg Db | 32 characters |
41
+ | 0x7F10 | Icon | | | Icon | 32 characters |
42
+ | 0x7F11 | Icon | | | Icon | 32 characters |
43
+ | 0x7F18 | ZIMO Partner | | | ZIMO Partner | 32 characters |
44
+ | 0x7F20 | Land | | | Land | 32 characters |
45
+
46
+
47
+ :::info
48
+
49
+ Value2 is intended for groups.
50
+
51
+ :::
52
+
53
+ ## Sending
54
+
55
+ When sending command _0x21_ the 'Data' section will look like this:
56
+
57
+ | NID | Sub ID | 0 | 0 | Name | 0 |
58
+ |--------|--------|--------|--------|---------------------|-------|
59
+ | 16 Bit | 16 Bit | 32 Bit | 32 Bit | Name length * 8 Bit | 8 Bit |
60
+
@@ -0,0 +1,52 @@
1
+ ---
2
+ id: group-count
3
+ title: Group Count
4
+ sidebar_position: 1
5
+ ---
6
+
7
+ import CommandAndGroup from '@site/src/components/CommandAndGroup';
8
+
9
+ <CommandAndGroup group="07" command="00"/>
10
+
11
+ ## Receiving
12
+
13
+ When receiving command _0x00_ the 'Data' section will look like this:
14
+
15
+ | Object type | Number |
16
+ |-------------|--------|
17
+ | 16 Bit | 16 Bit |
18
+
19
+
20
+ By Mode = 0b00 a device can query if the MX10 knows a certain device group (Object type). The MX10 responds (Mode = 0b11) with group and the known number of devices in the respective group.
21
+
22
+ :::note
23
+
24
+ Group Count for MX8, MX9 modules returns with unknown count (e.g. because request too early, auto-scan off, feedback error is present,...) the result is 0xFFFF.
25
+
26
+ :::
27
+
28
+ ### Object type codes
29
+
30
+ | Object type | Description |
31
+ |-------------|----------------------------------|
32
+ | 0x0000 | Vehicles |
33
+ | 0x2F00 | Trains |
34
+ | 0x3000 | Accessories, DCC 'simple' |
35
+ | 0x3200 | DCC 'eXtended' accessory decoder |
36
+ | 0x5040 | MX8 Module |
37
+ | 0x5080 | MX9 Module |
38
+
39
+
40
+ ## Sending
41
+
42
+ When sending command _0x00_ the 'Data' section will look like this:
43
+
44
+ | NID | Object type |
45
+ |--------|-------------|
46
+ | 16 Bit | 16 Bit |
47
+
48
+ :::note
49
+
50
+ Mode should be set to 0b00.
51
+
52
+ :::
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: item-fx-info
3
+ title: Item Fx Info
4
+ sidebar_position: 6
5
+ ---
6
+
7
+ import CommandAndGroup from '@site/src/components/CommandAndGroup';
8
+
9
+ <CommandAndGroup group="07" command="15"/>
10
+
11
+ ## Receiving
12
+
13
+ When receiving command _0x15_ the 'Data' section will look like this:
14
+
15
+ | NID | Fx | Unused | Type | Data |
16
+ |--------|--------|--------|-------|--------|
17
+ | 16 Bit | 16 Bit | 8 Bit | 8 Bit | 16 Bit |
18
+
19
+
20
+ ## Sending
21
+
22
+ When sending command _0x15_ the 'Data' section will look like this:
23
+
24
+ | NID | Fx | 0 | Type | Data |
25
+ |--------|--------|-------|-------|--------|
26
+ | 16 Bit | 16 Bit | 8 Bit | 8 Bit | 16 Bit |
27
+
@@ -0,0 +1,44 @@
1
+ ---
2
+ id: item-image-config
3
+ title: Item Image Config
4
+ sidebar_position: 5
5
+ ---
6
+
7
+ import CommandAndGroup from '@site/src/components/CommandAndGroup';
8
+
9
+ <CommandAndGroup group="07" command="12"/>
10
+
11
+ ## Receiving
12
+
13
+ With the 'Data Image Config' data-grams the images can be transferred for each vehicle, accessory, device in the system.
14
+
15
+ When receiving command _0x12_ the 'Data' section will look like this:
16
+
17
+ | NID | Type | Image ID |
18
+ |--------|--------|----------|
19
+ | 16 Bit | 16 Bit | 16 Bit |
20
+
21
+ :::tip
22
+
23
+ Vehicle images can also be retrieved or specified by ImageCRC32, the conversion to the ImageID must be calculated in the be calculated in the respective device. The 'source' for the ImageCRC32 is always the 'big' vehicle image (279x92 pixel, 16 (if MX32/FU calculated) or 24 (if PC calculated) bit colors).
24
+
25
+ :::
26
+
27
+ ### Image Types
28
+
29
+ | Type | Description |
30
+ |------|-------------------------------|
31
+ | 0x01 | Vehicle image: Image ID |
32
+ | 0x02 | Vehicle image: Image CRC32 |
33
+ | 0x03 | Vehicle speedometer: Image ID |
34
+ | 0x04 | 🚧 |
35
+ | 0x10 | Vehicle Instrument: Brake Bar |
36
+ | 0x1f | Vehicle instrument |
37
+
38
+ ## Sending
39
+
40
+ When sending command _0x12_ the 'Data' section will look like this:
41
+
42
+ | NID | Type | Image ID |
43
+ |--------|--------|----------|
44
+ | 16 Bit | 16 Bit | 16 Bit |
@@ -0,0 +1,45 @@
1
+ ---
2
+ id: item-list-by-index
3
+ title: Item List By Index
4
+ sidebar_position: 2
5
+ ---
6
+
7
+ import CommandAndGroup from '@site/src/components/CommandAndGroup';
8
+
9
+ <CommandAndGroup group="07" command="01"/>
10
+
11
+ ## Receiving
12
+
13
+ When receiving command _0x01_ the 'Data' section will look like this:
14
+
15
+ | Index | Device NID | Last tick (ms) |
16
+ |--------|------------|----------------|
17
+ | 16 Bit | 16 Bit | 16 Bit |
18
+
19
+
20
+ By Mode = 0b00 a device can query the object list via the object index in the MX10. The MX10 responds (Mode = 0b11) with the object index and the NID of the object. This allows a device to build up a list of objects known to the MX10.
21
+
22
+ Case 1: Device present <br/>If there is an object in the MX10 under the requested index, it returns the index, the NId of the device and the number of mS since the last communication with the device. <br/>Case 2: Device not present/unknown <br/>If the MX10 does not know a device under the given index, it returns the requested index in the response, as NId=0xFFFF and also as last communication tick 0xFFFF.
23
+
24
+ Likewise, if the index is outside the 'object group' (e.g.: for MX8/MX9 only indexes from 0 ... 63 are allowed), device is unknown.
25
+
26
+ :::note
27
+
28
+ With this command a 'direct' memory access is performed. The object may or may not contain data (object). If a query on index e.g.: index 10 returns 'no data', then there may be some on Index 11.The response (M = 0b11) contains the 'next' NId, the corresponding index and, if available, the last 'communication bar'.
29
+
30
+ :::
31
+
32
+ ## Sending
33
+
34
+ When sending command _0x01_ the 'Data' section will look like this:
35
+
36
+ | NID | Group NID | Index |
37
+ |--------|-----------|--------|
38
+ | 16 Bit | 16 Bit | 16 Bit |
39
+
40
+
41
+ :::note
42
+
43
+ Mode should be set to 0b00.
44
+
45
+ :::
@@ -0,0 +1,43 @@
1
+ ---
2
+ id: item-list-by-nid
3
+ title: Item List By NID
4
+ sidebar_position: 3
5
+ ---
6
+
7
+ import CommandAndGroup from '@site/src/components/CommandAndGroup';
8
+
9
+ <CommandAndGroup group="07" command="02"/>
10
+
11
+ ## Receiving
12
+
13
+ When receiving command _0x02_ the 'Data' section will look like this:
14
+
15
+ | NID | Index | Item state | Last tick (ms) |
16
+ |--------|--------|------------|----------------|
17
+ | 16 Bit | 16 Bit | 16 Bit | 16 Bit |
18
+
19
+
20
+ By Mode = 0b00 a device can query that NId which is stored after the specified NId. This command is especially helpful for accessory modules/decoders. The answer (Mode = 0b11) contains the 'next' NId, the respective index and if available the last 'communication tick'. Similar to 'Item List by Index' [0x07.0x01] there are 2 possible answers:
21
+
22
+ 1. The MX10 finds a 'next' device after the given NId in the same object group. In this case it returns the found NId, the index and the last communication tick.
23
+ 2. The MX10 does not know any other devices in the object group, the NId refers to an unknown object group, ... In this case the MX10 finds a 'next' device after the given NId. In this case the MX10 answers with NId=0xFFFF, Index=0xFFFF and LastTick=0xFFFF.
24
+
25
+ :::note
26
+
27
+ MX10 will return 'yes' answers if it finds more data and empty memory locations are skipped. The response (M = 0b11) contains the 'next' NId, the corresponding index and, if available, the last 'communication bar'.
28
+
29
+ :::
30
+
31
+ ## Sending
32
+
33
+ When sending command _0x02_ the 'Data' section will look like this:
34
+
35
+ | NID | Search after value |
36
+ |--------|--------------------|
37
+ | 16 Bit | 16 Bit |
38
+
39
+ :::note
40
+
41
+ Mode should be set to 0b00.
42
+
43
+ :::
@@ -0,0 +1,33 @@
1
+ ---
2
+ id: remove-train
3
+ title: Remove Train
4
+ description: 0x07.0x1f
5
+ sidebar_position: 4
6
+ ---
7
+ import CommandAndGroup from '@site/src/components/CommandAndGroup';
8
+
9
+ <CommandAndGroup group="07" command="1f"/>
10
+
11
+ ## Receiving
12
+
13
+ When receiving command the 'Data' section will look like this:
14
+
15
+ | NID | State |
16
+ |--------|--------|
17
+ | 16 Bit | 16 Bit |
18
+
19
+
20
+ ## Sending
21
+
22
+ When sending command the 'Data' section will look like this:
23
+
24
+ | Remove from device with NID | NID of locomotive (or other device) to remove |
25
+ |-----------------------------|-----------------------------------------------|
26
+ | 16 Bit | 16 Bit |
27
+
28
+
29
+ :::note
30
+
31
+ 'Remove from NID' specifies which device should remove the train.
32
+
33
+ :::
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Info",
3
+ "position": 7
4
+ }
@@ -0,0 +1,34 @@
1
+ ---
2
+ id: bidi-info
3
+ title: BiDi Info
4
+ sidebar_position: 1
5
+ ---
6
+
7
+ import CommandAndGroup from '@site/src/components/CommandAndGroup';
8
+
9
+ <CommandAndGroup group="08" command="05"/>
10
+
11
+ ## Receiving
12
+
13
+ When receiving command _0x05_ the 'Data' section will look like this:
14
+
15
+ | NID | Type | Data |
16
+ |--------|--------|--------|
17
+ | 16 Bit | 16 Bit | 32 Bit |
18
+
19
+
20
+ With this data-gram the MX10 BiDi reports information The 'NID' indicates which device should answer the question. Typically this is the NID of the the PC is connected to. However, especially in a network, it can also be another device (e.g.: Tab, another PC).
21
+
22
+ ### Type table
23
+
24
+ | Type | Description |
25
+ |--------|--------------------|
26
+ | 0x0100 | BiDi Speed |
27
+ | 0x0101 | Tilt/Curve |
28
+ | 0x0200 | BiDi CV |
29
+ | 0x0300 | BiDi QoS |
30
+ | 0x0400 | BiDi Fill level |
31
+ | 0x0800 | BiDi Direction |
32
+ | 0x1000 | BiDi Track Voltage |
33
+ | 0x1100 | BiDi Alarms |
34
+
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Lan Data",
3
+ "position": 9
4
+ }