Skip to content

How can I gain Redis permission to create a dynamic packet? #2681

@GTI-Dakota

Description

@GTI-Dakota

Hello,

I hope you are all doing well! I am unable to generate a dynamic packet in the script runner. I have read the documentation on dynamic packets here. My plan is to generate a packet at the beginning of a suite/script so it can be offloaded later. However, my target_model = OpenC3::TargetModel.get_model(name: 'COSMOS_UTIL', scope: 'DEFAULT') line is erroring with PermissionError : NOPERM No permissions to access a key (redis://openc3-redis:6379). Is there anything I am missing?

My code is as follows:

require 'openc3'
require 'openc3/api/api'

include OpenC3::Api
$openc3_scope = "DEFAULT"

# Create a new packet
packet = OpenC3::Packet.new('COSMOS_UTIL', 'TEST_PACKET')
# Modify the packet by appending new items to it
packet.append_item('TEST_UINT', 32, :UINT)
packet.append_item('TEST_FLOAT', 32, :FLOAT)
packet.append_item('TEST_INT', 32, :INT)

# Grab the TargetModel associated with the packet's target
target_model = OpenC3::TargetModel.get_model(name: 'COSMOS_UTIL', scope: 'DEFAULT')
# Update the target model with the new packet
target_model.dynamic_update([packet])

Best,

Dakota

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestions about OpenC3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions