Пример #1
0
    def __init__(self, parent, frame):
        self.parent = parent  # we are drawing on our parent, so dc comes from this
        self.frame = frame  # the frame owns any controls we might need to update

        parent.SetDropTarget(TextDropTarget(self))  # calls self.OnDropText when drag and drop complete
        self.InitIvy()

        self.width = 800
        self.height = 200
        self.margin = min(self.height / 10, 20)
        self.font = wx.Font(self.margin / 2, wx.DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
        self.pixmap = wx.EmptyBitmap(self.width, self.height)
        self.plot_size = self.width
        self.max = -1e32
        self.min = 1e32
        self.plot_interval = 200
        self.plots = {}
        self.auto_scale = True
        self.offset = 0.0
        self.scale = 1.0
        self.x_axis = None

        messages_xml_map.parse_messages()

        # start the timer
        self.timer = wx.FutureCall(self.plot_interval, self.OnTimer)
Пример #2
0
 def __init__(self, callback=None, init=True, verbose=False, bind_regex='(.*)'):
     self.callback = callback
     self.ivy_id = 0
     self.verbose = verbose
     # make sure all messages are parsed before we start creating them in callbacks
     messages_xml_map.parse_messages()
     self.init_ivy(init, bind_regex)
Пример #3
0
 def __init__(self, callback=None, init=True, verbose=False, bind_regex='(.*)'):
     self.callback = callback
     self.ivy_id = 0
     self.verbose = verbose
     # make sure all messages are parsed before we start creating them in callbacks
     messages_xml_map.parse_messages()
     self.init_ivy(init, bind_regex)
Пример #4
0
def main():
    messages_xml_map.parse_messages()


    #Command line options
    parser = argparse.ArgumentParser(description="Link_Combiner listens to the ivy messages received from multiple Link agents (set each of their -id options to a unique number), and sends a combined stream of messages to the other agents.")
    parser.add_argument("-b", "-buffer_size", "--buffer_size", help="The number of elements messages to be stored in the circular buffer for each link", default=10)
    args = parser.parse_args()

    global BUFFER_SIZE
    BUFFER_SIZE = int(args.buffer_size)            #The number of elements messages to be stored in the circular buffer for each link.

    link_combiner = Link_Combiner()
Пример #5
0
def main():
    messages_xml_map.parse_messages()


    #Command line options
    parser = argparse.ArgumentParser(description="Link_Combiner listens to the ivy messages received from multiple Link agents (set each of their -id options to a unique number), and sends a combined stream of messages to the other agents.")
    parser.add_argument("-b", "-buffer_size", "--buffer_size", help="The number of elements messages to be stored in the circular buffer for each link", default=10)
    args = parser.parse_args()

    global BUFFER_SIZE
    BUFFER_SIZE = int(args.buffer_size)            #The number of elements messages to be stored in the circular buffer for each link.

    link_combiner = Link_Combiner()
Пример #6
0
    def __init__(self):
        self.InitIvy()
        self.ivy_id = 0
        self.status_timer = threading.Timer(STATUS_PERIOD, self.sendStatus)
        self.ping_timer = threading.Timer(STATUS_PERIOD, self.sendPing)
        self.ac_downlink_status = {}
        self.rx_err = 0

        messages_xml_map.parse_messages()
        self.data_types = {'float': ['f', 4],
                           'uint8': ['B', 1],
                           'uint16': ['H', 2],
                           'uint32': ['L', 4],
                           'int8': ['b', 1],
                           'int16': ['h', 2],
                           'int32': ['l', 4]
                           }
Пример #7
0
    def __init__(self):
        self.InitIvy()
        self.ivy_id = 0
        self.status_timer = threading.Timer(STATUS_PERIOD, self.sendStatus)
        self.ping_timer = threading.Timer(STATUS_PERIOD, self.sendPing)
        self.ac_downlink_status = {}
        self.rx_err = 0

        messages_xml_map.parse_messages()
        self.data_types = {
            'float': ['f', 4],
            'uint8': ['B', 1],
            'uint16': ['H', 2],
            'uint32': ['L', 4],
            'int8': ['b', 1],
            'int16': ['h', 2],
            'int32': ['l', 4]
        }