Skip to content

EmulationDataGenerator for Drones #21

@linhsolar

Description

@linhsolar

@hong3nguyen @nguu0123 we shall apply the concept of data generators that you see in many (streaming) tools to emulator data generators for Drone:, for example,

def main_send_request(url, group_id, node_id, req_rate, ds_path):
    # device_id = self.device_id
    # ds_path = self.ds_path
    # req_rate = self.rate
    # url = self.server_url

    files = os.listdir(ds_path)
    jpeg_images_list = [file for file in files if file.lower().endswith(".jpeg")]
    requesting_interval = 1.0 / req_rate

    timer = Timer(
        requesting_interval,
        send_request,
        args=(
            url,
            requesting_interval,
            jpeg_images_list,
            ds_path,
        ),
    )
    timer.start()

should be replaced by an abstract DataGenerator() you instantiate the Generator and take() elements from the generators and send the data.
Thus we have different DataGenerator implementations, each for a different purpose and we decouple the hardcode of data emulation from the drone.
e.g., https://adlstream.readthedocs.io/en/latest/API/data/BaseStreamGenerator/ or other DataGenerator

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions