summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <daniel.silverstone@codethink.co.uk>2018-04-05 17:16:21 +0100
committerDaniel Silverstone <daniel.silverstone@codethink.co.uk>2018-04-05 17:16:21 +0100
commite1d861381b3abce23798458122cf80315062c4da (patch)
treebd8c67fca85ec14603012d7523d17b25927302eb
parent61499b36d4f8657e792dc1174ad96f08396489ef (diff)
downloadcanopied-e1d861381b3abce23798458122cf80315062c4da.tar.bz2
Sample yaml for the ioniq bmc
-rw-r--r--definitions/raw.yaml284
1 files changed, 284 insertions, 0 deletions
diff --git a/definitions/raw.yaml b/definitions/raw.yaml
new file mode 100644
index 0000000..a48878d
--- /dev/null
+++ b/definitions/raw.yaml
@@ -0,0 +1,284 @@
+# Raw data definitions
+# These take the form of ISO-TP request/reply sets, and then a raw breakdown of
+# the values which result from that.
+
+# Each entry is a map which must have:
+# name: identifier
+# description: Some nice description of what this pid thing is
+# request:
+# sendto: 0xecu
+# recvfrom: 0xecu # defaults to sendto + 8
+# flowctrl: 0xecu # defaults to sendto
+# packet: [0xva, 0xlu, 0xes]
+# response:
+# length: nnn # Optional, don't include if you don't want a length check
+# values:
+# - name: identifier
+# offset: bytenr
+# length: numbytes
+# check: [0xso, 0xme, 0xby, 0xte] # Use if you just want to sanity check
+# kind: somekind # one of bit, bits, signed, unsigned
+# endian: little or big, defaults to big, unnecessary for non-multibyte
+# base: bitnr if appropriate
+# count: nbits if appropriate
+
+# This is the BMC - the battery management controller?
+
+- name: bmc1
+ description: BMC primary data set
+ request:
+ sendto: 0x7e4
+ packet: [0x21, 0x01]
+ response:
+ length: 61
+ values:
+ - name: bmc_fixed
+ offset: 0
+ length: 6
+ check: [0x61, 0x01, 0xFF, 0xFF, 0xFF, 0xFF]
+ - name: soc_bms
+ offset: 6
+ length: 1
+ kind: unsigned
+ - name: charge_available
+ offset: 7
+ length: 2
+ kind: unsigned
+ - name: discharge_available
+ offset: 9
+ length: 2
+ kind: unsigned
+ - name: charging
+ offset: 11
+ length: 1
+ kind: bit
+ base: 7
+ - name: rapid_port
+ offset: 11
+ length: 1
+ kind: bit
+ base: 6
+ - name: normal_port
+ offset: 11
+ length: 1
+ kind: bit
+ base: 5
+ - name: weld_flag
+ offset: 11
+ length: 1
+ kind: bit
+ base: 4
+ - name: fault
+ offset: 11
+ length: 1
+ kind: bit
+ base: 3
+ - name: warning
+ offset: 11
+ length: 1
+ kind: bit
+ base: 2
+ - name: controllable
+ offset: 11
+ length: 1
+ kind: bit
+ base: 1
+ - name: main_relay
+ offset: 11
+ length: 1
+ kind: bit
+ base: 0
+ - name: battery_current
+ offset: 12
+ length: 2
+ kind: signed
+ - name: battery_voltage
+ offset: 14
+ length: 2
+ kind: unsigned
+ - name: battery_maxtemp
+ offset: 15
+ length: 1
+ kind: unsigned
+ - name: battery_mintemp
+ offset: 16
+ length: 1
+ kind: unsigned
+ - name: battery_temp1
+ offset: 17
+ length: 1
+ kind: unsigned
+ - name: battery_temp2
+ offset: 18
+ length: 1
+ kind: unsigned
+ - name: battery_temp3
+ offset: 19
+ length: 1
+ kind: unsigned
+ - name: battery_temp4
+ offset: 20
+ length: 1
+ kind: unsigned
+ - name: battery_temp5
+ offset: 21
+ length: 1
+ kind: unsigned
+ - name: battery_inlet_temp
+ offset: 23
+ length: 1
+ kind: unsigned
+ - name: max_cell_voltage
+ offset: 24
+ length: 1
+ kind: unsigned
+ - name: max_cell_num
+ offset: 25
+ length: 1
+ kind: unsigned
+ - name: min_cell_voltage
+ offset: 26
+ length: 1
+ kind: unsigned
+ - name: min_cell_num
+ offset: 27
+ length: 1
+ kind: unsigned
+ - name: fan_status
+ offset: 28
+ length: 1
+ kind: unsigned
+ - name: fan_feedback
+ offset: 29
+ length: 1
+ kind: unsigned
+ - name: aux_battery_voltage
+ offset: 30
+ length: 1
+ kind: unsigned
+ - name: cumulative_charge_current
+ offset: 31
+ length: 4
+ kind: unsigned
+ - name: cumulative_discharge_current
+ offset: 35
+ length: 4
+ kind: unsigned
+ - name: cumulative_charge_energy
+ offset: 39
+ length: 4
+ kind: unsigned
+ - name: cumulative_discharge_energy
+ offset: 43
+ length: 4
+ kind: unsigned
+ - name: cumulative_operating_time
+ offset: 47
+ length: 4
+ kind: unsigned
+ - name: maybe_car_on
+ offset: 51
+ length: 1
+ kind: bit
+ base: 3
+ - name: inverter_capacitor_voltage
+ offset: 52
+ length: 2
+ kind: unsigned
+ - name: drive_motor_speed1
+ offset: 54
+ length: 2
+ kind: unsigned
+ - name: drive_motor_speed2
+ offset: 56
+ length: 2
+ kind: unsigned
+ - name: isolation_resistance
+ offset: 58
+ length: 2
+ kind: unsigned
+
+- name: bmc2
+ description: BMC secondary data set
+ request:
+ sendto: 0x7e4
+ packet: [0x21, 0x05]
+ response:
+ length: 45
+ values:
+ - name: bmc_fixed
+ offset: 0
+ length: 6
+ check: [0x61, 0x05, 0xFF, 0xFF, 0xFF, 0xFF]
+ - name: battery_temp6
+ offset: 11
+ length: 1
+ kind: unsigned
+ - name: battery_temp7
+ offset: 12
+ length: 1
+ kind: unsigned
+ - name: battery_temp8
+ offset: 13
+ length: 1
+ kind: unsigned
+ - name: battery_temp9
+ offset: 14
+ length: 1
+ kind: unsigned
+ - name: battery_temp10
+ offset: 15
+ length: 1
+ kind: unsigned
+ - name: battery_temp11
+ offset: 16
+ length: 1
+ kind: unsigned
+ - name: battery_temp12
+ offset: 17
+ length: 1
+ kind: unsigned
+ - name: available_charge_power
+ offset: 18
+ length: 2
+ kind: unsigned
+ - name: available_discharge_power
+ offset: 20
+ length: 2
+ kind: unsigned
+ - name: battery_cell_voltate_deviation
+ offset: 22
+ length: 1
+ kind: unsigned
+ - name: airbag_h_duty_cycle
+ offset: 23
+ length: 1
+ kind: unsigned
+ - name: battery_heater_temp1
+ offset: 24
+ length: 1
+ kind: unsigned
+ - name: battery_heater_temp2
+ offset: 25
+ length: 1
+ kind: unsigned
+ - name: state_of_health
+ offset: 26
+ length: 2
+ kind: unsigned
+ - name: max_deterioration_cell_num
+ offset: 28
+ length: 1
+ kind: unsigned
+ - name: min_deterioration
+ offset: 29
+ length: 2
+ kind: unsigned
+ - name: min_deterioration_cell_num
+ offset: 31
+ length: 1
+ kind: unsigned
+ - name: soc_display
+ offset: 32
+ length: 1
+ kind: unsigned