config-editor-base 2.9.3 → 2.9.5

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/README.md CHANGED
@@ -145,7 +145,86 @@ The config editor also supports various S3 calls, e.g. for loading Rule Schema a
145
145
 
146
146
  The config editor relies on styling from the parent application. For examples of styling, see the CANedge configuration editor.
147
147
 
148
- ---
148
+ ---
149
+
150
+ ## Editor Base Tools
151
+
152
+ The module includes built-in tools for OBD configuration and filter building. These are exported as `OBDTool` and `FilterBuilderTool`.
153
+
154
+ ### OBD Tool
155
+
156
+ Generates OBD-II transmit lists for CANedge devices. Key features:
157
+ - **PID Selection**: Select standard OBD-II PIDs from a built-in database
158
+ - **Supported PIDs Parser**: Parse response data to identify vehicle-supported PIDs
159
+ - **Control Signal**: Optional GPS-based speed control signal to prevent battery drain when vehicle is off
160
+ - **Transmit List Generation**: Outputs partial JSON for merging with device configuration
161
+
162
+ ```jsx
163
+ import { OBDTool } from "config-editor-base";
164
+
165
+ // In editorTools array:
166
+ {
167
+ name: "obd-modal",
168
+ comment: "OBD tool",
169
+ class: "fa fa-car",
170
+ modal: <OBDTool showAlert={this.props.showAlert} />
171
+ }
172
+ ```
173
+
174
+ ### Filter Builder Tool
175
+
176
+ Analyzes CSV log files to help users create optimized CAN filters. Key features:
177
+ - **CSV Analysis**: Load mdf2csv output to see CAN ID distribution by size contribution
178
+ - **DBC Matching**: Match CAN IDs to DBC message names and signals
179
+ - **J1939 PGN Grouping**: Group 29-bit IDs by PGN for J1939/ISOBUS protocols
180
+ - **Filter Generation**: Generate acceptance filters with optional prescalers
181
+ - **Reset Filters**: Reset CAN channel filters to defaults (record everything)
182
+
183
+ ```jsx
184
+ import { FilterBuilderTool } from "config-editor-base";
185
+
186
+ // In editorTools array:
187
+ {
188
+ name: "filter-builder-modal",
189
+ comment: "Filter builder",
190
+ class: "fa fa-sliders",
191
+ modal: <FilterBuilderTool showAlert={this.props.showAlert} deviceType="CANedge" />
192
+ }
193
+ ```
194
+
195
+ The `deviceType` prop controls device-specific behavior:
196
+ - `"CANedge"` or `"CANedge2 GNSS"`: Standard CANedge filter structure
197
+ - `"CANmod"`: CANmod.router filter structure (requires `frame_format` field)
198
+
199
+ ### Updating for New Firmware Revisions
200
+
201
+ When a new firmware revision is released (e.g., CANedge 01.10.XX), update these files:
202
+
203
+ #### 1. Supported Firmware Versions (`FilterBuilderTool.js`)
204
+ ```javascript
205
+ // Add new version to the supported arrays at top of file:
206
+ const SUPPORTED_FIRMWARE_CANEDGE = ["01.08", "01.09", "01.10"]; // Add here
207
+ const SUPPORTED_FIRMWARE_CANMOD_ROUTER = ["01.02"];
208
+ ```
209
+
210
+ #### 2. Default Filter Configs (`src/editorBaseTools/filterBuilder/`)
211
+ If the filter schema changes, create new default filter JSON files:
212
+ - `canedge-default-filters-XX.YY.json`
213
+ - `canedge-default-filters-gps-XX.YY.json`
214
+ - `canmod-router-default-filters-XX.YY.json`
215
+
216
+ Then update imports in `FilterBuilderTool.js` if structure changes.
217
+
218
+ #### 3. Control Signal Config (`src/editorBaseTools/obd/`)
219
+ If the control signal schema changes:
220
+ - Create `control-signal-internal-gps-XX.YY.json`
221
+ - Update import in `OBDTool.js`
222
+
223
+ #### 4. Schema Files (`dist/schema/`)
224
+ Add new schema and uischema files to the appropriate folders and update `schemaAry`/`uiSchemaAry` in `Editor.js`.
225
+
226
+ ---
227
+
149
228
  ## Regarding JSON Schema files
150
229
 
151
230
  The module expects to find JSON Schema files in the structure below to facilitate auto-loading of these: