Parses <EventRecord>

        @param node: Node containing the <EventRecord> element
        @type node: xml.etree.Element

def parse_event_record(self, node):
        """
        Parses <EventRecord>

        @param node: Node containing the <EventRecord> element
        @type node: xml.etree.Element
        """

        if self.current_simulation == None:
            self.raise_error('<EventRecord> must be only be used inside a ' +
                             'simulation specification')

        if 'quantity' in node.lattrib:
            quantity = node.lattrib['quantity']
        else:
            self.raise_error('<EventRecord> must specify a quantity.')

        if 'eventport' in node.lattrib:
            eventPort = node.lattrib['eventport']
        else:
            self.raise_error('<EventRecord> must specify an eventPort.')


        self.current_simulation.add_event_record(EventRecord(quantity, eventPort))