Sha256: e8488a2a38eec0f641e5f37e0cc15042061e0260a6ae40c7fc219887032451d1

Contents?: true

Size: 760 Bytes

Versions: 9

Compression:

Stored size: 760 Bytes

Contents

import os
from openc3.utilities.string import formatted

# TBL_FILENAME is set to the name of the table file
print(f"file:{os.getenv('TBL_FILENAME')}")
# Open the file
file = get_target_file(os.getenv("TBL_FILENAME"))
buffer = file.read()
# Implement custom commanding logic to upload the table
# Note that buffer is a Ruby string of bytes
# You probably want to do something like:
# buf_size = 512 # Size of a buffer in the upload command
# i = 0
# while i < buffer.length
#   # Send a part of the buffer
#   # NOTE: triple dots means start index, up to but not including, end index
#   #   while double dots means start index, up to AND including, end index
#   cmd("TGT", "UPLOAD", "DATA" => buffer[i...(i + buf_size)])
#   i += buf_size
# end
file.close()

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
openc3-cosmos-demo-5.20.0 targets/INST2/tables/procedures/upload.py
openc3-cosmos-demo-5.19.0 targets/INST2/tables/procedures/upload.py
openc3-cosmos-demo-5.18.0 targets/INST2/tables/procedures/upload.py
openc3-cosmos-demo-5.17.1 targets/INST2/tables/procedures/upload.py
openc3-cosmos-demo-5.17.0 targets/INST2/tables/procedures/upload.py
openc3-cosmos-demo-5.16.0 targets/INST2/tables/procedures/upload.py
openc3-cosmos-demo-5.15.2 targets/INST2/tables/procedures/upload.py
openc3-cosmos-demo-5.15.1 targets/INST2/tables/procedures/upload.py
openc3-cosmos-demo-5.15.0 targets/INST2/tables/procedures/upload.py