MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / Fl2FluxSource

Method Fl2FluxSource

lib/fluxsource/fl2fluxsource.cc:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36{
37public:
38 Fl2FluxSource(const Fl2FluxSourceProto& config): _config(config)
39 {
40 log("FL2: reading {}", _config.filename());
41 _proto = loadFl2File(_config.filename());
42
43 _extraConfig.mutable_drive()->set_rotational_period_ms(
44 _proto.rotational_period_ms());
45 if (_proto.has_drive_type())
46 _extraConfig.mutable_drive()->set_drive_type(_proto.drive_type());
47
48 std::vector<CylinderHead> chs;
49 for (const auto& trackFlux : _proto.track())
50 chs.push_back(CylinderHead{
51 (unsigned)trackFlux.track(), (unsigned)trackFlux.head()});
52 _extraConfig.mutable_drive()->set_tracks(
53 convertCylinderHeadsToString(chs));
54 }
55
56public:
57 std::unique_ptr<FluxSourceIterator> readFlux(int track, int head) override

Callers

nothing calls this directly

Calls 5

loadFl2FileFunction · 0.85
headMethod · 0.80
logFunction · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected