mirror of
https://github.com/S4mpsa/InfOS.git
synced 2025-08-03 09:56:01 -04:00
28 lines
653 B
Lua
Executable File
28 lines
653 B
Lua
Executable File
-- Import section
|
|
Parser = require("utils.parser")
|
|
Inherits = require("utils.inherits")
|
|
SingleBlock = require("data.datasource.single-block")
|
|
local mock = require("data.mock.mock-multi-block")
|
|
--
|
|
|
|
local MultiBlock =
|
|
Inherits(
|
|
SingleBlock,
|
|
{
|
|
mock = mock,
|
|
name = "MultiBlock"
|
|
}
|
|
)
|
|
|
|
function MultiBlock:getNumberOfProblems()
|
|
local sensorInformation = self:getSensorInformation()
|
|
return Parser.parseProblems(sensorInformation[5])
|
|
end
|
|
|
|
function MultiBlock:getEfficiencyPercentage()
|
|
local sensorInformation = self:getSensorInformation()
|
|
return Parser.parseEfficiency(sensorInformation[5])
|
|
end
|
|
|
|
return MultiBlock
|