On 4/5/26 01:24, Michael Balzer wrote:
> Am 04.04.26 um 20:02 schrieb Craig Leres:
>> On 4/3/26 10:28, Michael Balzer wrote:
>>
>>> Try filtering then, 900 frames per second is rather high.
>> The actual size of that capture is 75.8 MB. It's clear the programmers
>> did not care about saving bandwidth, many pids have payloads that are
>> always all zero...
>>
>> I wrote a python script to generate a filter string that skips pids
>> with always-zero payloads. This has the potential to save 42% of the
>> captured frames but I'm running into parsing limits. Quoting doesn't
>> help/work. I guess I can raise _QUOTED_TOKEN_NMB from 10 to 100 to
>> make this work locally for testing; would it be bad to raise it in the
>> master branch?
>>
>> Craig
>>
>> OVMS# can log start vfs crtd /sd/ct5-14.crtd 034 03f 04b-04c 063
>> 073-0cc 147-1be 225-297 2a9-2c9 2ce-2d1 2d4-2d7 2da 2dc 2e0 2e2-382
>> 3a2-3a8 3aa-3ba 3d0-3d5 41b 42b 442-458 462 467-469 46d 478-483
>> 489-48d 494 499-49d 49f-4a0 4a2 4a4-4cc 4ce-4d0 4d7-4da 4dc 4df 4e3
>> 4e6-4f8 4fa-580 582-588 58d-58f 591-594 596-597 5a4-5b8 5ba 5bd-5be
>> 5c1 5c3 5c5-5c6 5c8-5e1 5e4-5e5 5eb 5ef 5f1-5f2 5f4 5f6-5fe 701-702
>> 707-714 717 71d 71f-721 724-728 72e-752 754-757 759-764 767 769
>> 771-772 774 779-784 786-78a 78e 791-7a6 7a8-7ab 7ae-7b9 7bb 7bd 7bf
>> 7d0-7d4 7df-14daf380
>> ERROR:too many tokens or invalid quoting
>>
>
> The issue isn't the microRL constraint.
>> `can_log_vfs_start()` & `can::AddLogger()` don't support multiple
> filters in a string, so you're limited by the maximum argument count as
> defined by the command registration, in this case 9 (see
> `OvmsCanLogVFSInit::OvmsCanLogVFSInit()`).
(As I later discovered!)
> You can raise that limit without adding RAM requirements, it's just an
> argc validation.
> If you do so, please copy to all log formats.
Understood.
> Another option could be to add a negation syntax & function for the log
> filters, if that helps. Or to add a special filter option to skip all-
> zero frames.
I don't think that helps, there are some pids that sometimes have all
zero payload bytes (e.g. 0x063 which I use to determine "is running"):
1772821542.210018 1R11 063 00 00 00 00 00 00
1772821741.875479 1R11 063 00 00 00 f5 00 00
1772821683.149862 1R11 063 00 00 16 82 00 00
1772821685.590338 1R11 063 00 00 14 00 00 00
1772821741.976706 1R11 063 00 00 00 00 00 00
Appended is what I did locally for testing, raising _COMMAND_TOKEN_NMB
impacts the stack use of several routines in microrl.c, I can't judge if
that's a problem or not.
Two other things I see: the usage message has way more info about the
syntax than the user manual:
"<path> [filter1] ... [filterN]\n"
"Filter: <bus> | <id>[-<id>] | <bus>:<id>[-<id>]\n"
"Example: 2:2a0-37f",
vs
or log specific CAN packets by applying a filter e.g 0x55b the
Nissan LEAF SoC CAN message
ovms# can log start vfs crtd /sd/can.crtd 55b
PR #1367 is my initial attempt at this.
Also, validation of the filter arguments needs to be stricter, currently
just about any junk string is "accepted" as a filter:
OVMS# can log start vfs crtd /sd/ct5-14.crtd asdjfjkadsfj
CAN logging to VFS active: Type:vfs Format:crtd(discard) Filter:00a-d
Vehicle:CT5 Path:/sd/ct5-14.crtd
Craig
========================================================================
sea 82 % git diff master
diff --git a/vehicle/OVMS.V3/components/can/src/canlog_vfs.cpp
b/vehicle/OVMS.V3/components/can/src/canlog_vfs.cpp
index 0fe74e80..b3194ca0 100644
--- a/vehicle/OVMS.V3/components/can/src/canlog_vfs.cpp
+++ b/vehicle/OVMS.V3/components/can/src/canlog_vfs.cpp
@@ -82,7 +82,7 @@ OvmsCanLogVFSInit::OvmsCanLogVFSInit()
"<path> [filter1] ... [filterN]\n"
"Filter: <bus> | <id>[-<id>] | <bus>:<id>[-<id>]\n"
"Example: 2:2a0-37f",
- 1, 9, true, vfs_file_validate);
+ 1, _COMMAND_TOKEN_NMB, true, vfs_file_validate);
}
}
}
diff --git a/vehicle/OVMS.V3/components/microrl/microrl_config.h
b/vehicle/OVMS.V3/components/microrl/microrl_config.h
index 614b9614..e8b2a9c7 100644
--- a/vehicle/OVMS.V3/components/microrl/microrl_config.h
+++ b/vehicle/OVMS.V3/components/microrl/microrl_config.h
@@ -21,7 +21,7 @@ typed in command line exceed this value, then prints
message about it and
command line not to be parced and 'execute' callback will not calls.
Token is word separate by white space, for example 3 token line:
"IRin> set mode test" */
-#define _COMMAND_TOKEN_NMB 16
+#define _COMMAND_TOKEN_NMB 128
/*
Define you prompt string here. You can use colors escape code, for
highlight you prompt,
_______________________________________________
OvmsDev mailing list
OvmsDev@lists.openvehicles.com
http://lists.openvehicles.com/mailman/listinfo/ovmsdev