mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-07-02 01:29:25 +09:00
new(SlaveLogParser): power section parser
This commit is contained in:
parent
ccbcac3c16
commit
f325051a08
2 changed files with 87 additions and 29 deletions
|
@ -47,34 +47,46 @@ true || include("../src/PSBoardDataBase.jl")
|
|||
end
|
||||
|
||||
@testset "Slave Log parser" begin
|
||||
lines = Iterators.Stateful(
|
||||
Iterators.drop(eachline("./input/slavelogs/main/430_100.txt"), 2280),
|
||||
)
|
||||
result_asdtp = PSBoardDataBase.SlaveLogParser.parse_asdtp_section!(lines)
|
||||
@testset "AsdtpResult" begin
|
||||
lines = Iterators.Stateful(
|
||||
Iterators.drop(eachline("./input/slavelogs/main/430_100.txt"), 2280),
|
||||
)
|
||||
result_asdtp = PSBoardDataBase.SlaveLogParser.parse_asdtp_section!(lines)
|
||||
|
||||
@test result_asdtp == PSBoardDataBase.SlaveLogParser.AsdtpResult(
|
||||
1,
|
||||
0,
|
||||
true,
|
||||
fill(PSBoardDataBase.SlaveLogParser.AsdtpMeasurement.(fill((0, 1, 0), 32)), 8),
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0x1,
|
||||
0x1,
|
||||
0xff,
|
||||
0x0,
|
||||
0x0,
|
||||
0x0,
|
||||
MVector((0x1001, 0x2001, 0x3001, 0x4001, 0x5001, 0x6001, 0x7001, 0x8001)),
|
||||
)
|
||||
@info "pass"
|
||||
lines = Iterators.Stateful(
|
||||
Iterators.drop(eachline("./input/slavelogs/main/525_244.txt"), 2280),
|
||||
)
|
||||
result_asdtp = PSBoardDataBase.SlaveLogParser.parse_asdtp_section!(lines)
|
||||
@test result_asdtp.reconfig_done == 0
|
||||
@test result_asdtp == PSBoardDataBase.SlaveLogParser.AsdtpResult(
|
||||
1,
|
||||
0,
|
||||
true,
|
||||
fill(
|
||||
PSBoardDataBase.SlaveLogParser.AsdtpMeasurement.(fill((0, 1, 0), 32)),
|
||||
8,
|
||||
),
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0x1,
|
||||
0x1,
|
||||
0xff,
|
||||
0x0,
|
||||
0x0,
|
||||
0x0,
|
||||
MVector((0x1001, 0x2001, 0x3001, 0x4001, 0x5001, 0x6001, 0x7001, 0x8001)),
|
||||
)
|
||||
|
||||
lines = Iterators.Stateful(
|
||||
Iterators.drop(eachline("./input/slavelogs/main/525_244.txt"), 2280),
|
||||
)
|
||||
result_asdtp = PSBoardDataBase.SlaveLogParser.parse_asdtp_section!(lines)
|
||||
@test result_asdtp.reconfig_done == 0
|
||||
end
|
||||
|
||||
@testset "Power" begin
|
||||
lines = Iterators.Stateful(
|
||||
Iterators.drop(eachline("./input/slavelogs/main/430_100.txt"), 1915),
|
||||
)
|
||||
PSBoardDataBase.SlaveLogParser.parse_power_section!(lines)
|
||||
end
|
||||
end
|
||||
|
||||
@testset "Download data csv" begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue