robotics-in-concert / rocon_multimaster

Key components for ros multimaster systems
12 stars 19 forks source link

Batched flip status handling in the gateway #329

Closed stonier closed 7 years ago

stonier commented 8 years ago

This started to get implemented in get_multiple_flip_request_status() in gateway.py, but isn't actually used anywhere.

The status is retrieved in three places:

In all these cases, it goes via the singular get_flip_request_status to get the status, which means for loops everywhere. This batched retrieval hasn't been utilised.

This is an issue to remind us that we could do so and save alot of looping.

stonier commented 7 years ago

Actually, this has all been implemented nicely by piyush in a700fdce and redirects to the batched call.

def get_flip_request_status(self, remote_rule):
        status = self.get_multiple_flip_request_status([remote_rule])
        return status[0]