261
262
263
264
265
266
267
268
269
270
271
272
273
274
|
# File 'lib/openc3/models/target_model.rb', line 261
def self.packet_items(target_name, packet_name, items, type: :TLM, scope:)
packet = packet(target_name, packet_name, type: type, scope: scope)
found = packet['items'].find_all { |item| items.map(&:to_s).include?(item['name']) }
if found.length != items.length found_items = found.collect { |item| item['name'] }
not_found = []
(items - found_items).each do |item|
not_found << "'#{target_name} #{packet_name} #{item}'"
end
raise "Item(s) #{not_found.join(', ')} does not exist"
end
found
end
|