Commit 16c5e5d4 authored by Ulrich Kemloh's avatar Ulrich Kemloh

adding xsd file for events

parent 4784f45f
......@@ -245,8 +245,8 @@ bool Simulation::InitArgs(const ArgumentParser& args)
//read the events
_em = new EventManager(_building.get());
_em->readEventsXml();
_em->listEvents();
_em->ReadEventsXml();
_em->ListEvents();
//which hpc-architecture?
_hpc = args.GetHPCFlag();
......
This diff is collapsed.
......@@ -66,14 +66,14 @@ public:
//Dateien einlesen
void SetProjectFilename(const std::string &filename) ;
void SetProjectRootDir(const std::string &filename);
void readEventsXml();
void listEvents();
void readEventsTxt(double time);
void ReadEventsXml();
void ListEvents();
void ReadEventsTxt(double time);
//Update
void Update_Events(double time, double d);
//Eventhandling
void closeDoor(int id);
void openDoor(int id);
void changeRouting(int id, std::string state);
void getTheEvent(char* c);
void CloseDoor(int id);
void OpenDoor(int id);
void ChangeRouting(int id, const std::string& state);
void GetEvent(char* c);
};
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JPScore>
<JPScore project="JPS-Project" version="0.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../xsd/jps_events.xsd">
<events>
<event time="2" type="door" state="close" id="0" caption="exit" />
<event time="2" type="door" state="close" id="0"/>
<event time="10" type="door" state="close" id="1" caption="roomdoor" />
<event time="15" type="door" state="open" id="0" caption="exit" />
</events>
......
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="JPScore">
<xs:complexType>
<xs:sequence>
<xs:element name="events">
<xs:complexType>
<xs:sequence>
<xs:element name="event" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:float" name="time" use="required"/>
<xs:attribute type="xs:string" name="type" use="required"/>
<xs:attribute type="xs:string" name="state" use="required"/>
<xs:attribute type="xs:int" name="id" use="required" />
<xs:attribute type="xs:string" name="caption" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="project" use="required"/>
<xs:attribute type="xs:float" name="version" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment