Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ COMMAND <%= target_name %> SETPARAMS BIG_ENDIAN "Sets numbered parameters"
<% (1..5).each do |i| %>
# The packet is BIG_ENDIAN (CCSDS) but these fields are LITTLE_ENDIAN
APPEND_PARAMETER VALUE<%= i %> 16 UINT 0 5 1 "Value <%= i %> setting" LITTLE_ENDIAN
RELATED_ITEM <%= target_name %> PARAMS VALUE<%= i %>
RELATED_ITEM <%= target_name %> PARAMS.PKT VALUE<%= i %>
<% end %>
APPEND_PARAMETER BIGINT 64 UINT MIN MAX 0 "UINT 64 parameter"
SCREEN <%= target_name %> PARAMS
SCREEN <%= target_name %> PARAMS.PKT

SELECT_PARAMETER VALUE5
POLY_WRITE_CONVERSION 0 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ TELEMETRY <%= target_name %> ADCS BIG_ENDIAN "Position and attitude data"
ITEM PACKET_TIME 0 0 DERIVED "Python time based on TIMESEC and TIMEUS"
READ_CONVERSION openc3/conversions/unix_time_conversion.py TIMESEC TIMEUS

TELEMETRY <%= target_name %> PARAMS BIG_ENDIAN "Params set by SETPARAMS command"
# NOTE: We don't really recommend using periods in packet names
# but we're doing it here to test the routing code
TELEMETRY <%= target_name %> PARAMS.PKT BIG_ENDIAN "Params set by SETPARAMS command"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could be talked out of this but it does give us a chance to test it

<%= render "_ccsds_tlm.txt", locals: {apid: 3} %>
# ERB syntax:
<% (1..5).each do |i| %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __init__(self, target_name):
packet.write("CcsdsSeqFlags", "NOGROUP")
packet.write("CcsdsLength", len(packet.buffer) - 7)

packet = self.tlm_packets["PARAMS"]
packet = self.tlm_packets["PARAMS.PKT"]
packet.write("CcsdsSeqFlags", "NOGROUP")
packet.write("CcsdsLength", len(packet.buffer) - 7)
packet.write("value1", 0)
Expand Down Expand Up @@ -154,7 +154,7 @@ def __init__(self, target_name):
def set_rates(self):
self.set_rate("ADCS", 10)
self.set_rate("HEALTH_STATUS", 100)
self.set_rate("PARAMS", 100)
self.set_rate("PARAMS.PKT", 100)
self.set_rate("IMAGE", 100)
self.set_rate("MECH", 10)

Expand All @@ -168,7 +168,7 @@ def write(self, packet):
name = packet.packet_name.upper()

hs_packet = self.tlm_packets["HEALTH_STATUS"]
params_packet = self.tlm_packets["PARAMS"]
params_packet = self.tlm_packets["PARAMS.PKT"]

match name:
case "COLLECT":
Expand Down Expand Up @@ -382,7 +382,7 @@ def read(self, count_100hz, time):
else:
packet.write("ground2status", "CONNECTED")

case "PARAMS":
case "PARAMS.PKT":
packet.write("timesec", int(time - self.time_offset))
packet.write("timeus", int((time % 1) * 1000000))
packet.write("ccsdsseqcnt", packet.read("ccsdsseqcnt") + 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ MATRIXBYCOLUMNS 2
# This is an example of using a variable named 'type'. You can operate on variables with Javascript code.
# All OpenC3 commands (api.cmd) must be separated by double semicolons ';;'. All code separated by semicolons is evaluated together.
# Note: you can also request and use telemetry in screens using Javascript Promises, e.g.
# api.tlm('INST2 PARAMS VALUE3', 'RAW').then(dur => api.cmd('INST2 COLLECT with TYPE '+type+', DURATION '+dur))"
# api.tlm('INST2 PARAMS.PKT VALUE3', 'RAW').then(dur => api.cmd('INST2 COLLECT with TYPE '+type+', DURATION '+dur))"
# The tlm() function returns a Promise which is resolved with then() at which point we send the command with the parameter
# The plus '+' symbol indicates string concatenation with newlines.
# NOTE: Both lines must use the same quote character: ' or "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,70 +7,70 @@ VERTICAL
MATRIXBYCOLUMNS 3
LABEL VALUE5
SETTING WIDTH 100 # Only need width on the first row
VALUE <%= target_name %> PARAMS VALUE5
LABELLED <%= target_name %> PARAMS VALUE5
VALUE <%= target_name %> PARAMS.PKT VALUE5
LABELLED <%= target_name %> PARAMS.PKT VALUE5
SETTING LED_COLOR GOOD GREEN
SETTING LED_COLOR BAD RED

LABEL VALUE4
SETTING TEXTALIGN CENTER
VALUE <%= target_name %> PARAMS VALUE4
VALUE <%= target_name %> PARAMS.PKT VALUE4
SETTING TEXTALIGN CENTER
LABELLED <%= target_name %> PARAMS VALUE4
LABELLED <%= target_name %> PARAMS.PKT VALUE4
SETTING LED_COLOR GOOD GREEN
SETTING LED_COLOR BAD RED

LABEL VALUE3
SETTING TEXTALIGN RIGHT
VALUE <%= target_name %> PARAMS VALUE3
VALUE <%= target_name %> PARAMS.PKT VALUE3
SETTING TEXTALIGN RIGHT
LABELLED <%= target_name %> PARAMS VALUE3
LABELLED <%= target_name %> PARAMS.PKT VALUE3
SETTING LED_COLOR GOOD GREEN
SETTING LED_COLOR BAD RED

LABEL VALUE2
SETTING TEXTALIGN CENTER
VALUE <%= target_name %> PARAMS VALUE2
VALUE <%= target_name %> PARAMS.PKT VALUE2
SETTING TEXTALIGN CENTER
LABELLED <%= target_name %> PARAMS VALUE2
LABELLED <%= target_name %> PARAMS.PKT VALUE2
SETTING LED_COLOR GOOD GREEN
SETTING LED_COLOR BAD RED

LABEL VALUE1
VALUE <%= target_name %> PARAMS VALUE1
LABELLED <%= target_name %> PARAMS VALUE1
VALUE <%= target_name %> PARAMS.PKT VALUE1
LABELLED <%= target_name %> PARAMS.PKT VALUE1
SETTING LED_COLOR GOOD GREEN
SETTING LED_COLOR BAD RED
END
VERTICAL
LED <%= target_name %> PARAMS VALUE5 RAW 25 20 # Ellipse
LED <%= target_name %> PARAMS.PKT VALUE5 RAW 25 20 # Ellipse
SETTING LED_COLOR 0 GREEN
SETTING LED_COLOR 1 RED
LED <%= target_name %> PARAMS VALUE4 RAW 20 25 # Ellipse
LED <%= target_name %> PARAMS.PKT VALUE4 RAW 20 25 # Ellipse
SETTING LED_COLOR 0 YELLOW
SETTING LED_COLOR 1 BLUE
LED <%= target_name %> PARAMS VALUE3 RAW 20 20
LED <%= target_name %> PARAMS.PKT VALUE3 RAW 20 20
SETTING LED_COLOR 0 GREEN
SETTING LED_COLOR 1 RED
SETTING LED_COLOR ANY ORANGE # All other values are ORANGE
LED <%= target_name %> PARAMS VALUE2 # Default is WITH_UNITS 15 15
LED <%= target_name %> PARAMS.PKT VALUE2 # Default is WITH_UNITS 15 15
SETTING LED_COLOR GOOD GREEN
SETTING LED_COLOR BAD RED
LED <%= target_name %> PARAMS VALUE1 CONVERTED 10 10
LED <%= target_name %> PARAMS.PKT VALUE1 CONVERTED 10 10
SETTING LED_COLOR GOOD GREEN
SETTING LED_COLOR BAD RED
END
VERTICAL
LABELVALUE <%= target_name %> PARAMS P_2.2,2
LABELVALUE <%= target_name %> PARAMS P-3+3=3
LABELVALUE <%= target_name %> PARAMS P4!@#$%^&*?
LABELVALUE <%= target_name %> PARAMS P</5|\>
LABELVALUE <%= target_name %> PARAMS P(:6;)
LABELVALUE <%= target_name %> PARAMS.PKT P_2.2,2
LABELVALUE <%= target_name %> PARAMS.PKT P-3+3=3
LABELVALUE <%= target_name %> PARAMS.PKT P4!@#$%^&*?
LABELVALUE <%= target_name %> PARAMS.PKT P</5|\>
LABELVALUE <%= target_name %> PARAMS.PKT P(:6;)
END
END

HORIZONTAL
LABEL "Packet Time"
VALUE <%= target_name %> PARAMS PACKET_TIMEFORMATTED WITH_UNITS 25
VALUE <%= target_name %> PARAMS.PKT PACKET_TIMEFORMATTED WITH_UNITS 25
END
END
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { NotFound } from '@openc3/vue-common/components'

const routes = [
{
path: '/:target?/:packet?',
path: '/:target?/:packet?/',
name: 'CommandSender',
component: () => import('./tools/CommandSender/CommandSender.vue'),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
key: 'packet_name',
},
]"
@update:current-items="currentItems"
data-test="cmd-packets-table"
@update:current-items="currentItems"
>
<template v-slot:item.view_raw="{ item }">
<template #item.view_raw="{ item }">
<v-btn
block
color="primary"
Expand All @@ -64,7 +64,7 @@
View Raw
</v-btn>
</template>
<template v-slot:item.view_in_cmd_sender="{ item }">
<template #item.view_in_cmd_sender="{ item }">
<span v-if="item.target_name === 'UNKNOWN'">N/A</span>
<v-btn
v-else
Expand Down Expand Up @@ -156,7 +156,7 @@ export default {
},
openCmdSender(target_name, packet_name) {
window.open(
`/tools/cmdsender/${encodeURIComponent(target_name)}/${encodeURIComponent(packet_name)}`,
`/tools/cmdsender/${encodeURIComponent(target_name)}/${encodeURIComponent(packet_name)}/`,
'_blank',
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
key: 'packet_name',
},
]"
@update:current-items="currentItems"
data-test="tlm-packets-table"
@update:current-items="currentItems"
>
<template v-slot:item.view_raw="{ item }">
<template #item.view_raw="{ item }">
<v-btn
block
color="primary"
Expand All @@ -64,7 +64,7 @@
View Raw
</v-btn>
</template>
<template v-slot:item.view_in_pkt_viewer="{ item }">
<template #item.view_in_pkt_viewer="{ item }">
<span v-if="item.target_name === 'UNKNOWN'">N/A</span>
<v-btn
v-if="item.target_name != 'UNKNOWN'"
Expand Down Expand Up @@ -156,7 +156,7 @@ export default {
},
openPktViewer(target_name, packet_name) {
window.open(
`/tools/packetviewer/${encodeURIComponent(target_name)}/${encodeURIComponent(packet_name)}`,
`/tools/packetviewer/${encodeURIComponent(target_name)}/${encodeURIComponent(packet_name)}/`,
'_blank',
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { NotFound } from '@openc3/vue-common/components'

const routes = [
{
path: '/:target?/:packet?',
path: '/',
name: 'Handbooks',
component: () => import('./tools/Handbooks/Handbooks.vue'),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
hover
data-test="limits-events"
>
<template v-slot:item.time_nsec="{ item }">
<template #item.time_nsec="{ item }">
<span>{{ formatNanoseconds(item.time_nsec, timeZone) }}</span>
</template>
<template v-slot:item.level="{ item }">
<template #item.level="{ item }">
<rux-status :status="getStatus(item.message)"></rux-status>
</template>
<template v-slot:item.message="{ item }">
<template #item.message="{ item }">
<span :class="getColorClass(item.message)">{{ item.message }}</span>
</template>
</v-data-table>
Expand All @@ -67,6 +67,7 @@ import { Cable } from '@openc3/js-common/services'
import { TimeFilters } from '@openc3/vue-common/util'

export default {
mixins: [TimeFilters],
props: {
historyCount: {
type: Number,
Expand All @@ -77,7 +78,6 @@ export default {
default: 'local',
},
},
mixins: [TimeFilters],
data() {
return {
data: [],
Expand Down Expand Up @@ -148,11 +148,7 @@ export default {
} else if (message.includes('BLUE')) {
return 'openc3-blue'
}
if (this.$vuetify.theme.dark) {
return 'openc3-white'
} else {
return 'openc3-black'
}
return 'openc3-white'
},
calcTableHeight() {
// TODO: 250 is a magic number but seems to work well
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { NotFound } from '@openc3/vue-common/components'

const routes = [
{
path: '/:target?/:packet?',
path: '/:target?/:packet?/',
name: 'PackerViewer',
component: () => import('./tools/PacketViewer/PacketViewer.vue'),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { NotFound } from '@openc3/vue-common/components'

const routes = [
{
path: '/:target?/:packet?/:item?',
path: '/:target?/:packet?/:item?/',
name: 'TlmGrapher',
component: () => import('./tools/TlmGrapher/TlmGrapher.vue'),
},
Expand Down
10 changes: 4 additions & 6 deletions openc3-traefik/traefik-allow-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ http:
service: service-script
priority: 7
# Route to other tool plugins hosted statically in Minio
# Matches any path with a file extension which is assumed to be
# a static file
# Matches any path with a file extension which is assumed to be a static file
tools-router:
rule: PathRegexp(`/tools/.*/.*[.](ttf|otf|woff|woff2|html|js|css|png|jpg|jpeg|gif|svg|ico|json|xml|txt|pdf|zip|tar|gz|tgz|csv|tsv|md|yaml|yml|bin|doc|docx|xls|xlsx|ppt|pptx|mp4|mp3|wav|avi|mov|flv|swf|apk|ipa|deb|rpm|exe|msi|dmg|pkg|sh|bat|cmd|ps1|py|pl|rb|php|java|class|jar|war|ear|so|dll|lib|a|o|obj|pdb|pdb|lib|dylib|framework)`)
rule: PathRegexp(`^/tools/.+/.+\.[a-zA-Z0-9]+$`)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key was anchoring the Regexp with ^ and then just checking for any extension with \.[a-zA-Z0-9]+$

service: service-minio
priority: 6
# Route to other tool plugins hosted statically in Minio
Expand Down Expand Up @@ -91,10 +90,9 @@ http:
service: service-minio
priority: 3
# Route to base files hosted statically in Minio
# Matches any path with a file extension which is assumed to be
# a static file
# Matches any path with a file extension which is assumed to be a static file
base-router:
rule: PathRegexp(`/.*[.].*`)
rule: PathRegexp(`^/.+\.[a-zA-Z0-9]+$`)
middlewares:
# add /tools/base to the beginning
- "addToolsBase"
Expand Down
10 changes: 4 additions & 6 deletions openc3-traefik/traefik-letsencrypt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ http:
domains:
- main: "mydomain.com"
# Route to other tool plugins hosted statically in Minio
# Matches any path with a file extension which is assumed to be
# a static file
# Matches any path with a file extension which is assumed to be a static file
tools-router:
rule: PathRegexp(`/tools/.*/.*[.](ttf|otf|woff|woff2|html|js|css|png|jpg|jpeg|gif|svg|ico|json|xml|txt|pdf|zip|tar|gz|tgz|csv|tsv|md|yaml|yml|bin|doc|docx|xls|xlsx|ppt|pptx|mp4|mp3|wav|avi|mov|flv|swf|apk|ipa|deb|rpm|exe|msi|dmg|pkg|sh|bat|cmd|ps1|py|pl|rb|php|java|class|jar|war|ear|so|dll|lib|a|o|obj|pdb|pdb|lib|dylib|framework)`)
rule: PathRegexp(`^/tools/.+/.+\.[a-zA-Z0-9]+$`)
service: service-minio
priority: 6
tls:
Expand Down Expand Up @@ -140,10 +139,9 @@ http:
domains:
- main: "mydomain.com"
# Route to base files hosted statically in Minio
# Matches any path with a file extension which is assumed to be
# a static file
# Matches any path with a file extension which is assumed to be a static file
base-router:
rule: PathRegexp(`/.*[.].*`)
rule: PathRegexp(`^/.+\.[a-zA-Z0-9]+$`)
middlewares:
# add /tools/base to the beginning
- "addToolsBase"
Expand Down
10 changes: 4 additions & 6 deletions openc3-traefik/traefik-ssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ http:
priority: 7
tls: {}
# Route to other tool plugins hosted statically in Minio
# Matches any path with a file extension which is assumed to be
# a static file
# Matches any path with a file extension which is assumed to be a static file
tools-router:
rule: PathRegexp(`/tools/.*/.*[.](ttf|otf|woff|woff2|html|js|css|png|jpg|jpeg|gif|svg|ico|json|xml|txt|pdf|zip|tar|gz|tgz|csv|tsv|md|yaml|yml|bin|doc|docx|xls|xlsx|ppt|pptx|mp4|mp3|wav|avi|mov|flv|swf|apk|ipa|deb|rpm|exe|msi|dmg|pkg|sh|bat|cmd|ps1|py|pl|rb|php|java|class|jar|war|ear|so|dll|lib|a|o|obj|pdb|pdb|lib|dylib|framework)`)
rule: PathRegexp(`^/tools/.+/.+\.[a-zA-Z0-9]+$`)
service: service-minio
priority: 6
tls: {}
Expand Down Expand Up @@ -116,10 +115,9 @@ http:
priority: 3
tls: {}
# Route to base files hosted statically in Minio
# Matches any path with a file extension which is assumed to be
# a static file
# Matches any path with a file extension which is assumed to be a static file
base-router:
rule: PathRegexp(`/.*[.].*`)
rule: PathRegexp(`^/.+\.[a-zA-Z0-9]+$`)
middlewares:
# add /tools/base to the beginning
- "addToolsBase"
Expand Down
Loading
Loading