Equipment-and-Tool-Institute / j1939-84

J1939-84 implementation for etools.org
MIT License
7 stars 6 forks source link

Error Message Displayed instead of Active technology table #1247

Closed ericthomasswenson closed 1 month ago

ericthomasswenson commented 1 year ago

Error Message Displayed instead of Active technology table

11:00:41.8538 Destination Specific GHGTTS Request to Engine #1 (0) 11:00:41.8584 18EA00F9 [3] FF FA 00 (TX) 11:00:41.9026 1CFAFF00 [45] [05 00 00 00 00 06 00](tel:05 00 00 00 00 06 00) [00 00 00 07 00 00 00](tel:00 00 00 07 00 00 00) 00 F6 [00 00 00 00](tel:00 00 00 00) F7 [00 00 00 00](tel:00 00 00 00) F8 [00 00 00 00](tel:00 00 00 00) F9 [00 00 00 00](tel:00 00 00 00) FA [00 00 00 00](tel:00 00 00 00) F5 [00 00 00 00](tel:00 00 00 00) Green House Gas Stored 100 Hour Active Technology Tracking from Engine #1 (0): Active Technology: Vehicle Speed Limiting Technology (5), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Predictive Cruise Control (6), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Auto Neutral (7), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 5 (246), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 4 (247), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 3 (248), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 2 (249), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 1 (250), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 6 (245), Time = 0,000 s, Vehicle Distance = 0,000 km

ERROR: Error: For input string: "0,000"

End Test 1.26 - Data stream support verification

ericthomasswenson commented 1 year ago

11:00:41.7636 Destination Specific GHGTTL Request to Engine #1 (0) 11:00:41.7670 18EA00F9 [3] 01 FB 00 (TX) 11:00:41.8062 1CFB0100 [81] 05 B0 [01 00 00 36 03 00 00](tel:01 00 00 36 03 00 00) [06 00 00 00 00 00 00](tel:06 00 00 00 00 00 00) [00 00 07 00 00 00 00](tel:00 00 07 00 00 00 00) [00 00 00 00](tel:00 00 00 00) F6 [00 00 00 00 00 00 00](tel:00 00 00 00 00 00 00) 00 F7 [00 00 00 00 00 00 00](tel:00 00 00 00 00 00 00) 00 F8 [00 00 00 00 00 00 00](tel:00 00 00 00 00 00 00) 00 F9 [00 00 00 00 00 00 00](tel:00 00 00 00 00 00 00) 00 FA [00 00 00 00 00 00 00](tel:00 00 00 00 00 00 00) 00 F5 [00 00 00 00 00 00 00](tel:00 00 00 00 00 00 00) 00 Green House Gas Lifetime Active Technology Tracking from Engine #1 (0): Active Technology: Vehicle Speed Limiting Technology (5), Time = 432,000 s, Vehicle Distance = 4110,000 m Active Technology: Predictive Cruise Control (6), Time = 0,000 s, Vehicle Distance = 0,000 m Active Technology: Auto Neutral (7), Time = 0,000 s, Vehicle Distance = 0,000 m Active Technology: Mfg Defined Active Technology 5 (246), Time = 0,000 s, Vehicle Distance = 0,000 m Active Technology: Mfg Defined Active Technology 4 (247), Time = 0,000 s, Vehicle Distance = 0,000 m Active Technology: Mfg Defined Active Technology 3 (248), Time = 0,000 s, Vehicle Distance = 0,000 m Active Technology: Mfg Defined Active Technology 2 (249), Time = 0,000 s, Vehicle Distance = 0,000 m Active Technology: Mfg Defined Active Technology 1 (250), Time = 0,000 s, Vehicle Distance = 0,000 m Active Technology: Mfg Defined Active Technology 6 (245), Time = 0,000 s, Vehicle Distance = 0,000 m

11:00:41.8174 Destination Specific GHGTTA Request to Engine #1 (0) 11:00:41.8217 18EA00F9 [3] 00 FB 00 (TX) 11:00:41.8514 1CFB0000 [45] [05 00 00 00 00 06 00](tel:05 00 00 00 00 06 00) [00 00 00 07 00 00 00](tel:00 00 00 07 00 00 00) 00 F6 [00 00 00 00](tel:00 00 00 00) F7 [00 00 00 00](tel:00 00 00 00) F8 [00 00 00 00](tel:00 00 00 00) F9 [00 00 00 00](tel:00 00 00 00) FA [00 00 00 00](tel:00 00 00 00) F5 [00 00 00 00](tel:00 00 00 00) Green House Gas Active 100 Hour Active Technology Tracking from Engine #1 (0): Active Technology: Vehicle Speed Limiting Technology (5), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Predictive Cruise Control (6), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Auto Neutral (7), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 5 (246), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 4 (247), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 3 (248), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 2 (249), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 1 (250), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 6 (245), Time = 0,000 s, Vehicle Distance = 0,000 km

11:00:41.8538 Destination Specific GHGTTS Request to Engine #1 (0) 11:00:41.8584 18EA00F9 [3] FF FA 00 (TX) 11:00:41.9026 1CFAFF00 [45] [05 00 00 00 00 06 00](tel:05 00 00 00 00 06 00) [00 00 00 07 00 00 00](tel:00 00 00 07 00 00 00) 00 F6 [00 00 00 00](tel:00 00 00 00) F7 [00 00 00 00](tel:00 00 00 00) F8 [00 00 00 00](tel:00 00 00 00) F9 [00 00 00 00](tel:00 00 00 00) FA [00 00 00 00](tel:00 00 00 00) F5 [00 00 00 00](tel:00 00 00 00) Green House Gas Stored 100 Hour Active Technology Tracking from Engine #1 (0): Active Technology: Vehicle Speed Limiting Technology (5), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Predictive Cruise Control (6), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Auto Neutral (7), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 5 (246), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 4 (247), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 3 (248), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 2 (249), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 1 (250), Time = 0,000 s, Vehicle Distance = 0,000 km Active Technology: Mfg Defined Active Technology 6 (245), Time = 0,000 s, Vehicle Distance = 0,000 km

ERROR: Error: For input string: "0,000"

End Test 1.26 - Data stream support verification

ericthomasswenson commented 1 year ago

Suggest trying these three responses as a Unit Test.

battjt commented 1 year ago

The user's computer is configured to use the European style , instead of the north American style . as the decimal separator. When making the table, the value was converted to a string, then back to a double using different libraries.

Running the unit tests configured for French Canada results in lots of differences, and includes this error. Removing the conversion fixes this error, but the number of other differences will be very difficult to accomodate in the unit tests. Instead I will add a test to verify that this particular bugs isn't reintroduced, but locale related bugs may crop up in other parts of the application.

Supporting European number formats in the units tests will be a challenge. It would essentially require twice the unit tests.