blocktrain 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +1 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/CODE_OF_CONDUCT.md +3 -0
- data/config/signal_aliases.yml +88 -1
- data/config/sources/signals.csv +122 -0
- data/lib/blocktrain/aggregations/terms_aggregation.rb +7 -4
- data/lib/blocktrain/lookups.rb +14 -3
- data/lib/blocktrain/query.rb +21 -13
- data/lib/blocktrain/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTM3NjNiZGNiN2M2N2UwYWJiOTg0YjUxNjAwMzY3OTFhODlmMGQzMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDg5NmYzMGMzMDgzMTU4MjMyYTdkZDdmMTJkOWQ5NGFhZmNhMWE1MA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmVkZWE4ZWVjYzU3MmI3ZTgzZWI0ODlhMjlhNDg4NjA2NDkwMjdiMmM3ZGE3
|
10
|
+
MDZiZGJjYzZlYjQzY2I3YWEwZjFiMTAyNzg0ZDc4ZGVjNGM4ZGU5N2VhMDE2
|
11
|
+
NjQyNWNlMTU1OTkyYjYzZDQxYzc1NGY1NmNhMjRlYjdkOTU2NGU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGYzM2U5ZDdlN2E4ZWVhYjAzMDMyNzY4NzVmZjFkNDRiMmNhMGQyZjJhZmY5
|
14
|
+
NjVjYjU2NTY1YmJhYjg1NjdkNWUwMjEwYjgzOGI4MjAyMWYxM2YzODMwYmI3
|
15
|
+
OTYzM2ZmZjZkMzlmY2Y5YTJhODI0YTFiMmM0YTI3NjgyMWI4MWU=
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
## [v0.2.2](https://github.com/TheODI-UD2D/blocktrain/tree/v0.2.2) (2015-11-11)
|
4
4
|
[Full Changelog](https://github.com/TheODI-UD2D/blocktrain/compare/v0.2.1...v0.2.2)
|
5
5
|
|
6
|
+
**Merged pull requests:**
|
7
|
+
|
8
|
+
- Add task to publish gem [\#8](https://github.com/TheODI-UD2D/blocktrain/pull/8) ([pezholio](https://github.com/pezholio))
|
9
|
+
|
6
10
|
## [v0.2.1](https://github.com/TheODI-UD2D/blocktrain/tree/v0.2.1) (2015-11-10)
|
7
11
|
[Full Changelog](https://github.com/TheODI-UD2D/blocktrain/compare/v0.2.0...v0.2.1)
|
8
12
|
|
data/CODE_OF_CONDUCT.md
ADDED
data/config/signal_aliases.yml
CHANGED
@@ -1 +1,88 @@
|
|
1
|
-
|
1
|
+
train_run_distance: "MSV_Xs_TrnRnDstTot"
|
2
|
+
this_cab_active: "@.MWT.R_T3_1.RCV_S_ThisCabAct"
|
3
|
+
atp_worst_case_forward_location: "@.MWT.S_ATC_T4_1.SSV_X_AtpWrstFwLocSegId"
|
4
|
+
atp_worst_case_forward_location_offset: "@.MWT.S_ATC_T4_1.SSV_X_AtpWrstFwLocOffs"
|
5
|
+
train_speed: "@.MWT.M_T3_1.MRV_TrnSpd_1.MRV_Xv_Trn"
|
6
|
+
line_voltage: "@.MWT.CT_CI_T2_1.CI_COP_XU_Ln"
|
7
|
+
line_current: "@.MWT.CT_CI_T2_1.CI_COP_XI_Ln"
|
8
|
+
hscb_close: "@.MWT.H_T2_1.DX54_Out2_C_HscbCl"
|
9
|
+
order_hscb_to_open_from_cop: "@.MWT.H_T3_1.HCV_C_CopHscbOp"
|
10
|
+
cop_is_ok_for_supervision: "@.MWT.CT_CI_T3_1.CI_COP_S_CopOk"
|
11
|
+
mcs_driving_mode_forward: "@.MWT.CT_CI_T3_1.DI13_In5_S_McsDrvMdFw"
|
12
|
+
mcs_driving_mode_inter: "@.MWT.CT_CI_T3_1.DI13_In4_S_McsDrvMdInter"
|
13
|
+
mcs_driving_mode_reverse: "@.MWT.CT_CI_T3_1.DI13_In3_S_McsDrvMdRv"
|
14
|
+
mcs_driving_mode_protected_manual: "@.MWT.CT_CI_T3_1.DI13_In6_S_McsDrvMdPrMan"
|
15
|
+
mcs_driving_mode_auto: "@.MWT.CT_CI_T3_1.DX17_In7_S_McsDrvMdAuto"
|
16
|
+
mcs_driving_mode_selected: "@.MWT.M_T4_1.MCV_S_McsDrvMdSd"
|
17
|
+
actuate_braking: "@.MWT.CT_CI_T2_1.DI20_In9_TrLn_AB"
|
18
|
+
actuate_motor: "@.MWT.CT_CI_T2_1.DI20_In10_TrLn_AM"
|
19
|
+
tr_br_effort_reference_1: "@.MWT.M_T2_1.MRV_W_PwmRef1"
|
20
|
+
tr_br_effort_reference_2: "@.MWT.M_T2_1.MRV_W_PwmRef2"
|
21
|
+
traction_brake_effort_reference: "@.MWT.M_T2_1.MRV_W_TrBrEffRef"
|
22
|
+
emergency_brake_applied: "@.MWT.B_T3_1.BSV_S_EmBrApl"
|
23
|
+
brake_cylinder_pressure_car_a_bogie_a: "@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarABgA"
|
24
|
+
brake_cylinder_pressure_car_a_bogie_d: "@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarABgD"
|
25
|
+
brake_cylinder_pressure_car_b_bogie_a: "@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarBBgA"
|
26
|
+
brake_cylinder_pressure_car_b_bogie_d: "@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarBBgD"
|
27
|
+
brake_cylinder_pressure_car_c_bogie_a: "@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarCBgA"
|
28
|
+
brake_cylinder_pressure_car_c_bogie_d: "@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarCBgD"
|
29
|
+
brake_cylinder_pressure_car_d_bogie_a: "@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarDBgA"
|
30
|
+
brake_cylinder_pressure_car_d_bogie_d: "@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarDBgD"
|
31
|
+
main_reservoir_pressure: "@.MWT.CT_CI_T4_1.CI_BGW_Wp_MnReservoir"
|
32
|
+
wsp_active: "@.MWT.CT_CI_T3_1.CI_BGW_S_WspAct"
|
33
|
+
all_doors_closed: "@.MWT.CT_CI_T3_1.DX11_In3_S_AllDrCld"
|
34
|
+
mcm_state: "@.MWT.P_T3_1.PII_DCUM1_X_McmSt"
|
35
|
+
mcm_state: "@.MWT.P_T3_1.PII_DCUM2_X_McmSt"
|
36
|
+
traction_brake_achieved: "@.MWT.P_T2_1.PII_DCUM1_XF_TrBrAch"
|
37
|
+
actual_chopper_power: "@.MWT.P_T3_1.PII_DCUM1_XP_Cp"
|
38
|
+
actual_motor_power: "@.MWT.P_T3_1.PII_DCUM1_XP_Mt"
|
39
|
+
available_dynamic_brake: "@.MWT.P_T3_1.PII_DCUM1_XF_BrAvl"
|
40
|
+
estimated_brake_resistor_temparature: "@.MWT.P_T4_1.PII_DCUM1_XT_EstBrRs"
|
41
|
+
estimated_brake_resistor_temparature: "@.MWT.P_T4_1.PII_DCUM2_XT_EstBrRs"
|
42
|
+
actual_chopper_power: "@.MWT.P_T3_1.PII_DCUM2_XP_Cp"
|
43
|
+
actual_motor_power: "@.MWT.P_T4_1.PII_DCUM2_XP_Mt"
|
44
|
+
available_dynamic_brake: "@.MWT.P_T3_1.PII_DCUM2_XF_BrAvl"
|
45
|
+
dynamic_brake_ok: "@.MWT.P_T2_1.PII_DCUM1_S_DynBrOk"
|
46
|
+
dynamic_brake_ok: "@.MWT.P_T2_1.PII_DCUM2_S_DynBrOk"
|
47
|
+
lma_end_location: "@.MWT.CT_CI_T4_1.CI_ATP1_X_LmaEndLocSegId"
|
48
|
+
lma_end_location_offset: "@.MWT.CT_CI_T4_1.CI_ATP1_X_LmaEndLocOffset"
|
49
|
+
lma_end_location: "@.MWT.CT_CI_T4_1.CI_ATP2_X_LmaEndLocSegId"
|
50
|
+
lma_end_location_offset: "@.MWT.CT_CI_T4_1.CI_ATP2_X_LmaEndLocOffset"
|
51
|
+
ato_start_button_1_pressed: "@.MWT.CT_CI_T3_1.DI13_In7_S_AtoPb1Act"
|
52
|
+
ato_start_button_2_pressed: "@.MWT.CT_CI_T3_1.DI13_In8_S_AtoPb2Act"
|
53
|
+
passesnger_load_car_a: "@.MWT.B_T5_1.BRV_X_prctPssngrLdCarA"
|
54
|
+
passesnger_load_car_b: "@.MWT.B_T5_1.BRV_X_prctPssngrLdCarB"
|
55
|
+
passesnger_load_car_c: "@.MWT.B_T5_1.BRV_X_prctPssngrLdCarC"
|
56
|
+
passesnger_load_car_d: "@.MWT.B_T5_1.BRV_X_prctPssngrLdCarD"
|
57
|
+
passenger_load_to_ato: "@.MWT.B_T5_1.BRV_X_TrnLd"
|
58
|
+
compressor_start: "@.MWT.A_T4_1.ACV_C_CmprSta"
|
59
|
+
compressor_motor_running: "@.MWT.A_T4_1.ASV_S_CmprMtRn"
|
60
|
+
pressure_low_limit: "@.MWT.A_T4_1.ACV_MsCmpr_1.P_Xp_PrsLoLim"
|
61
|
+
pressure_low_limit: "@.MWT.A_T4_1.ASV_AirPrs_1.P_Xp_PrsLoLim"
|
62
|
+
sync_all_clocks: "@.MWT.CT_CO_T4_1.CP_C_TrgSncAll"
|
63
|
+
sync_local_clock: "@.MWT.CT_CO_T4_1.CP_C_TrgSncLc"
|
64
|
+
sync_master_clock_from_pdp1: "@.MWT.CT_CO_T4_1.CP_C_TrgSncMsPdp1"
|
65
|
+
sync_master_clock_from_pdp2: "@.MWT.CT_CO_T4_1.CP_C_TrgSncMsPdp2"
|
66
|
+
sync_pdp_clock: "@.MWT.CT_CO_T4_1.CP_C_TrgSncPdp"
|
67
|
+
year: "@.MWT.CT_CO_T4_1.CP_X_AnsiYear"
|
68
|
+
month: "@.MWT.CT_CO_T4_1.CP_X_AnsiMon"
|
69
|
+
day: "@.MWT.CT_CO_T4_1.CP_X_AnsiDay"
|
70
|
+
hour: "@.MWT.CT_CO_T4_1.CP_X_AnsiHour"
|
71
|
+
minute: "@.MWT.CT_CO_T4_1.CP_X_AnsiMin"
|
72
|
+
second: "@.MWT.CT_CO_T4_1.CP_X_AnsiSec"
|
73
|
+
train_number: "@.MWT.S_ATC_T4_1.CO_ATO_X_TrnNo"
|
74
|
+
crew_number: "@.MWT.S_ATC_T4_1.CO_ATO_X_CrwNo"
|
75
|
+
destination_code: "@.MWT.S_ATC_T4_1.CO_ATO_X_DstntnCode"
|
76
|
+
train_service_code: "@.MWT.S_ATC_T4_1.CO_ATO_X_TrnSrvCode"
|
77
|
+
train_fault_report_code: "@.MWT.S_ATC_T4_1.CO_ATO_X_TrnFltRepCode"
|
78
|
+
train_stock_type: "@.MWT.S_ATC_T4_1.CO_ATO_X_TrnStckTp"
|
79
|
+
train_unit_number_1st: "@.MWT.S_ATC_T4_1.CO_ATO_X_FrstTrnUntId"
|
80
|
+
train_unit_number_2nd: "@.MWT.S_ATC_T4_1.CO_ATO_X_SecTrnUntId"
|
81
|
+
train_mode: "@.MWT.S_ATC_T4_1.CO_ATO_X_TrnMd"
|
82
|
+
a_car_temperature: "@.MWT.CT_CI_T5_1.AX19_In2_X_AcarTmp"
|
83
|
+
b_car_temperature: "@.MWT.CT_CI_T5_1.AX19_In4_X_BcarTmp"
|
84
|
+
c_car_temperature: "@.MWT.CT_CI_T4_1.AX47_In4_X_CcarTmp"
|
85
|
+
d_car_temperature: "@.MWT.CT_CI_T4_1.AX47_In2_X_DcarTmp"
|
86
|
+
pv1_temperature: "@.MWT.K_T5_1.KCV_X_PrsVnt1TmpIn"
|
87
|
+
pv1_temperature: "@.MWT.K_T5_1.KEV_X_PrsVnt1Tmp"
|
88
|
+
pv2_temperature: "@.MWT.K_T5_1.KEV_X_PrsVnt2Tmp"
|
@@ -0,0 +1,122 @@
|
|
1
|
+
Signal Name,Memory Address,Signal Description,VCU's Logged,,JSON,,Type,Format,Description
|
2
|
+
MSV_Xs_TrnRnDstTot,2e49278L,Train Run distance,"82,88",,"""2e49278L,""",2E49278L,Value,32 bit signed int,Odometer
|
3
|
+
@.MWT.R_T3_1.RCV_S_ThisCabAct,2e4adec,This Cab Active,"82,88",,"""2e4adec,""",2E4ADEC,Status Flag,boolean,
|
4
|
+
@.MWT.S_ATC_T4_1.SSV_X_AtpWrstFwLocSegId,2e5485aW,ATP worst case forward location,"82,88",,"""2e5485aW,""",2E5485AW,Value,16 bit signed int,Which segment train is in - see attached map
|
5
|
+
@.MWT.S_ATC_T4_1.SSV_X_AtpWrstFwLocOffs,2e54858W,ATP worst case forward location Offset,"82,88",,"""2e54858W,""",2E54858W,Value,16 bit signed int,How far train is into segment
|
6
|
+
@.MWT.M_T3_1.MRV_TrnSpd_1.MRV_Xv_Trn,2e491eeW,Train Speed,"82,88",,"""2e491eeW,""",2E491EEW,Value,16 bit signed int,
|
7
|
+
@.MWT.CT_CI_T2_1.CI_COP_XU_Ln,2e4414aW,Line Voltage,"82,84,86,88",,"""2e4414aW,""",2E4414AW,Value,16 bit signed int,
|
8
|
+
@.MWT.CT_CI_T2_1.CI_COP_XI_Ln,2e4414cW,Line Current,"82,84,86,88",,"""2e4414cW,""",2E4414CW,Value,16 bit signed int,
|
9
|
+
@.MWT.H_T2_1.DX54_Out2_C_HscbCl,2e44cb0,HSCB Close,"82,84,86,88",,"""2e44cb0,""",2E44CB0,Status Flag,boolean,High speed circuit breaker
|
10
|
+
@.MWT.H_T3_1.HCV_C_CopHscbOp,2e48698,Order HSCB to open from COP,"82,84,86,88",,"""2e48698,""",2E48698,Status Flag,boolean,Cut out position
|
11
|
+
@.MWT.CT_CI_T3_1.CI_COP_S_CopOk,2e46508,COP is OK for supervision,"82,84,86,88",,"""2e46508,""",2E46508,Status Flag,boolean,
|
12
|
+
@.MWT.CT_CI_T3_1.DI13_In5_S_McsDrvMdFw,2e4645a,MCS Driving Mode Forward,"82,88",,"""2e4645a,""",2E4645A,Status Flag,boolean,Master control switch
|
13
|
+
@.MWT.CT_CI_T3_1.DI13_In4_S_McsDrvMdInter,2e46459,MCS Driving Mode Inter,"82,88",,"""2e46459,""",2E46459,Status Flag,boolean,
|
14
|
+
@.MWT.CT_CI_T3_1.DI13_In3_S_McsDrvMdRv,2e46458,MCS Driving Mode Reverse,"82,88",,"""2e46458,""",2E46458,Status Flag,boolean,
|
15
|
+
@.MWT.CT_CI_T3_1.DI13_In6_S_McsDrvMdPrMan,2e4645b,MCS Driving Mode Protected Manual,"82,88",,"""2e4645b,""",2E4645B,Status Flag,boolean,
|
16
|
+
@.MWT.CT_CI_T3_1.DX17_In7_S_McsDrvMdAuto,2e4647f,MCS Driving Mode Auto,"82,88",,"""2e4647f,""",2E4647F,Status Flag,boolean,
|
17
|
+
@.MWT.M_T4_1.MCV_S_McsDrvMdSd,2e55a2d,MCS Driving Mode Selected,"82,88",,"""2e55a2d,""",2E55A2D,Status Flag,boolean,
|
18
|
+
@.MWT.CT_CI_T2_1.DI20_In9_TrLn_AB,2e44126,Actuate Braking,"82,88",,"""2e44126,""",2E44126,Status Flag,boolean,
|
19
|
+
@.MWT.CT_CI_T2_1.DI20_In10_TrLn_AM,2e44127,Actuate Motor,"82,88",,"""2e44127,""",2E44127,Status Flag,boolean,
|
20
|
+
@.MWT.M_T2_1.MRV_W_PwmRef1,2e450d6W,Tr/Br effort reference 1,"82,88",,"""2e450d6W,""",2E450D6W,Value,16 bit signed int,Traction/ Braking
|
21
|
+
@.MWT.M_T2_1.MRV_W_PwmRef2,2e450d8W,Tr/Br effort reference 2,"82,88",,"""2e450d8W,""",2E450D8W,Value,16 bit signed int,
|
22
|
+
@.MWT.M_T2_1.MRV_W_TrBrEffRef,2e450caW,Traction Brake effort reference,"82,88",,"""2e450caW,""",2E450CAW,Value,16 bit signed int,
|
23
|
+
@.MWT.B_T3_1.BSV_S_EmBrApl,2e493ea,Emergency Brake Applied,"82,88",,"""2e493ea,""",2E493EA,Status Flag,boolean,
|
24
|
+
@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarABgA,2e464b6W,Brake Cylinder Pressure Car A Bogie A,"82,88",,"""2e464b6W,""",2E464B6W,Value,16 bit signed int,
|
25
|
+
@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarABgD,2e464b8W,Brake Cylinder Pressure Car A Bogie D,"82,88",,"""2e464b8W,""",2E464B8W,Value,16 bit signed int,
|
26
|
+
@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarBBgA,2e464baW,Brake Cylinder Pressure Car B Bogie A,"82,88",,"""2e464baW,""",2E464BAW,Value,16 bit signed int,
|
27
|
+
@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarBBgD,2e464bcW,Brake Cylinder Pressure Car B Bogie D,"82,88",,"""2e464bcW,""",2E464BCW,Value,16 bit signed int,
|
28
|
+
@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarCBgA,2e464beW,Brake Cylinder Pressure Car C Bogie A,"82,88",,"""2e464beW,""",2E464BEW,Value,16 bit signed int,
|
29
|
+
@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarCBgD,2e464c0W,Brake Cylinder Pressure Car C Bogie D,"82,88",,"""2e464c0W,""",2E464C0W,Value,16 bit signed int,
|
30
|
+
@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarDBgA,2e464c2W,Brake Cylinder Pressure Car D Bogie A,"82,88",,"""2e464c2W,""",2E464C2W,Value,16 bit signed int,
|
31
|
+
@.MWT.CT_CI_T3_1.CI_BGW_Wp_BcPrsCarDBgD,2e464c4W,Brake Cylinder Pressure Car D Bogie D,"82,88",,"""2e464c4W,""",2E464C4W,Value,16 bit signed int,
|
32
|
+
@.MWT.CT_CI_T4_1.CI_BGW_Wp_MnReservoir,2e4cd7cW,Main Reservoir Pressure,"82,88",,"""2e4cd7cW,""",2E4CD7CW,Value,16 bit signed int,
|
33
|
+
@.MWT.CT_CI_T3_1.CI_BGW_S_WspAct,2e464e7,WSP Active,"82,88",,"""2e464e7,""",2E464E7,Status Flag,boolean,Wheel slip protection
|
34
|
+
@.MWT.CT_CI_T3_1.DX11_In3_S_AllDrCld,2e4643b,All Doors Closed,"82,88",,"""2e4643b,""",2E4643B,Status Flag,boolean,
|
35
|
+
@.MWT.P_T3_1.PII_DCUM1_X_McmSt,2e49e12W,MCM State,"82,84,86,88",,"""2e49e12W,""",2E49E12W,Value,16 bit signed int,Motor commuter module
|
36
|
+
@.MWT.P_T3_1.PII_DCUM2_X_McmSt,2e49e30W,MCM State,"84,86",,"""2e49e30W,""",2E49E30W,Value,16 bit signed int,
|
37
|
+
@.MWT.P_T2_1.PII_DCUM1_XF_TrBrAch,2e4540cW,Traction Brake Achieved,"82,84,86,88",,"""2e4540cW,""",2E4540CW,Value,16 bit signed int,
|
38
|
+
@.MWT.P_T3_1.PII_DCUM1_XP_Cp,2e49eb4W,Actual Chopper Power,"82,84,86,88",,"""2e49eb4W,""",2E49EB4W,Value,16 bit signed int,Rear static brakes
|
39
|
+
@.MWT.P_T3_1.PII_DCUM1_XP_Mt,2e49a5aW,Actual Motor Power,"82,84,86,88",,"""2e49a5aW,""",2E49A5AW,Value,16 bit signed int,
|
40
|
+
@.MWT.P_T3_1.PII_DCUM1_XF_BrAvl,2e49e16W,Available Dynamic Brake,"82,88",,"""2e49e16W,""",2E49E16W,Value,16 bit signed int,
|
41
|
+
@.MWT.P_T4_1.PII_DCUM1_XT_EstBrRs,2e58b40W,Estimated Brake Resistor Temparature,"82,84,86,88",,"""2e58b40W,""",2E58B40W,Value,16 bit signed int,
|
42
|
+
@.MWT.P_T4_1.PII_DCUM2_XT_EstBrRs,2e58b42W,Estimated Brake Resistor Temparature,"84,86",,"""2e58b42W,""",2E58B42W,Value,16 bit signed int,
|
43
|
+
@.MWT.P_T3_1.PII_DCUM2_XP_Cp,2e49eccW,Actual Chopper Power,"84,86",,"""2e49eccW,""",2E49ECCW,Value,16 bit signed int,
|
44
|
+
@.MWT.P_T4_1.PII_DCUM2_XP_Mt,2e58a38W,Actual Motor Power,"84,86",,"""2e58a38W,""",2E58A38W,Value,16 bit signed int,
|
45
|
+
@.MWT.P_T3_1.PII_DCUM2_XF_BrAvl,2e49e2eW,Available Dynamic Brake,"82,88",,"""2e49e2eW,""",2E49E2EW,Value,16 bit signed int,
|
46
|
+
@.MWT.P_T2_1.PII_DCUM1_S_DynBrOk,2e45405,Dynamic Brake OK,"82,84,86,88",,"""2e45405,""",2E45405,Status Flag,boolean,
|
47
|
+
@.MWT.P_T2_1.PII_DCUM2_S_DynBrOk,2e45415,Dynamic Brake OK,"84,86",,"""2e45415,""",2E45415,Status Flag,boolean,
|
48
|
+
@.MWT.CT_CI_T4_1.CI_ATP1_X_LmaEndLocSegId,2e4cfacW,LMA End Location,"82,88",,"""2e4cfacW,""",2E4CFACW,Value,16 bit signed int,Limit of movement autothoity - where the train is allowed to move too
|
49
|
+
@.MWT.CT_CI_T4_1.CI_ATP1_X_LmaEndLocOffset,2e4cfaeW,LMA End Location (Offset),"82,88",,"""2e4cfaeW,""",2E4CFAEW,Value,16 bit signed int,
|
50
|
+
@.MWT.CT_CI_T4_1.CI_ATP2_X_LmaEndLocSegId,2e4cfc0W,LMA End Location,"82,88",,"""2e4cfc0W,""",2E4CFC0W,Value,16 bit signed int,
|
51
|
+
@.MWT.CT_CI_T4_1.CI_ATP2_X_LmaEndLocOffset,2e4cfc2W,LMA End Location (Offset),"82,88",,"""2e4cfc2W,""",2E4CFC2W,Value,16 bit signed int,
|
52
|
+
@.MWT.CT_CI_T3_1.DI13_In7_S_AtoPb1Act,2e4645c,ATO Start Button 1 Pressed,"82,88",,"""2e4645c,""",2E4645C,Status Flag,boolean,Automatic Train Operation
|
53
|
+
@.MWT.CT_CI_T3_1.DI13_In8_S_AtoPb2Act,2e4645d,ATO Start Button 2 Pressed,"82,88",,"""2e4645d,""",2E4645D,Status Flag,boolean,
|
54
|
+
@.MWT.B_T5_1.BRV_X_prctPssngrLdCarA,2e64930W,Passesnger Load Car A (%),"82,88",,"""2e64930W,""",2E64930W,Value,16 bit signed int,0-100% load - Should be 0% when empty can be as high as 20% when empty
|
55
|
+
@.MWT.B_T5_1.BRV_X_prctPssngrLdCarB,2e64932W,Passesnger Load Car B (%),"82,88",,"""2e64932W,""",2E64932W,Value,16 bit signed int,
|
56
|
+
@.MWT.B_T5_1.BRV_X_prctPssngrLdCarC,2e64934W,Passesnger Load Car C (%),"82,88",,"""2e64934W,""",2E64934W,Value,16 bit signed int,
|
57
|
+
@.MWT.B_T5_1.BRV_X_prctPssngrLdCarD,2e64936W,Passesnger Load Car D (%),"82,88",,"""2e64936W,""",2E64936W,Value,16 bit signed int,
|
58
|
+
@.MWT.B_T5_1.BRV_X_TrnLd,2e6493cW,Passenger Load to ATO (%),"82,88",,"""2e6493cW,""",2E6493CW,Value,16 bit signed int,
|
59
|
+
@.MWT.A_T4_1.ACV_C_CmprSta,2e60bc2,Compressor Start,"82,88",,"""2e60bc2,""",2E60BC2,Status Flag,boolean,
|
60
|
+
@.MWT.A_T4_1.ASV_S_CmprMtRn,2e60ba2,Compressor Motor Running,"82,88",,"""2e60ba2,""",2E60BA2,Status Flag,boolean,
|
61
|
+
@.MWT.A_T4_1.ACV_MsCmpr_1.P_Xp_PrsLoLim,2e60d96W,Pressure Low Limit,"82,88",,"""2e60d96W,""",2E60D96W,Value,16 bit signed int,
|
62
|
+
@.MWT.A_T4_1.ASV_AirPrs_1.P_Xp_PrsLoLim,2e60e5eW,Pressure Low Limit,"82,88",,"""2e60e5eW,""",2E60E5EW,Value,16 bit signed int,
|
63
|
+
@.MWT.CT_CO_T4_1.CP_C_TrgSncAll,2e62d14,Sync All Clocks,"82,84,86,88",,"""2e62d14,""",2E62D14,Status Flag,boolean,
|
64
|
+
@.MWT.CT_CO_T4_1.CP_C_TrgSncLc,2e62d15,Sync Local Clock,"82,84,86,88",,"""2e62d15,""",2E62D15,Status Flag,boolean,
|
65
|
+
@.MWT.CT_CO_T4_1.CP_C_TrgSncMsPdp1,2e62d16,Sync Master Clock from PDP1,"82,84,86,88",,"""2e62d16,""",2E62D16,Status Flag,boolean,
|
66
|
+
@.MWT.CT_CO_T4_1.CP_C_TrgSncMsPdp2,2e62d17,Sync Master Clock from PDP2,"82,84,86,88",,"""2e62d17,""",2E62D17,Status Flag,boolean,
|
67
|
+
@.MWT.CT_CO_T4_1.CP_C_TrgSncPdp,2e62d18,Sync PDP Clock,"82,84,86,88",,"""2e62d18,""",2E62D18,Status Flag,boolean,
|
68
|
+
@.MWT.CT_CO_T4_1.CP_X_AnsiYear,2e629c6W,Year,"82,84,86,88",,"""2e629c6W,""",2E629C6W,Value,16 bit signed int,
|
69
|
+
@.MWT.CT_CO_T4_1.CP_X_AnsiMon,2e629c8W,Month,"82,84,86,88",,"""2e629c8W,""",2E629C8W,Value,16 bit signed int,
|
70
|
+
@.MWT.CT_CO_T4_1.CP_X_AnsiDay,2e629caW,Day,"82,84,86,88",,"""2e629caW,""",2E629CAW,Value,16 bit signed int,
|
71
|
+
@.MWT.CT_CO_T4_1.CP_X_AnsiHour,2e629ccW,Hour,"82,84,86,88",,"""2e629ccW,""",2E629CCW,Value,16 bit signed int,
|
72
|
+
@.MWT.CT_CO_T4_1.CP_X_AnsiMin,2e629ceW,Minute,"82,84,86,88",,"""2e629ceW,""",2E629CEW,Value,16 bit signed int,
|
73
|
+
@.MWT.CT_CO_T4_1.CP_X_AnsiSec,2e629d0W,Second,"82,84,86,88",,"""2e629d0W,""",2E629D0W,Value,16 bit signed int,
|
74
|
+
@.MWT.S_ATC_T4_1.CO_ATO_X_TrnNo,2e54840W,Train Number,"82,88",,"""2e54840W,""",2E54840W,Value,16 bit signed int,
|
75
|
+
@.MWT.S_ATC_T4_1.CO_ATO_X_CrwNo,2e54842W,Crew Number,"82,88",,"""2e54842W,""",2E54842W,Value,16 bit signed int,
|
76
|
+
@.MWT.S_ATC_T4_1.CO_ATO_X_DstntnCode,2e54844W,Destination Code,"82,88",,"""2e54844W,""",2E54844W,Value,16 bit signed int,
|
77
|
+
@.MWT.S_ATC_T4_1.CO_ATO_X_TrnSrvCode,2e54846W,Train Service Code,"82,88",,"""2e54846W,""",2E54846W,Value,16 bit signed int,
|
78
|
+
@.MWT.S_ATC_T4_1.CO_ATO_X_TrnFltRepCode,2e5484aW,Train Fault Report Code,"82,88",,"""2e5484aW,""",2E5484AW,Value,16 bit signed int,
|
79
|
+
@.MWT.S_ATC_T4_1.CO_ATO_X_TrnStckTp,2e5484cW,Train Stock Type,"82,88",,"""2e5484cW,""",2E5484CW,Value,16 bit signed int,
|
80
|
+
@.MWT.S_ATC_T4_1.CO_ATO_X_FrstTrnUntId,2e5484eW,Train Unit Number (1st),"82,88",,"""2e5484eW,""",2E5484EW,Value,16 bit signed int,
|
81
|
+
@.MWT.S_ATC_T4_1.CO_ATO_X_SecTrnUntId,2e54850W,Train Unit Number (2nd),"82,88",,"""2e54850W,""",2E54850W,Value,16 bit signed int,
|
82
|
+
@.MWT.S_ATC_T4_1.CO_ATO_X_TrnMd,2e54852W,Train Mode,"82,88",,"""2e54852W,""",2E54852W,Value,16 bit signed int,
|
83
|
+
@.MWT.CT_CI_T5_1.AX19_In2_X_AcarTmp,2e63f52W,A Car Temperature,"82,88",,"""2e63f52W,""",2E63F52W,Value,16 bit signed int,Used in AC not as reliable a reading as PV
|
84
|
+
@.MWT.CT_CI_T5_1.AX19_In4_X_BcarTmp,2e63f54W,B Car Temperature,"82,88",,"""2e63f54W,""",2E63F54W,Value,16 bit signed int,
|
85
|
+
@.MWT.CT_CI_T4_1.AX47_In4_X_CcarTmp,2e4cd5cW,C Car Temperature,"82,88",,"""2e4cd5cW,""",2E4CD5CW,Value,16 bit signed int,
|
86
|
+
@.MWT.CT_CI_T4_1.AX47_In2_X_DcarTmp,2e4cd5aW,D Car Temperature,"82,88",,"""2e4cd5aW,""",2E4CD5AW,Value,16 bit signed int,
|
87
|
+
@.MWT.K_T5_1.KCV_X_PrsVnt1TmpIn,2e66ca6W,PV1 Temperature,"82,88",,"""2e66ca6W,""",2E66CA6W,Value,16 bit signed int,More reasonable values for temperature
|
88
|
+
@.MWT.K_T5_1.KEV_X_PrsVnt1Tmp,2e66c1cW,PV1 Temperature,"82,88",,"""2e66c1cW,""",2E66C1CW,Value,16 bit signed int,
|
89
|
+
@.MWT.K_T5_1.KEV_X_PrsVnt2Tmp,2e66c1eW,PV2 Temperature,"82,88",,"""2e66c1eW,""",2E66C1EW,Value,16 bit signed int,
|
90
|
+
Depot Fault Finding Signals (WR),,,,,,,,,
|
91
|
+
@.MWT.P_T3_1.PII_DCUM1_VU_DcLk,2e49ea9,,"82,84,86,88",,"""2e49ea9,""",,,,
|
92
|
+
@.MWT.P_T3_1.PII_DCUM2_VU_DcLk,2e49ec2,,"82,84,86,88",,"""2e49ec2,""",,,,
|
93
|
+
@.MWT.P_T2_1.PII_DCUM1_S_SsInd,2e4540a,,"82,84,86,88",,"""2e4540a,""",,,,
|
94
|
+
@.MWT.P_T2_1.PII_DCUM2_S_SsInd,2e4541a,,"82,84,86,88",,"""2e4541a,""",,,,
|
95
|
+
@.MWT.P_T3_1.PII_DCUM1_Xv_AxSpd1,2e49e1eW,,"82,84,86,88",,"""2e49e1eW,""",,,,
|
96
|
+
@.MWT.P_T3_1.PII_DCUM1_Xv_AxSpd2,2e49e20W,,"82,84,86,88",,"""2e49e20W,""",,,,
|
97
|
+
@.MWT.P_T3_1.PII_DCUM1_Xv_AxSpd3,2e49e22W,,"82,84,86,88",,"""2e49e22W,""",,,,
|
98
|
+
@.MWT.P_T3_1.PII_DCUM1_Xv_AxSpd4,2e49e24W,,"82,84,86,88",,"""2e49e24W,""",,,,
|
99
|
+
@.MWT.P_T3_1.PII_DCUM2_Xv_AxSpd1,2e49e38W,,"82,84,86,88",,"""2e49e38W,""",,,,
|
100
|
+
@.MWT.P_T3_1.PII_DCUM2_Xv_AxSpd2,2e49e3aW,,"82,84,86,88",,"""2e49e3aW,""",,,,
|
101
|
+
@.MWT.P_T3_1.PII_DCUM2_Xv_AxSpd3,2e49e3cW,,"82,84,86,88",,"""2e49e3cW,""",,,,
|
102
|
+
@.MWT.P_T3_1.PII_DCUM2_Xv_AxSpd4,2e49e3eW,,"82,84,86,88",,"""2e49e3eW,""",,,,
|
103
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarAAxA,2e647f6W,,"82,84,86,88",,"""2e647f6W,""",,,,
|
104
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarAAxB,2e647f8W,,"82,84,86,88",,"""2e647f8W,""",,,,
|
105
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarAAxC,2e647faW,,"82,84,86,88",,"""2e647faW,""",,,,
|
106
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarAAxD,2e647fcW,,"82,84,86,88",,"""2e647fcW,""",,,,
|
107
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarBAxA,2e647feW,,"82,84,86,88",,"""2e647feW,""",,,,
|
108
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarBAxB,2e64800W,,"82,84,86,88",,"""2e64800W,""",,,,
|
109
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarBAxC,2e64802W,,"82,84,86,88",,"""2e64802W,""",,,,
|
110
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarBAxD,2e64804W,,"82,84,86,88",,"""2e64804W,""",,,,
|
111
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarCAxA,2e64806W,,"82,84,86,88",,"""2e64806W,""",,,,
|
112
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarCAxB,2e64808W,,"82,84,86,88",,"""2e64808W,""",,,,
|
113
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarCAxC,2e6480aW,,"82,84,86,88",,"""2e6480aW,""",,,,
|
114
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarCAxD,2e6480cW,,"82,84,86,88",,"""2e6480cW,""",,,,
|
115
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarDAxA,2e6480eW,,"82,84,86,88",,"""2e6480eW,""",,,,
|
116
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarDAxB,2e64810W,,"82,84,86,88",,"""2e64810W,""",,,,
|
117
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarDAxC,2e64812W,,"82,84,86,88",,"""2e64812W,""",,,,
|
118
|
+
@.MWT.B_T5_1.CI_BGW_Xv_CarDAxD,2e64814W,,"82,84,86,88",,"""2e64814W,""",,,,
|
119
|
+
@.MWT.CT_CI_T4_1.GCV_XU_Bat,2e4cd14W,,"82,88",,"""2e4cd14W,""",,,,
|
120
|
+
@.MWT.CT_CI_T4_1.AX57_In2_X_Bat_1,2e582f8W,,"82,88",,"""2e582f8W,""",,,,
|
121
|
+
@.MWT.CT_CI_T4_1.AX57_In4_X_Bat_2,2e582faW,,"82,88",,"""2e582faW,""",,,,
|
122
|
+
@.MWT.CT_CI_T4_1.AX57_In1_X_BatCurSnsr,2e582f6W,,"82,88",,"""2e582f6W,""",,,,
|
@@ -15,19 +15,22 @@ module Blocktrain
|
|
15
15
|
}
|
16
16
|
}
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def aggs
|
20
20
|
{
|
21
21
|
langs: {
|
22
|
-
terms: {
|
22
|
+
terms: {
|
23
|
+
field: @term,
|
24
|
+
size: 0
|
25
|
+
}
|
23
26
|
}
|
24
27
|
}
|
25
28
|
end
|
26
|
-
|
29
|
+
|
27
30
|
def results
|
28
31
|
result['aggregations']['langs']['buckets']
|
29
32
|
end
|
30
|
-
|
33
|
+
|
31
34
|
end
|
32
35
|
end
|
33
36
|
end
|
data/lib/blocktrain/lookups.rb
CHANGED
@@ -15,12 +15,13 @@ module Blocktrain
|
|
15
15
|
def init!
|
16
16
|
@lookups ||= {}
|
17
17
|
# Get unique list of keys from ES
|
18
|
-
r = Aggregations::TermsAggregation.new(from: '2015-09-01 10:00:00Z', to: '2015-09-
|
18
|
+
r = Aggregations::TermsAggregation.new(from: '2015-09-01 10:00:00Z', to: '2015-09-30 11:00:00Z', term: "memoryAddress").results
|
19
19
|
addresses = r.map {|x| x["key"]}
|
20
20
|
# Get a memory location for each key
|
21
21
|
addresses.each do |address|
|
22
|
-
r = Query.new(from: '2015-09-01 10:00:00Z', to: '2015-09-
|
23
|
-
|
22
|
+
r = Query.new(from: '2015-09-01 10:00:00Z', to: '2015-09-30 11:00:00Z', memory_addresses: address, limit: 1).results
|
23
|
+
signal_name = remove_cruft(r.first["_source"]["signalName"].to_s)
|
24
|
+
@lookups[signal_name] = address
|
24
25
|
end
|
25
26
|
# Read aliases from file
|
26
27
|
aliases = OpenStruct.new fetch_yaml 'signal_aliases'
|
@@ -34,5 +35,15 @@ module Blocktrain
|
|
34
35
|
def fetch_yaml file
|
35
36
|
YAML.load(File.open(File.join(File.dirname(__FILE__), '..', '..', 'config/%s.yml' % file)))
|
36
37
|
end
|
38
|
+
|
39
|
+
# This will go away once we get the correct signals in the DB
|
40
|
+
def remove_cruft(signal)
|
41
|
+
parts = signal.split(".")
|
42
|
+
[
|
43
|
+
parts[0..-3].join('.'),
|
44
|
+
parts.pop
|
45
|
+
].join('.')
|
46
|
+
end
|
47
|
+
|
37
48
|
end
|
38
49
|
end
|
data/lib/blocktrain/query.rb
CHANGED
@@ -2,20 +2,20 @@ module Blocktrain
|
|
2
2
|
class Query
|
3
3
|
|
4
4
|
def initialize(options = {})
|
5
|
-
@
|
6
|
-
@
|
5
|
+
@memory_addresses = [options.fetch(:memory_addresses, nil)].flatten.compact
|
6
|
+
@signals = [options[:signals]].flatten.compact
|
7
7
|
|
8
8
|
@from = parse_datetime(options.fetch(:from, '2015-09-01T00:00:00'))
|
9
9
|
@to = parse_datetime(options.fetch(:to, '2015-09-02T00:00:00'))
|
10
|
-
|
10
|
+
|
11
11
|
@limit = options.fetch(:limit, 100)
|
12
12
|
end
|
13
13
|
|
14
14
|
def results
|
15
15
|
result['hits']['hits']
|
16
16
|
end
|
17
|
-
|
18
|
-
def hits
|
17
|
+
|
18
|
+
def hits
|
19
19
|
result['hits']['total']
|
20
20
|
end
|
21
21
|
|
@@ -26,12 +26,20 @@ module Blocktrain
|
|
26
26
|
|
27
27
|
def address_query
|
28
28
|
# Look up memory addresses directly if specified
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
unless @memory_addresses == []
|
30
|
+
build_query(@memory_addresses)
|
31
|
+
else
|
32
|
+
# No query if there isn't a signal specified
|
33
|
+
return nil if @signals == []
|
34
|
+
lookups = Lookups.instance.lookups
|
35
|
+
@signals = @signals.map { |s| lookups[s] }
|
36
|
+
build_query(@signals)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def build_query(addresses)
|
41
|
+
addresses.map! { |a| "memoryAddress:#{a}" }
|
42
|
+
addresses.join(" OR ")
|
35
43
|
end
|
36
44
|
|
37
45
|
def query
|
@@ -42,7 +50,7 @@ module Blocktrain
|
|
42
50
|
}
|
43
51
|
}
|
44
52
|
end
|
45
|
-
|
53
|
+
|
46
54
|
def filtered_query
|
47
55
|
q = address_query
|
48
56
|
return {} if q.nil?
|
@@ -52,7 +60,7 @@ module Blocktrain
|
|
52
60
|
}
|
53
61
|
}
|
54
62
|
end
|
55
|
-
|
63
|
+
|
56
64
|
def filtered_filter
|
57
65
|
{
|
58
66
|
bool: {
|
data/lib/blocktrain/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blocktrain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-11-
|
12
|
+
date: 2015-11-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dotenv
|
@@ -219,6 +219,7 @@ files:
|
|
219
219
|
- .ruby-version
|
220
220
|
- .travis.yml
|
221
221
|
- CHANGELOG.md
|
222
|
+
- CODE_OF_CONDUCT.md
|
222
223
|
- Gemfile
|
223
224
|
- Guardfile
|
224
225
|
- LICENSE.md
|
@@ -229,6 +230,7 @@ files:
|
|
229
230
|
- bin/setup
|
230
231
|
- blocktrain.gemspec
|
231
232
|
- config/signal_aliases.yml
|
233
|
+
- config/sources/signals.csv
|
232
234
|
- lib/blocktrain.rb
|
233
235
|
- lib/blocktrain/aggregation.rb
|
234
236
|
- lib/blocktrain/aggregations/average_aggregation.rb
|