Fix a bunch of documentation strings.

This commit is contained in:
David Given
2021-05-18 21:10:59 +02:00
parent 9d2a5fee86
commit 9df35c1814
7 changed files with 53 additions and 64 deletions

View File

@@ -3,28 +3,25 @@ syntax = "proto2";
import "lib/common.proto";
message IbmDecoderProto {
optional int32 sector_id_base = 1 [default = 1,
(help) = "ID of first sector"];
optional bool ignore_side_byte = 2 [default = false,
(help) = "ignore side byte in sector header"];
optional RangeProto required_sectors = 3 [
(help) = "require these sectors to exist for a good read"];
optional int32 sector_id_base = 1 [default = 1, (help) = "ID of first sector"];
optional bool ignore_side_byte = 2 [default = false, (help) = "ignore side byte in sector header"];
optional RangeProto required_sectors = 3 [(help) = "require these sectors to exist for a good read"];
}
message IbmEncoderProto {
optional double track_length_ms = 1;
optional int32 sector_size = 2 [default=512];
optional bool emit_iam = 3 [default=true];
optional int32 start_sector_id = 4 [default=1];
optional double clock_rate_khz = 5;
optional bool use_fm = 6 [default=false];
optional int32 idam_byte = 7 [default=0x5554];
optional int32 dam_byte = 8 [default=0x5545];
optional int32 gap0 = 9 [default=80];
optional int32 gap1 = 10 [default=50];
optional int32 gap2 = 11 [default=22];
optional int32 gap3 = 12 [default=80];
optional string sector_skew = 13;
optional bool swap_sides = 14 [default=false];
optional double track_length_ms = 1 [(help) = "length of track"];
optional int32 sector_size = 2 [default=512, (help) = "number of bytes per sector"];
optional bool emit_iam = 3 [default=true, (help) = "whether to emit an IAM record"];
optional int32 start_sector_id = 4 [default=1, (help) = "ID of first sector"];
optional double clock_rate_khz = 5 [(help) = "data clock rate"];
optional bool use_fm = 6 [default=false, (help) = "whether to use FM encoding rather than MFM"];
optional int32 idam_byte = 7 [default=0x5554, (help) = "16-bit raw bit pattern of IDAM byte"];
optional int32 dam_byte = 8 [default=0x5545, (help) = "16-bit raw bit pattern of DAM byte"];
optional int32 gap0 = 9 [default=80, (help) = "size of gap 1 (the post-index gap)"];
optional int32 gap1 = 10 [default=50, (help) = "size of gap 2 (the post-ID gap)"];
optional int32 gap2 = 11 [default=22, (help) = "size of gap 3 (the pre-data gap)"];
optional int32 gap3 = 12 [default=80, (help) = "size of gap 4 (the post-data or format gap)"];
optional string sector_skew = 13 [(help) = "order to emit sectors"];
optional bool swap_sides = 14 [default=false, (help) = "swap side bytes when writing"];
}

View File

@@ -13,7 +13,7 @@ message Tids990EncoderProto {
optional int32 am1_byte = 4 [ default = 0x2244,
(help) = "16-bit RAW bit pattern to use for the AM1 ID byte" ];
optional int32 am2_byte = 5 [ default = 0x2245,
(help) = "16-bit RAW bit pattern to use for the AM1 ID byte" ];
(help) = "16-bit RAW bit pattern to use for the AM2 ID byte" ];
optional int32 gap1_bytes = 6 [ default = 80,
(help) = "size of gap 1 (the post-index gap)" ];
optional int32 gap2_bytes = 7 [ default = 21,

View File

@@ -3,9 +3,9 @@ syntax = "proto2";
import "google/protobuf/descriptor.proto";
message RangeProto {
optional int32 start = 1 [default = 0];
optional int32 step = 2 [default = 1];
optional int32 end = 3;
optional int32 start = 1 [default = 0, (help) = "start value"];
optional int32 step = 2 [default = 1, (help) = "amount to step by (positive)"];
optional int32 end = 3 [(help) = "inclusive end value, defaulting to the start value"];
}
extend google.protobuf.FieldOptions {

View File

@@ -3,40 +3,30 @@ syntax = "proto2";
import "lib/common.proto";
message HardwareFluxSinkProto {
optional IndexMode index_mode = 1
[default = INDEXMODE_DRIVE, (help) = "index pulse source"];
optional int32 hard_sector_count = 2
[(help) = "number of hard sectors on the disk"];
optional bool high_density = 3
[default = true, (help) = "set if this is a high density disk"];
optional int32 drive = 4
[default = 0, (help) = "which drive to write to (0 or 1)"];
optional IndexMode index_mode = 1 [default = INDEXMODE_DRIVE, (help) = "index pulse source"];
optional int32 hard_sector_count = 2 [(help) = "number of hard sectors on the disk"];
optional bool high_density = 3 [default = true, (help) = "set if this is a high density disk"];
optional int32 drive = 4 [default = 0, (help) = "which drive to write to (0 or 1)"];
}
message AuFluxSinkProto {
optional string directory = 1 [default = "aufiles",
(help) = "directory to write .au files to"];
optional bool index_markers = 2 [default = true,
(help) = "show index markers in the right-hand channel"];
optional string directory = 1 [default = "aufiles", (help) = "directory to write .au files to"];
optional bool index_markers = 2 [default = true, (help) = "show index markers in the right-hand channel"];
}
message VcdFluxSinkProto {
optional string directory = 1 [default = "vcdfiles",
(help) = "directory to write .vcd files to"];
optional string directory = 1 [default = "vcdfiles", (help) = "directory to write .vcd files to"];
}
message ScpFluxSinkProto {
optional string filename = 2 [default = "flux.scp",
(help) = ".scp file to write to"];
optional bool align_with_index = 3 [default = false,
(help) = "align data to track boundaries"];
optional int32 type_byte = 4 [default = 0xff,
(help) = "set the SCP disk type byte"];
optional string filename = 2 [default = "flux.scp", (help) = ".scp file to write to"];
optional bool align_with_index = 3 [default = false, (help) = "align data to track boundaries"];
optional int32 type_byte = 4 [default = 0xff, (help) = "set the SCP disk type byte"];
}
message FluxSinkProto {
oneof dest {
string fluxfile = 1;
string fluxfile = 1 [(help) = "name of destination flux file"];
HardwareFluxSinkProto drive = 2;
AuFluxSinkProto au = 3;
VcdFluxSinkProto vcd = 4;

View File

@@ -3,19 +3,18 @@ syntax = "proto2";
import "lib/common.proto";
message HardwareFluxSourceProto {
optional int32 drive = 1 [default = 0];
optional double revolutions = 2 [default = 1.2];
optional int32 drive = 1 [default = 0, (help) = "which drive to read from"];
optional double revolutions = 2 [default = 1.2, (help) = "number of revolutions to read"];
optional bool sync_with_index = 3 [default = false];
optional IndexMode index_mode = 4 [default = INDEXMODE_DRIVE];
optional int32 hard_sector_count = 5 [default = 0];
optional bool high_density = 6
[default = true, (help) = "set if this is a high density disk"];
optional bool sync_with_index = 3 [default = false, (help) = "start reading at index mark"];
optional IndexMode index_mode = 4 [default = INDEXMODE_DRIVE, (help) = "index pulse source"];
optional int32 hard_sector_count = 5 [default = 0, (help) = "number of hard sectors on disk"];
optional bool high_density = 6 [default = true, (help) = "set if this is a high density disk"];
}
message TestPatternFluxSourceProto {
optional double interval_us = 1 [default = 4.0];
optional double sequence_length_us = 2 [default = 200.0];
optional double interval_us = 1 [default = 4.0, (help) = "interval between pulses"];
optional double sequence_length_us = 2 [default = 200.0, (help) = "length of test sequence"];
}
message EraseFluxSourceProto {}
@@ -36,7 +35,7 @@ message CwfFluxSourceProto {
message FluxSourceProto {
oneof source {
string fluxfile = 1;
string fluxfile = 1 [default = "name of source flux file"];
HardwareFluxSourceProto drive = 2;
TestPatternFluxSourceProto test_pattern = 3;
EraseFluxSourceProto erase = 4;

View File

@@ -1,17 +1,19 @@
syntax = "proto2";
import "lib/common.proto";
message ImgInputOutputProto {
message FormatProto {
optional int32 track = 1;
optional int32 side = 2;
optional int32 track = 1 [(help) = "if present, this format only applies to this track"];
optional int32 side = 2 [(help) = "if present, this format only applies to this side"];
optional int32 sector_size = 3 [default=512];
optional int32 sectors = 4;
optional int32 sector_size = 3 [default=512, (help) = "number of bytes per sector"];
optional int32 sectors = 4 [(help) = "number of sectors in this track"];
}
repeated FormatProto format = 4;
optional int32 tracks = 5 [default=80];
optional int32 sides = 6 [default=2];
repeated FormatProto format = 4 [(help) = "per-track format information (repeatable)"];
optional int32 tracks = 5 [default=80, (help) = "number of tracks in image"];
optional int32 sides = 6 [default=2, (help) = "number of sides in image"];
}
message DiskCopyInputProto {}
@@ -19,7 +21,7 @@ message ImdInputProto {}
message Jv3InputProto {}
message ImageReaderProto {
optional string filename = 1;
optional string filename = 1 [(help) = "filename of input sector image"];
oneof format {
ImgInputOutputProto img = 2;
DiskCopyInputProto diskcopy = 3;

View File

@@ -1,13 +1,14 @@
syntax = "proto2";
import "lib/imagereader/imagereader.proto";
import "lib/common.proto";
message D64OutputProto {}
message LDBSOutputProto {}
message DiskCopyOutputProto {}
message ImageWriterProto {
optional string filename = 1;
optional string filename = 1 [(help) = "filename of output sector image"];
oneof format {
ImgInputOutputProto img = 2;
D64OutputProto d64 = 3;