Skip to content

Commit

Permalink
Merge pull request #4 from oceanzus/starttime_fix
Browse files Browse the repository at this point in the history
Adds Orb negative regex support.
  • Loading branch information
oceanzus authored Oct 4, 2023
2 parents dae3dc2 + 68df1b2 commit 6cad9eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 0.0.44

- ANTELOPE - Adds orbreject command to support complex Orb channel selection

Version 0.0.43

- ANTELOPE - filters out invalid channels
Expand Down
2 changes: 1 addition & 1 deletion ooi_port_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.43'
__version__ = '0.0.44'
9 changes: 9 additions & 0 deletions ooi_port_agent/antelope_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def register_commands(self, command_protocol):
log.msg('PortAgent register commands for protocol: %s' % command_protocol)
command_protocol.register_command('orblist', self._list_channels)
command_protocol.register_command('orbselect', self._set_select)
command_protocol.register_command('orbreject', self._set_reject)
command_protocol.register_command('orbseek', self._set_seek)
command_protocol.register_command('orbstart', self._orb_start)
command_protocol.register_command('orbstop', self._orb_stop)
Expand All @@ -87,6 +88,14 @@ def _set_select(self, command, *args):
msg = 'Orb select(%s) yielded num_sources: %d' % (args[:1], num_sources)
return Packet.create(msg + NEWLINE, PacketType.PA_STATUS)

def _set_reject(self, command, *args):
if len(args) == 0:
num_sources = 0
else:
num_sources = self.orb.reject(args[0])
msg = 'Orb reject(%s) yielded num_sources: %d' % (args[:1], num_sources)
return Packet.create(msg + NEWLINE, PacketType.PA_STATUS)

def _set_seek(self, command, *args):
if len(args) == 0:
seek = ORBOLDEST
Expand Down

0 comments on commit 6cad9eb

Please sign in to comment.