Beispiel #1
0
    def __init__(self, task_name, app_name):
        FardTask.__init__(self, task_name, app_name)
        # configuration map
        self.config = None
        # status about next and last peer
        self.position = -1
        self.transit_cars = 0
        self.flow_status = {}
        self.next_peer = None
        self.last_peer = None
        self.last = False
        self.node_count = -1
        # flag to understand if we have finished setup
        self.internal_setup_done = False
        # instantiate events
        self.cars_count_event = CarsCount(self)
        self.flow_status_event = FlowStatus(self)
        self.whoami_event = WhoAmI(self)

        # app and accelerator parameters
        self.video_input = False
        self.vidcap = None
        self.fcount = 0
        self.input_buffer = None
        self.output_buffer = None
        self.dma0 = None
        self.interface = None

        # real-time correction parameters
        self.next_frame = None
        self.time_gap = None
        self.fps = None
        self.total_frames = None
Beispiel #2
0
    def __init__(self, task_name, app_name):
        FardTask.__init__(self, task_name, app_name)
        # configurations and resources data structures
        self.config = {}
        self.local_tasks = {}
        self.local_available_resources = {}

        # node manager events declarations
        self.abort_launch_event = None
        self.launch_task_event = None
        self.node_available_event = None
        self.ask_availability_event = None
        self.kill_app_event = None
        self.collect_output_event = None
        self.send_output_event = None
        self.launch_completed_event = None

        # queues for direct task messaging and output retrieaval
        self.task_message_queue = Queue()
        self.output_queue = Queue()

        # configuration options
        self.log_apps = False
        self.python_runtime = "python3"
Beispiel #3
0
 def __init__(self, task_name, app_name):
     FardTask.__init__(self, task_name, app_name)
     self.demo_event = DemoEvent(self)
     self.demo_sender = None