Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion src/adctk/ldms_scripts/ldms_blob_file_to_http_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ def handle_field_pairs(
have_fraction = True
else:
# they're both zero length - this is legal for !! - yield one or the other but not both
assert field_pair[0] == field_pair[1]
regular_fields.append(field_pair[0])

return regular_fields, have_fraction, fraction
Expand Down
6 changes: 4 additions & 2 deletions src/adctk/ldms_scripts/ldms_blob_show_offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
#done
import subprocess
import sys
import pathlib
def main():
files=sys.argv[1:]
for i in files:
script = "od -A d -t u8 -j8 -w8 {} |sed -e 's/[0-9,A-F,a-f]* *//'".format(i)
subprocess.call(script, shell=True)
if pathlib.Path(i).is_file():
script = f"od -A d -t u8 -j8 -w8 {i} |sed -e 's/[0-9,A-F,a-f]* *//'"
subprocess.call(script, shell=True)

if __name__ == '__main__':
main()
6 changes: 4 additions & 2 deletions src/adctk/ldms_scripts/ldms_blob_show_timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
#done
import subprocess
import sys
import pathlib
def main():
files=sys.argv[1:]
for i in files:
script = "od -A d -t u8 -j8 -w8 {}".format(i)
subprocess.call(script, shell=True)
if pathlib.Path(i).is_file():
script = "od -A d -t u8 -j8 -w8 {}".format(i)
subprocess.call(script, shell=True)

if __name__ == '__main__':
main()
10 changes: 8 additions & 2 deletions src/adctk/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,20 @@ def terminate(self) -> None:

def pause(self) -> None:
"""! pause() all configured publishers"""
print(f"PAUSING {len(self.pvec)} PUBLISHERS")
# print(f"PAUSING {len(self.pvec)} PUBLISHERS")
for pub in self.pvec:
pub.pause()
self.paused = True

def resume(self) -> None:
"""! resume() all configured publishers"""
print(f"RESUMING {len(self.pvec)} PUBLISHERS")
# print(f"RESUMING {len(self.pvec)} PUBLISHERS")
for pub in self.pvec:
pub.resume()
self.paused = False

def get_names(self) -> list[str]:
n = []
for i in self.pvec:
n.append(i.name())
return n
3 changes: 3 additions & 0 deletions src/adctk/scripts/adctk_hello_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def main() -> int:

# create a factory
f = adctk.Factory()
avail = f.get_publisher_names()
print(f"available publishers are: {avail}")
print(f'ADC_MULTI_PUBLISHER_NAMES is: {os.getenv("ADC_MULTI_PUBLISHER_NAMES")}')

# create a message and add header
b = f.get_builder()
Expand Down
Loading