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

Method writeSector

arch/tartu/encoder.cc:79–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77 };
78
79 void writeSector(const std::shared_ptr<const Sector>& sectorData)
80 {
81 writeRawBits(_config.header_marker(), 64);
82 {
83 Bytes bytes;
84 ByteWriter bw(bytes);
85 bw.write_8(
86 (sectorData->logicalCylinder << 1) | sectorData->logicalHead);
87 bw.write_8(1);
88 bw.write_8(sectorData->logicalSector);
89 bw.write_8(~sumBytes(bytes.slice(0, 3)));
90 writeBytes(bytes);
91 }
92
93 writeFillerRawBitsUs(_config.gap3_us());
94 writeRawBits(_config.data_marker(), 64);
95 {
96 Bytes bytes;
97 ByteWriter bw(bytes);
98 bw.append(sectorData->data);
99 bw.write_8(~sumBytes(bytes.slice(0, sectorData->data.size())));
100 writeBytes(bytes);
101 }
102 }
103
104private:
105 const TartuEncoderProto& _config;

Callers

nothing calls this directly

Calls 3

sumBytesFunction · 0.85
sliceMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected