Skip to content

Commit

Permalink
tlmcmdb: add display info
Browse files Browse the repository at this point in the history
  • Loading branch information
kobkaz committed Jan 12, 2024
1 parent 25edae5 commit 4b08ac6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions tlmcmddb-csv/src/tlm/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ impl TryFrom<Line> for model::Field {
extraction_info,
conversion_info: conversion_info.try_into()?,
description: unescape(&line.description),
display_info: Default::default(),
note: unescape(&line.note),
})
}
Expand Down
10 changes: 10 additions & 0 deletions tlmcmddb/src/tlm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ pub struct Field {
/// テレメトリのオクテット列からこのフィールドの値を抜き出す際に必要な情報
pub extraction_info: FieldExtractionInfo,
pub conversion_info: ConversionInfo,
/// GS SW などでテレメトリを表示するときの情報
#[serde(default)]
pub display_info: DisplayInfo,
/// このフィールドの説明(衛星運用者向け)
pub description: String,
/// このフィールドの説明(衛星開発者向け)
Expand Down Expand Up @@ -199,6 +202,13 @@ impl VariableType {
}
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
pub struct DisplayInfo {
pub label: String,
pub unit: String,
pub format: String,
}

/// コメント行
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Comment {
Expand Down

0 comments on commit 4b08ac6

Please sign in to comment.