def list_(self, args): opts = utils.CommandOptions(args) client = YamcsClient(**opts.client_kwargs) mdb = client.get_mdb(opts.instance) rows = [['NAME', 'DESCRIPTION']] for algorithm in mdb.list_algorithms(): rows.append([ algorithm.qualified_name, algorithm.description, ]) utils.print_table(rows)
def list_(self, args): opts = utils.CommandOptions(args) client = YamcsClient(**opts.client_kwargs) mdb = client.get_mdb(opts.instance) rows = [['NAME', 'DATA SOURCE']] for parameter in mdb.list_parameters(): rows.append([ parameter.qualified_name, parameter.data_source, ]) utils.print_table(rows)
def list_(self, args): opts = utils.CommandOptions(args) client = YamcsClient(**opts.client_kwargs) mdb = client.get_mdb(opts.instance) rows = [['NAME', 'DESCRIPTION', 'ABSTRACT']] for command in mdb.list_commands(): rows.append([ command.qualified_name, command.description, command.abstract, ]) utils.print_table(rows)
def describe(self, args): opts = utils.CommandOptions(args) client = YamcsClient(**opts.client_kwargs) mdb = client.get_mdb(opts.instance) algorithm = mdb.get_algorithm(args.algorithm) print(algorithm._proto) #pylint: disable=protected-access
def print_commands(): """Print all commands.""" for command in mdb.list_commands(): print(command) def find_parameter(): """Find one parameter.""" p1 = mdb.get_parameter("/YSS/SIMULATOR/BatteryVoltage2") print("Via qualified name:", p1) p2 = mdb.get_parameter("MDB:OPS Name/SIMULATOR_BatteryVoltage2") print("Via domain-specific alias:", p2) if __name__ == "__main__": client = YamcsClient("localhost:8090") mdb = client.get_mdb(instance="simulator") print("\nSpace systems:") print_space_systems() print("\nParameters:") print_parameters() print("\nCommands:") print_commands() print("\nFind a specific parameter using different names") find_parameter()
def describe(self, args): opts = utils.CommandOptions(args) client = YamcsClient(**opts.client_kwargs) mdb = client.get_mdb(opts.instance) parameter = mdb.get_parameter(args.parameter) print(parameter._proto) #pylint: disable=protected-access
def describe(self, args): opts = utils.CommandOptions(args) client = YamcsClient(**opts.client_kwargs) mdb = client.get_mdb(opts.instance) command = mdb.get_command(args.command) print(command._proto) #pylint: disable=protected-access
def print_commands(): """Print all commands.""" for command in mdb.list_commands(): print(command) def find_parameter(): """Find one parameter.""" p1 = mdb.get_parameter('/YSS/SIMULATOR/BatteryVoltage2') print('Via qualified name:', p1) p2 = mdb.get_parameter('MDB:OPS Name/SIMULATOR_BatteryVoltage2') print('Via domain-specific alias:', p2) if __name__ == '__main__': client = YamcsClient('localhost:8090') mdb = client.get_mdb(instance='simulator') print('\nSpace systems:') print_space_systems() print('\nParameters:') print_parameters() print('\nCommands:') print_commands() print('\nFind a specific parameter using different names') find_parameter()
def describe(self, args): opts = utils.CommandOptions(args) client = YamcsClient(**opts.client_kwargs) mdb = client.get_mdb(opts.instance) space_system = mdb.get_space_system(args.space_system) print(space_system._proto) #pylint: disable=protected-access