Skip to content

Commit

Permalink
cmd schemaがほぼtlmcmddbと同じになっちゃた
Browse files Browse the repository at this point in the history
  • Loading branch information
shunsuke-shimomura committed Jul 16, 2024
1 parent c8b76cf commit 9fa2f04
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions gaia-ccsds-c2a/src/access/cmd/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ pub struct Metadata {
pub component_name: String,
pub command_name: String,
pub cmd_id: u16,
pub is_danger: bool,
pub is_restricted: bool,
pub target: String,
pub description: String,
}

Expand Down Expand Up @@ -103,6 +106,9 @@ impl<'a> Iterator for Iter<'a> {
component_name: self.name.to_string(),
command_name: command.name.to_string(),
cmd_id: command.code,
is_danger: command.is_danger,
is_restricted: command.is_restricted,
target: command.target.to_string(),
description: command.description.to_string(),
};
return build_schema(command)
Expand Down
5 changes: 4 additions & 1 deletion tmtc-c2a/proto/tmtc_generic_c2a.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ message CommandSchema {

message CommandSchemaMetadata {
uint32 id = 1;
string description = 2;
bool is_danger = 2;
bool is_restricted = 3;
string target = 4;
string description = 5;
}

message CommandParameterSchema {
Expand Down
3 changes: 3 additions & 0 deletions tmtc-c2a/src/registry/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ impl Registry {
let command_schema = proto::CommandSchema {
metadata: Some(proto::CommandSchemaMetadata {
id: schema_with_id.command_id as u32,
is_danger: metadata.is_danger,
is_restricted: metadata.is_restricted,
target: metadata.target.clone(),
description: metadata.description.clone(),
}),
parameters,
Expand Down

0 comments on commit 9fa2f04

Please sign in to comment.