Method: Cosmos::Api#get_cmd_cnt

Defined in:
lib/cosmos/api/cmd_api.rb

#get_cmd_cnt(target_name, command_name, scope: $cosmos_scope, token: $cosmos_token) ⇒ Numeric

Get the transmit count for a command packet

Parameters:

  • target_name (String)

    Target name of the command

  • command_name (String)

    Packet name of the command

Returns:

  • (Numeric)

    Transmit count for the command



349
350
351
352
353
# File 'lib/cosmos/api/cmd_api.rb', line 349

def get_cmd_cnt(target_name, command_name, scope: $cosmos_scope, token: $cosmos_token)
  authorize(permission: 'system', target_name: target_name, packet_name: command_name, scope: scope, token: token)
  TargetModel.packet(target_name, command_name, type: :CMD, scope: scope)
  Topic.get_cnt("#{scope}__COMMAND__{#{target_name}}__#{command_name}")
end