Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create script for generating dummy telemetry data for tests #75

Closed
MJJoyce opened this issue May 23, 2018 · 0 comments
Closed

Create script for generating dummy telemetry data for tests #75

MJJoyce opened this issue May 23, 2018 · 0 comments

Comments

@MJJoyce
Copy link
Member

MJJoyce commented May 23, 2018

Per @MJJoyce

Having a script for generating dummy telemetry data with marching values, data within specific ranges, etc. would be useful when trying to test new functionality.


Per @bbornstein

Yes, that would be great. Given a PacketDefinition, it's straightforward:

defn = tlm.getDefaultDict()[packetName]
data = bytearray(xrange(defn.nbytes))
pkt  = tlm.Packet(defn, data)

This should really be a method on PacketDefinition, e.g.:

def simulate(fill=None):
    size   = self.nbytes
    values = xrange(size) if fill is None else ((fill,) * size)
    return Packet(self, bytearray(data))

(I chose simulate() as it seems somehow analogous to validate().) Any script could then easily simulate packets:

defn = tlm.getDefaultDict()[packetName]
pkt  = defn.simulate()
...

Per @MJJoyce

+1, I like the simulate() choice as well

aywaldron added a commit to aywaldron/AIT-Core that referenced this issue Sep 7, 2018
…ta for tests

Created ait_tlm_simulate.py script using simulate method added to
PacketDefinition class in tlm.py.
aywaldron added a commit to aywaldron/AIT-Core that referenced this issue Sep 7, 2018
aywaldron added a commit to aywaldron/AIT-Core that referenced this issue Sep 11, 2018
…ta for tests

Created ait_tlm_simulate.py script using simulate method added to
PacketDefinition class in tlm.py.
aywaldron added a commit to aywaldron/AIT-Core that referenced this issue Sep 11, 2018
MJJoyce pushed a commit that referenced this issue Sep 13, 2018
Created ait_tlm_simulate.py script using simulate method added to
PacketDefinition class in tlm.py.
MJJoyce pushed a commit that referenced this issue Sep 13, 2018
aywaldron added a commit that referenced this issue Sep 21, 2018
Adding documentation for new ait_tlm_simulate.py script created
for Issue #75 and resolved in PR #116.
aywaldron added a commit that referenced this issue Dec 18, 2018
… into broker; removing need for input type specification (now inferred from input value)
aywaldron added a commit that referenced this issue Dec 18, 2018
… into broker; removing need for input type specification (now inferred from input value)
aywaldron added a commit that referenced this issue Dec 18, 2018
… into broker; removing need for input type specification (now inferred from input value)
aywaldron added a commit that referenced this issue Dec 18, 2018
aywaldron added a commit that referenced this issue Dec 19, 2018
aywaldron added a commit that referenced this issue Dec 19, 2018
aywaldron added a commit that referenced this issue Dec 19, 2018
…lasses; getting rid of stream input_type attribute since stream doesn't care about its input type
aywaldron added a commit that referenced this issue Dec 20, 2018
aywaldron added a commit that referenced this issue Dec 29, 2018
- Added loop to stream to listen for published messages
- Added handling  of messages when recieved by stream
- Put stream message receiving/handling and broker startup in separate threads
- Edited config to add test of functionality to broker.py main function
- Edited input type checking in handler to attempt type conversion first
aywaldron added a commit that referenced this issue Dec 29, 2018
… into broker; removing need for input type specification (now inferred from input value)
aywaldron added a commit that referenced this issue Dec 29, 2018
aywaldron added a commit that referenced this issue Dec 29, 2018
aywaldron added a commit that referenced this issue Dec 29, 2018
aywaldron added a commit that referenced this issue Dec 29, 2018
…lasses; getting rid of stream input_type attribute since stream doesn't care about its input type
aywaldron added a commit that referenced this issue Dec 29, 2018
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
…port; adding command stream which subscribes to GUI and publishes commands to port
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
…e to them instead of outbound streams specifying plugins they subscribe to
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
Update some comments and logs

Removed example handlers

Made base Handler and Plugin classes inherit from ABC

Rewrote tests to use PacketHandler instead of Handler since it is now abstract

Renamed AitGuiPlugin to AITGUIPlugin

Removed type attribute of all components and instead customized __repr__methods
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
Removed input validation functionality from handler, making the execute_handler function not longer necessary. Removed this function, calling the handler function from the stream instead. Removed/rewrote tests to reflect these changes.

Rewrote tests using Plugin base class to use TelemetryLimitMonitor as Plugin base class is now abstract.
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
…n initialization of plugin, not on every message; raises errors initialization so that plugin is killed; replaced regex string splitting
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
…tbound functions; renaming ZMQInputStream to ZMQStream to avoid confusion with inbound/outbound streams; tests still need updating with new stream creation methods
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
Now allow all streams to have multiple inputs, and set the inputs
attribute to an empty list instead of None if no inputs specified.

Moved input from PortInputClient init params to kwargs for consistency
across client subclasses.

PortInputClient will now look for a stream's first input to be a port
on which it listens for messages.
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
- Remove plugins/ dir which includes AIT GUI plugin
- Remove plugins from default config.yaml
MJJoyce pushed a commit that referenced this issue Sep 4, 2019
Update test example configs to specify stream input as a list of inputs.
Update tests to assert parsed stream inputs are lists of inputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant