Generic Counters (GC)
8 counters to record driving events, integrable with Drive Score.
Counter Semantics
| Index | Name | Semantics | Typical Use |
|---|---|---|---|
| GC0 | OVERSPEED | Fixed | Speed violations |
| GC1 | OVERREV | Fixed | RPM violations |
| GC2 | HARSH_ACCEL | Fixed | Harsh accelerations (greater than 0.40g) |
| GC3 | HARSH_BRAKE | Fixed | Harsh braking (less than -0.50g) |
| GC4 | HARSH_CORNER | Fixed | Harsh corners (greater than 0.50g) |
| GC5 | CUSTOM_1 | Client | Ex: cell phone usage |
| GC6 | CUSTOM_2 | Client | Ex: fatigue |
| GC7 | CUSTOM_3 | Client | Custom events |
QTPGC - Query Individual Counter
QTPGC,<index>Response
RTPGC,<index>,<value>Example
>QTPGC,0<
>RTPGC,0,8;ID=865413053386354;*4A< # 8 OVERSPEED eventsQTPGCL - List of Enabled Counters
>QTPGCL<
>RTPGCL,1,1,1,1,1,0,0,0;ID=865413053386354;*0F<Returns 8 flags (0/1) indicating which counters are enabled.
STPGCE - Enable/Disable Counters
Individual
STPGCE,<index>,<0|1>All (wildcard)
STPGCE,*,<0|1>Examples
// Enable GC0
>STPGCE,0,1<
>RTPGCE,0,1; GC0 enabled ;ID=865413053386354;*02<
// Enable all
>STPGCE,*,1<
>RTPGCE,*,1; All GCs enabled ;ID=865413053386354;*3A<
// Disable all
>STPGCE,*,0<
>RTPGCE,*,0; All GCs disabled ;ID=865413053386354;*4E<Disabled counters do not increment but maintain their value.
STPGCI - Increment Counter
Increments a counter by +1.
STPGCI,<index>Example
>STPGCI,0<
>RTPGCI,0,9; GC0 incremented to 9 ;ID=865413053386354;*6F<Typically used by external modules (HM, RL) through automatic rules.
STPGCS - Set Direct Value
STPGCS,<index>,<value>Example
>STPGCS,0,0<
>RTPGCS,0,0; GC0 set to 0 ;ID=865413053386354;*77<Health Monitor Integration
Example of automatic configuration:
// Configure HM for harsh acceleration
>SHM00E,0,7,20,3,4000,10<
// Rule: HM00 active → increment GC0
>SRL20E;TRG=HM00+;ACC={STPGCI,0}<| Trigger | Counter |
|---|---|
HM00+ | GC0 (OVERSPEED) |
HM01+ | GC1 (OVERREV) |
HM02+ | GC2 (HARSH_ACCEL) |
HM03+ | GC3 (HARSH_BRAKE) |
Last updated