yEd format decoder implementation

This commit is contained in:
Alexey Fedoseev
2024-01-06 01:46:36 +03:00
commit fc725a2042
12 changed files with 3393 additions and 0 deletions

165
LICENSE Normal file
View File

@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

46
Makefile Normal file
View File

@@ -0,0 +1,46 @@
LIB_TARGET_STATIC := libcyberiadaml.a
LIB_TARGET_DYNAMIC := libcyberiadaml.so
ifeq ($(DYNAMIC), 1)
LIB_TARGET := $(LIB_TARGET_DYNAMIC)
else
LIB_TARGET := $(LIB_TARGET_STATIC)
endif
TEST_TARGET := cyberiada_test
LIB_SOURCES := cyberiadaml.c
TEST_SOURCES := test.c
LIB_OBJECTS := $(patsubst %.c, %.o, $(LIB_SOURCES))
TEST_OBJECTS := $(patsubst %.c, %.o, $(TEST_SOURCES))
ifeq ($(DEBUG), 1)
CFLAGS := -fPIC -g3 -D__DEBUG__
else
CFLAGS := -fPIC
endif
INCLUDE := -I. -I/usr/include/libxml2
LIBS := -L/usr/lib -lxml2
TEST_LIBS := -L. -lcyberiadaml
$(LIB_TARGET): $(LIB_OBJECTS)
ifeq ($(DYNAMIC), 1)
gcc -shared $(LIBS) $(LIB_OBJECTS) -o $@
else
ar rcs $@ $(LIB_OBJECTS)
endif
$(TEST_TARGET): $(TEST_OBJECTS) $(TARGET)
gcc $(TEST_OBJECTS) -Wl,--no-as-needed $(LIBS) $(TEST_LIBS) -o $@
%.o: %.c
gcc -c $< $(CFLAGS) $(INCLUDE) -o $@
clean:
rm -f *~ *.o $(TARGET) $(TEST_TARGET) $(LIB_TARGET_STATIC) $(LIB_TARGET_DYNAMIC)
test: $(TEST_TARGET)
all: $(LIB_TARGET) $(TEST_TARGET)
.PHONY: all clean test

22
README.md Normal file
View File

@@ -0,0 +1,22 @@
# The Cyberida State Machine Library
The C library for processing CyberiadaML - the version of GraphML for storing state machine graphs
for Cyberiada Project, Berloga games and Orbita satellite
The code is distributed under the Lesser GNU Public License (version 3), the documentation -- under
the GNU Free Documentation License (version 1.3).
## Requirements
* build-essential
* libxml2-dev
## Installation
Run `make` to build the library binaries.
Run `make test` to build the test program.
Use variables:
* `DEBUG=1` debug version of the library
* `DYNAMIC=1` build shared version of the library

931
cyberiadaml.c Normal file
View File

@@ -0,0 +1,931 @@
/* -----------------------------------------------------------------------------
* The Cyberiada GraphML library implemention
*
* The C library implementation
*
* Copyright (C) 2024 Alexey Fedoseev <aleksey@fedoseev.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/
* ----------------------------------------------------------------------------- */
#include <stdlib.h>
#include <string.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include "cyberiadaml.h"
#define GRAPHML_NAMESPACE_URI "http://graphml.graphdrawing.org/xmlns"
#define GRAPHML_GRAPHML_ELEMENT "graphml"
#define GRAPHML_BERLOGA_SCHEMENAME_ATTR "SchemeName"
#define GRAPHML_GRAPH_ELEMENT "graph"
#define GRAPHML_NODE_ELEMENT "node"
#define GRAPHML_EDGE_ELEMENT "edge"
#define GRAPHML_ID_ATTRIBUTE "id"
#define GRAPHML_SOURCE_ATTRIBUTE "source"
#define GRAPHML_TARGET_ATTRIBUTE "target"
#define GRAPHML_YED_GEOMETRYNODE "Geometry"
#define GRAPHML_YED_PATHNODE "Path"
#define GRAPHML_YED_POINTNODE "Point"
#define GRAPHML_YED_GEOM_X_ATTRIBUTE "x"
#define GRAPHML_YED_GEOM_Y_ATTRIBUTE "y"
#define GRAPHML_YED_GEOM_WIDTH_ATTRIBUTE "width"
#define GRAPHML_YED_GEOM_HEIGHT_ATTRIBUTE "height"
#define GRAPHML_YED_GEOM_SOURCE_X_ATTRIBUTE "sx"
#define GRAPHML_YED_GEOM_SOURCE_Y_ATTRIBUTE "sy"
#define GRAPHML_YED_GEOM_TARGET_X_ATTRIBUTE "tx"
#define GRAPHML_YED_GEOM_TARGET_Y_ATTRIBUTE "ty"
#define GRAPHML_YED_COMMENTNODE "UMLNoteNode"
#define GRAPHML_YED_GROUPNODE "GroupNode"
#define GRAPHML_YED_GENERICNODE "GenericNode"
#define GRAPHML_YED_LABELNODE "NodeLabel"
#define GRAPHML_YED_NODE_CONFIG_ATTRIBUTE "configuration"
#define GRAPHML_YED_NODE_CONFIG_START "com.yworks.bpmn.Event"
#define GRAPHML_YED_NODE_CONFIG_START2 "com.yworks.bpmn.Event.withShadow"
#define GRAPHML_YED_PROPNODE "Property"
#define GRAPHML_YED_PROP_VALUE_ATTRIBUTE "value"
#define GRAPHML_YED_PROP_VALUE_START "EVENT_CHARACTERISTIC_START"
#define GRAPHML_YED_EDGELABEL "EdgeLabel"
#define CYBERIADA_HOLLOW_NODE "<node>"
#define CYBERIADA_ENTRY_ACTION "entry"
#define CYBERIADA_EXIT_ACTION "exit"
#define MAX_STR_LEN 4096
#ifdef __DEBUG__
#define DEBUG(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG(...)
#endif
#define ERROR(...) fprintf(stderr, __VA_ARGS__)
/* -----------------------------------------------------------------------------
* Utility functions
* ----------------------------------------------------------------------------- */
int cyberiada_copy_string(char** target, unsigned int* size, const char* source)
{
char* target_str;
unsigned int strsize;
if (!source)
return CYBERIADA_BAD_PARAMETER;
strsize = strlen(source);
if (strsize > MAX_STR_LEN - 1) {
strsize = MAX_STR_LEN - 1;
}
target_str = (char*)malloc(strsize + 1);
strncpy(target_str, source, strsize);
target_str[strsize] = 0;
*target = target_str;
*size = strsize;
return CYBERIADA_NO_ERROR;
}
/* -----------------------------------------------------------------------------
* Graph manipulation functions
* ----------------------------------------------------------------------------- */
CyberiadaNode* cyberiada_graph_find_node(CyberiadaNode* root, const char* id)
{
CyberiadaNode* node;
CyberiadaNode* found;
if (strcmp(root->id, id) == 0) {
return root;
}
for (node = root->next; node; node = node->next) {
found = cyberiada_graph_find_node(node, id);
if (found)
return found;
}
if (root->children) {
return cyberiada_graph_find_node(root->children, id);
}
return NULL;
}
CyberiadaNode* cyberiada_new_node(const char* id)
{
CyberiadaNode* new_node = (CyberiadaNode*)malloc(sizeof(CyberiadaNode));
cyberiada_copy_string(&(new_node->id), &(new_node->id_len), id);
new_node->title = NULL;
new_node->title_len = 0;
new_node->type = cybNodeSimple;
new_node->next = NULL;
new_node->parent = NULL;
new_node->children = NULL;
new_node->action = NULL;
new_node->action_len = 0;
new_node->geometry_rect.x = new_node->geometry_rect.y =
new_node->geometry_rect.width = new_node->geometry_rect.height = 0.0;
return new_node;
}
CyberiadaEdge* cyberiada_new_edge(const char* id, CyberiadaNode* source, CyberiadaNode* target)
{
CyberiadaEdge* new_edge = (CyberiadaEdge*)malloc(sizeof(CyberiadaEdge));
cyberiada_copy_string(&(new_edge->id), &(new_edge->id_len), id);
new_edge->source = source;
new_edge->target = target;
new_edge->action = NULL;
new_edge->next = NULL;
new_edge->geometry_source_point.x = new_edge->geometry_source_point.y =
new_edge->geometry_target_point.x = new_edge->geometry_target_point.y = 0.0;
new_edge->geometry_polyline = NULL;
return new_edge;
}
int cyberiada_graph_add_sibling_node(CyberiadaNode* sibling, CyberiadaNode* new_node)
{
CyberiadaNode* node = sibling;
if (!new_node) {
return CYBERIADA_BAD_PARAMETER;
}
new_node->parent = sibling->parent;
while (node->next) node = node->next;
node->next = new_node;
return CYBERIADA_NO_ERROR;
}
int cyberiada_graph_add_edge(CyberiadaSM* sm, const char* id, CyberiadaNode* source, CyberiadaNode* target)
{
CyberiadaEdge* last_edge;
CyberiadaEdge* new_edge;
if (!sm) {
return CYBERIADA_BAD_PARAMETER;
}
new_edge = cyberiada_new_edge(id, source, target);
last_edge = sm->edges;
if (last_edge == NULL) {
sm->edges = new_edge;
} else {
while (last_edge->next) last_edge = last_edge->next;
last_edge->next = new_edge;
}
return CYBERIADA_NO_ERROR;
}
CyberiadaEdge* cyberiada_graph_find_last_edge(CyberiadaSM* sm)
{
CyberiadaEdge* edge;
if (!sm) {
return NULL;
}
edge = sm->edges;
while (edge && edge->next) edge = edge->next;
return edge;
}
/* -----------------------------------------------------------------------------
* The Cyberiada GraphML library fucntions declarations
* ----------------------------------------------------------------------------- */
CyberiadaSM* cyberiada_create_sm()
{
CyberiadaSM* sm = (CyberiadaSM*)malloc(sizeof(CyberiadaSM));
cyberiada_init_sm(sm);
return sm;
}
int cyberiada_init_sm(CyberiadaSM* sm)
{
if (sm) {
sm->name = NULL;
sm->name = 0;
sm->version = NULL;
sm->version_len = 0;
sm->nodes = NULL;
sm->start = NULL;
sm->edges = NULL;
}
return CYBERIADA_NO_ERROR;
}
static int cyberiada_destroy_node(CyberiadaNode* node)
{
CyberiadaNode* n;
if(node != NULL) {
do {
n = node;
node = node->next;
if(n->id) free(n->id);
if(n->title) free(n->title);
if(n->children) {
cyberiada_destroy_node(n->children);
}
if(n->action) free(n->action);
} while (node);
}
}
int cyberiada_cleanup_sm(CyberiadaSM* sm)
{
CyberiadaNode* n;
CyberiadaEdge *edge, *e;
CyberiadaPolyline *polyline, *pl;
if (sm == NULL) {
return CYBERIADA_NO_ERROR;
}
if (sm->name) free(sm->name);
if (sm->version) free(sm->version);
if (sm->nodes) {
cyberiada_destroy_node(sm->nodes);
}
if (sm->edges) {
edge = sm->edges;
do {
e = edge;
edge = edge->next;
if (e->id) free(e->id);
if (e->action) free(e->action);
if (e->geometry_polyline) {
polyline = e->geometry_polyline;
do {
pl = polyline;
polyline = polyline->next;
free(pl);
} while (polyline);
}
free(e);
} while (edge);
}
return CYBERIADA_NO_ERROR;
}
int cyberiada_destroy_sm(CyberiadaSM* sm)
{
int res = cyberiada_cleanup_sm(sm);
if (res != CYBERIADA_NO_ERROR) {
return res;
}
free(sm);
return CYBERIADA_NO_ERROR;
}
static int cyberiada_get_attr_value(char* buffer, unsigned int buffer_len,
xmlNode* node, const char* attrname)
{
xmlAttr* attribute = node->properties;
while(attribute) {
if (strcmp(attribute->name, attrname) == 0) {
xmlChar* value = xmlNodeListGetString(node->doc, attribute->children, 1);
strncpy(buffer, (char*)value, buffer_len);
xmlFree(value);
return CYBERIADA_NO_ERROR;
}
attribute = attribute->next;
}
return CYBERIADA_NOT_FOUND;
}
static int cyberiada_get_element_text(char* buffer, unsigned int buffer_len,
xmlNode* node)
{
xmlChar* value = xmlNodeListGetString(node->doc,
node->xmlChildrenNode,
1);
strncpy(buffer, (char*)value, buffer_len);
xmlFree(value);
return CYBERIADA_NO_ERROR;
}
/* -----------------------------------------------------------------------------
* The Cyberiada GraphML XML processor state machine
* ----------------------------------------------------------------------------- */
typedef enum {
gpsInit = 0,
gpsGraph,
gpsNode,
gpsNodeGeometry,
gpsNodeTitle,
gpsNodeAction,
gpsNodeStart,
gpsEdge,
gpsEdgePath,
gpsInvalid
} GraphProcessorState;
const char* debug_state_names[] = {
"Init",
"Graph",
"Node",
"NodeGeometry",
"NodeTitle",
"NodeAction",
"NodeStart",
"Edge",
"EdgePath",
"Invalid"
};
static GraphProcessorState handle_new_graph(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** current)
{
CyberiadaNode* node;
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
/* process the top graph element only */
if(cyberiada_get_attr_value(buffer, buffer_len,
xml_node,
GRAPHML_ID_ATTRIBUTE) != CYBERIADA_NO_ERROR) {
return gpsInvalid;
}
node = cyberiada_new_node(CYBERIADA_HOLLOW_NODE);
DEBUG("found graph %s \n", buffer);
if (sm->nodes == NULL) {
sm->nodes = node;
} else {
(*current)->children = node;
node->parent = *current;
}
*current = node;
return gpsGraph;
}
static GraphProcessorState handle_new_node(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** current)
{
CyberiadaNode* node;
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
if (cyberiada_get_attr_value(buffer, buffer_len,
xml_node,
GRAPHML_ID_ATTRIBUTE) != CYBERIADA_NO_ERROR) {
return gpsInvalid;
}
DEBUG("found node %s\n", buffer);
if (*current == NULL) {
ERROR("current node invalid\n");
return gpsInvalid;
}
if(strcmp((*current)->id, CYBERIADA_HOLLOW_NODE) == 0) {
if (*current == sm->nodes) {
node = cyberiada_new_node(buffer);
(*current)->children = node;
node->parent = *current;
*current = node;
} else {
free((*current)->id);
cyberiada_copy_string(&((*current)->id), &((*current)->id_len), buffer);
}
} else {
node = cyberiada_new_node(buffer);
cyberiada_graph_add_sibling_node(*current, node);
*current = node;
}
return gpsNode;
}
static GraphProcessorState handle_group_node(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** current)
{
(*current)->type = cybNodeComplex;
return gpsNodeGeometry;
}
static GraphProcessorState handle_comment_node(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** current)
{
(*current)->type = cybNodeComment;
cyberiada_copy_string(&((*current)->title), &((*current)->title_len), "COMMENT");
return gpsNodeGeometry;
}
static GraphProcessorState handle_generic_node(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** current)
{
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
if (cyberiada_get_attr_value(buffer, buffer_len,
xml_node,
GRAPHML_YED_NODE_CONFIG_ATTRIBUTE) == CYBERIADA_NO_ERROR &
(strcmp(buffer, GRAPHML_YED_NODE_CONFIG_START) == 0 ||
strcmp(buffer, GRAPHML_YED_NODE_CONFIG_START2) == 0)) {
(*current)->type = cybNodeInitial;
if ((*current)->title != NULL) {
ERROR("Trying to set start node %s label twice\n", (*current)->id);
return gpsInvalid;
}
cyberiada_copy_string(&((*current)->title), &((*current)->title_len), "");
} else {
(*current)->type = cybNodeSimple;
}
return gpsNodeGeometry;
}
static int cyberiada_xml_read_coord(xmlNode* xml_node,
const char* attr_name,
double* result)
{
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
if (cyberiada_get_attr_value(buffer, buffer_len,
xml_node,
attr_name) != CYBERIADA_NO_ERROR) {
return CYBERIADA_BAD_PARAMETER;
}
*result = atof(buffer);
return CYBERIADA_NO_ERROR;
}
static int cyberiada_xml_read_rect(xmlNode* xml_node,
CyberiadaRect* r)
{
if (cyberiada_xml_read_coord(xml_node,
GRAPHML_YED_GEOM_X_ATTRIBUTE,
&(r->x)) != CYBERIADA_NO_ERROR ||
cyberiada_xml_read_coord(xml_node,
GRAPHML_YED_GEOM_Y_ATTRIBUTE,
&(r->y)) != CYBERIADA_NO_ERROR ||
cyberiada_xml_read_coord(xml_node,
GRAPHML_YED_GEOM_WIDTH_ATTRIBUTE,
&(r->width)) != CYBERIADA_NO_ERROR ||
cyberiada_xml_read_coord(xml_node,
GRAPHML_YED_GEOM_HEIGHT_ATTRIBUTE,
&(r->height)) != CYBERIADA_NO_ERROR) {
return CYBERIADA_BAD_PARAMETER;
}
return CYBERIADA_NO_ERROR;
}
static GraphProcessorState handle_node_geometry(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** current)
{
CyberiadaNodeType type = (*current)->type;
if (cyberiada_xml_read_rect(xml_node,
&((*current)->geometry_rect)) != CYBERIADA_NO_ERROR) {
return gpsInvalid;
}
if (type == cybNodeInitial) {
(*current)->geometry_rect.x += (*current)->geometry_rect.width / 2.0;
(*current)->geometry_rect.y += (*current)->geometry_rect.height / 2.0;
(*current)->geometry_rect.width = 0.0;
(*current)->geometry_rect.height = 0.0;
return gpsNodeStart;
} else if (type == cybNodeComment) {
return gpsNodeAction;
} else {
return gpsNodeTitle;
}
}
static GraphProcessorState handle_property(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** current)
{
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
if (cyberiada_get_attr_value(buffer, buffer_len,
xml_node,
GRAPHML_YED_PROP_VALUE_ATTRIBUTE) != CYBERIADA_NO_ERROR) {
return gpsInvalid;
}
if (strcmp(buffer, GRAPHML_YED_PROP_VALUE_START) == 0) {
return gpsGraph;
}
return gpsNodeStart;
}
static GraphProcessorState handle_node_title(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** current)
{
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
if ((*current)->title != NULL) {
ERROR("Trying to set node %s label twice\n", (*current)->id);
return gpsInvalid;
}
cyberiada_get_element_text(buffer, buffer_len, xml_node);
DEBUG("Set node %s title %s\n", (*current)->id, buffer);
cyberiada_copy_string(&((*current)->title), &((*current)->title_len), buffer);
return gpsNodeAction;
}
static GraphProcessorState handle_node_action(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** current)
{
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
if ((*current)->action != NULL) {
ERROR("Trying to set node %s action twice\n", (*current)->id);
return gpsInvalid;
}
cyberiada_get_element_text(buffer, buffer_len, xml_node);
DEBUG("Set node %s action %s\n", (*current)->id, buffer);
cyberiada_copy_string(&((*current)->action), &((*current)->action_len), buffer);
return gpsGraph;
}
static GraphProcessorState handle_new_edge(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** node)
{
CyberiadaNode* source = NULL;
CyberiadaNode* target = NULL;
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
if(cyberiada_get_attr_value(buffer, buffer_len,
xml_node,
GRAPHML_SOURCE_ATTRIBUTE) != CYBERIADA_NO_ERROR) {
return gpsInvalid;
}
source = cyberiada_graph_find_node(sm->nodes, buffer);
if (source == NULL) {
return gpsInvalid;
}
if(cyberiada_get_attr_value(buffer, buffer_len,
xml_node,
GRAPHML_TARGET_ATTRIBUTE) != CYBERIADA_NO_ERROR) {
return gpsInvalid;
}
target = cyberiada_graph_find_node(sm->nodes, buffer);
if (target == NULL) {
return gpsInvalid;
}
if(cyberiada_get_attr_value(buffer, buffer_len,
xml_node,
GRAPHML_ID_ATTRIBUTE) != CYBERIADA_NO_ERROR) {
buffer[0] = 0;
}
DEBUG("found edge %s\n", buffer);
DEBUG("add edge %s %s -> %s\n", buffer, source->id, target->id);
cyberiada_graph_add_edge(sm, buffer, source, target);
return gpsEdgePath;
}
static GraphProcessorState handle_edge_geometry(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** node)
{
CyberiadaEdge *current = cyberiada_graph_find_last_edge(sm);
if (current == NULL) {
ERROR("no current edge\n");
return gpsInvalid;
}
if (cyberiada_xml_read_coord(xml_node,
GRAPHML_YED_GEOM_SOURCE_X_ATTRIBUTE,
&(current->geometry_source_point.x)) != CYBERIADA_NO_ERROR ||
cyberiada_xml_read_coord(xml_node,
GRAPHML_YED_GEOM_SOURCE_Y_ATTRIBUTE,
&(current->geometry_source_point.y)) != CYBERIADA_NO_ERROR ||
cyberiada_xml_read_coord(xml_node,
GRAPHML_YED_GEOM_TARGET_X_ATTRIBUTE,
&(current->geometry_target_point.x)) != CYBERIADA_NO_ERROR ||
cyberiada_xml_read_coord(xml_node,
GRAPHML_YED_GEOM_TARGET_Y_ATTRIBUTE,
&(current->geometry_target_point.y)) != CYBERIADA_NO_ERROR) {
return gpsInvalid;
}
return gpsEdgePath;
}
static GraphProcessorState handle_edge_point(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** node)
{
CyberiadaEdge *current = cyberiada_graph_find_last_edge(sm);
double x, y;
CyberiadaPolyline *pl, *last_pl;
if (current == NULL) {
ERROR("no current edge\n");
return gpsInvalid;
}
if (cyberiada_xml_read_coord(xml_node,
GRAPHML_YED_GEOM_X_ATTRIBUTE,
&x) != CYBERIADA_NO_ERROR ||
cyberiada_xml_read_coord(xml_node,
GRAPHML_YED_GEOM_Y_ATTRIBUTE,
&y) != CYBERIADA_NO_ERROR) {
return gpsInvalid;
}
pl = (CyberiadaPolyline*)malloc(sizeof(CyberiadaPolyline));
pl->point.x = x;
pl->point.y = y;
pl->next = NULL;
if (current->geometry_polyline == NULL) {
current->geometry_polyline = pl;
} else {
last_pl = current->geometry_polyline;
while (last_pl->next) last_pl = last_pl->next;
last_pl->next = pl;
}
return gpsEdgePath;
}
static GraphProcessorState handle_edge_label(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** node)
{
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
CyberiadaEdge *current;
current = cyberiada_graph_find_last_edge(sm);
if (current == NULL) {
ERROR("no current edge\n");
return gpsInvalid;
}
if (current->action != NULL) {
ERROR("Trying to set edge %s:%s label twice\n",
current->source->id, current->target->id);
return gpsInvalid;
}
cyberiada_get_element_text(buffer, buffer_len, xml_node);
DEBUG("add edge %s:%s label %s\n",
current->source->id, current->target->id, buffer);
cyberiada_copy_string(&(current->action), &(current->action_len), buffer);
return gpsGraph;
}
typedef GraphProcessorState (*Handler)(xmlNode* xml_root,
CyberiadaSM* sm,
CyberiadaNode** current);
typedef struct {
GraphProcessorState state;
const char* symbol;
Handler handler;
} ProcessorTransition;
static ProcessorTransition processor_state_table[] = {
{gpsInit, GRAPHML_GRAPH_ELEMENT, &handle_new_graph},
{gpsGraph, GRAPHML_NODE_ELEMENT, &handle_new_node},
{gpsGraph, GRAPHML_EDGE_ELEMENT, &handle_new_edge},
{gpsGraph, GRAPHML_GRAPH_ELEMENT, &handle_new_graph},
{gpsNode, GRAPHML_YED_COMMENTNODE, &handle_comment_node},
{gpsNode, GRAPHML_YED_GROUPNODE, &handle_group_node},
{gpsNode, GRAPHML_YED_GENERICNODE, &handle_generic_node},
{gpsNodeGeometry, GRAPHML_YED_GEOMETRYNODE, &handle_node_geometry},
{gpsNodeStart, GRAPHML_YED_PROPNODE, &handle_property},
{gpsNodeStart, GRAPHML_NODE_ELEMENT, &handle_new_node},
{gpsNodeTitle, GRAPHML_YED_LABELNODE, &handle_node_title},
{gpsNodeAction, GRAPHML_YED_LABELNODE, &handle_node_action},
{gpsEdge, GRAPHML_EDGE_ELEMENT, &handle_new_edge},
{gpsEdgePath, GRAPHML_YED_PATHNODE, &handle_edge_geometry},
{gpsEdgePath, GRAPHML_YED_POINTNODE, &handle_edge_point},
{gpsEdgePath, GRAPHML_YED_EDGELABEL, &handle_edge_label},
{gpsEdgePath, GRAPHML_EDGE_ELEMENT, &handle_new_edge},
};
const unsigned int processor_state_table_size = sizeof(processor_state_table) / sizeof(ProcessorTransition);
static int dispatch_processor(xmlNode* xml_node,
CyberiadaSM* sm,
CyberiadaNode** current,
GraphProcessorState* gps) {
unsigned int i;
if (xml_node->type == XML_ELEMENT_NODE) {
for (i = 0; i < processor_state_table_size; i++) {
if (processor_state_table[i].state == *gps &&
strcmp(xml_node->name, processor_state_table[i].symbol) == 0) {
*gps = (*(processor_state_table[i].handler))(xml_node, sm, current);
return CYBERIADA_NO_ERROR;
}
}
}
return CYBERIADA_NOT_FOUND;
}
static int cyberiada_build_graph(xmlNode* xml_root,
CyberiadaSM* sm,
CyberiadaNode** current,
GraphProcessorState* gps)
{
xmlNode *cur_xml_node = NULL;
for (cur_xml_node = xml_root; cur_xml_node; cur_xml_node = cur_xml_node->next) {
DEBUG("xml node %s sm root %s current %s gps %s\n",
cur_xml_node->name,
sm->nodes ? sm->nodes->id : "none",
*current ? (*current)->id : "none",
debug_state_names[*gps]);
dispatch_processor(cur_xml_node, sm, current, gps);
if (*gps == gpsInvalid) {
return CYBERIADA_FORMAT_ERROR;
}
if (cur_xml_node->children) {
int res = cyberiada_build_graph(cur_xml_node->children, sm, current, gps);
if (res != CYBERIADA_NO_ERROR) {
return res;
}
}
}
return CYBERIADA_NO_ERROR;
}
static int cyberiada_decode_yed_xml(xmlNode* root, CyberiadaSM* sm)
{
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
GraphProcessorState gps = gpsInit;
CyberiadaNode* current = NULL;
int res;
if ((res = cyberiada_build_graph(root, sm, &current, &gps)) != CYBERIADA_NO_ERROR) {
return res;
}
if (cyberiada_get_attr_value(buffer, buffer_len,
root,
GRAPHML_BERLOGA_SCHEMENAME_ATTR) != CYBERIADA_NO_ERROR) {
if (sm->nodes && sm->nodes->children) {
cyberiada_copy_string(&(sm->name), &(sm->name_len), sm->nodes->children->title);
} else {
cyberiada_copy_string(&(sm->name), &(sm->name_len), "");
}
cyberiada_copy_string(&(sm->version), &(sm->version_len), "YED Ostranna");
} else {
cyberiada_copy_string(&(sm->name), &(sm->name_len), buffer);
cyberiada_copy_string(&(sm->version), &(sm->version_len), "YED Berloga 1.4");
}
return CYBERIADA_NO_ERROR;
}
static int cyberiada_decode_cyberiada_xml(xmlNode* root, CyberiadaSM* sm)
{
return CYBERIADA_FORMAT_ERROR;
}
static int cyberiada_check_graphml_ns(xmlNode* root)
{
xmlNs* ns;
if (!root || !(ns = root->nsDef)) {
ERROR("bad GraphML XML NS: null ns ptr\n");
return CYBERIADA_XML_ERROR;
}
do {
if (strcmp(ns->href, GRAPHML_NAMESPACE_URI) == 0) {
return CYBERIADA_NO_ERROR;
}
ns = ns->next;
} while (ns);
ERROR("no GraphML XML NS href\n");
return CYBERIADA_XML_ERROR;
}
int cyberiada_read_sm(CyberiadaSM* sm, const char* filename, CyberiadaXMLFormat format)
{
int res;
xmlDoc* doc = NULL;
xmlNode* root = NULL;
char buffer[MAX_STR_LEN];
unsigned int buffer_len;
cyberiada_init_sm(sm);
/* parse the file and get the DOM */
if ((doc = xmlReadFile(filename, NULL, 0)) == NULL) {
ERROR("error: could not parse file %s\n", filename);
return CYBERIADA_XML_ERROR;
}
/* get the root element node */
root = xmlDocGetRootElement(doc);
if (strcmp(root->name, GRAPHML_GRAPHML_ELEMENT) != 0) {
ERROR("error: could not find GraphML root node %s\n", filename);
return CYBERIADA_XML_ERROR;
}
/* check whether the xml is graphml */
if (cyberiada_check_graphml_ns(root)) {
ERROR("error: no graphml namespace in %s\n", filename);
return CYBERIADA_XML_ERROR;
}
if (format == cybxmlYED) {
res = cyberiada_decode_yed_xml(root, sm);
} else if (format == cybxmlCyberiada) {
res = cyberiada_decode_cyberiada_xml(root, sm);
} else {
ERROR("error: unsupported GraphML format %d of file %s\n",
format, filename);
return CYBERIADA_XML_ERROR;
}
xmlFreeDoc(doc);
xmlCleanupParser();
return res;
}
static int cyberiada_print_node(CyberiadaNode* node, CyberiadaNode* start, int level)
{
CyberiadaNode* cur_node;
char levelspace[16];
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
int i;
memset(levelspace, 0, sizeof(levelspace));
for(i = 0; i < level; i++) {
if (i == 14) break;
levelspace[i] = ' ';
}
printf("%sNode {id: %s, title: \"%s\", type: %d",
levelspace, node->id, node->title, (int)node->type);
if (node == start) {
printf(", S");
}
printf("}\n");
printf("%sGeometry: (%lf, %lf, %lf, %lf)\n",
levelspace,
node->geometry_rect.x,
node->geometry_rect.y,
node->geometry_rect.width,
node->geometry_rect.height);
printf("%sActions:\n", levelspace);
if(node->action) {
printf("%s\"%s\"\n", levelspace, node->action);
}
printf("%sChildren:\n", levelspace);
for (cur_node = node->children; cur_node; cur_node = cur_node->next) {
cyberiada_print_node(cur_node, start, level + 1);
}
return CYBERIADA_NO_ERROR;
}
static int cyberiada_print_edge(CyberiadaEdge* edge)
{
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
CyberiadaPolyline* polyline;
int i;
printf(" Edge %s [%s %s]->[%s %s]\n",
edge->id,
edge->source->id,
edge->source->type == cybNodeInitial ? "INIT" : edge->source->title,
edge->target->id,
edge->target->title == cybNodeInitial ? "INIT" : edge->target->title);
if (edge->geometry_polyline == NULL) {
printf(" Geometry: (%lf, %lf)->(%lf, %lf)\n",
edge->geometry_source_point.x,
edge->geometry_source_point.y,
edge->geometry_target_point.x,
edge->geometry_target_point.y);
} else {
int i;
printf(" Geometry: (\n");
printf(" (%lf, %lf)\n", edge->geometry_source_point.x, edge->geometry_source_point.y);
for (polyline = edge->geometry_polyline; polyline; polyline = polyline->next) {
printf(" (%lf, %lf)\n",
polyline->point.x,
polyline->point.y);
}
printf(" (%lf, %lf)\n", edge->geometry_target_point.x, edge->geometry_target_point.y);
printf(" )\n");
}
if (edge->action) {
printf(" Action:\n %s\n", edge->action);
}
return CYBERIADA_NO_ERROR;
}
int cyberiada_print_sm(CyberiadaSM* sm)
{
char buffer[MAX_STR_LEN];
unsigned int buffer_len = sizeof(buffer) - 1;
CyberiadaNode* cur_node;
CyberiadaEdge* cur_edge;
printf("\nState Machine {name: %s, version: %s}\n", sm->name, sm->version);
printf("Nodes:\n");
for (cur_node = sm->nodes; cur_node; cur_node = cur_node->next) {
cyberiada_print_node(cur_node, sm->start, 0);
}
printf("\n");
printf("Edges:\n");
for (cur_edge = sm->edges; cur_edge; cur_edge = cur_edge->next) {
cyberiada_print_edge(cur_edge);
}
printf("\n");
return CYBERIADA_NO_ERROR;
}

140
cyberiadaml.h Normal file
View File

@@ -0,0 +1,140 @@
/* -----------------------------------------------------------------------------
* The Cyberiada GraphML library implemention
*
* The C library header
*
* Copyright (C) 2024 Alexey Fedoseev <aleksey@fedoseev.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/
* ----------------------------------------------------------------------------- */
#ifndef __CYBERIADA_ML_H
#define __CYBERIADA_ML_H
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
/* -----------------------------------------------------------------------------
* The Cyberiada GraphML library types
* ----------------------------------------------------------------------------- */
/* SM node types: */
typedef enum {
cybNodeInitial = 0, /* initial node */
cybNodeSimple, /* simple node */
cybNodeComplex, /* complex node */
cybNodeComment /* comment node */
} CyberiadaNodeType;
/* SM node geometry */
typedef struct {
double x, y;
} CyberiadaPoint;
typedef struct {
double x, y, width, height;
} CyberiadaRect;
typedef struct _CyberiadaPolyline {
CyberiadaPoint point;
struct _CyberiadaPolyline* next;
} CyberiadaPolyline;
/* SM node (state) */
typedef struct _CyberiadaNode {
char* id;
unsigned int id_len;
char* title;
unsigned int title_len;
CyberiadaNodeType type;
char* action;
unsigned int action_len;
CyberiadaRect geometry_rect;
struct _CyberiadaNode* next;
struct _CyberiadaNode* parent;
struct _CyberiadaNode* children;
} CyberiadaNode;
/* SM edge (transition) */
typedef struct _CyberiadaEdge {
char* id;
unsigned int id_len;
CyberiadaNode* source;
CyberiadaNode* target;
char* action;
unsigned int action_len;
CyberiadaPoint geometry_source_point;
CyberiadaPoint geometry_target_point;
CyberiadaPolyline* geometry_polyline;
struct _CyberiadaEdge* next;
} CyberiadaEdge;
/* SM graph (state machine) */
typedef struct {
char* name;
unsigned int name_len;
char* version;
unsigned int version_len;
CyberiadaNode* nodes;
CyberiadaNode* start;
CyberiadaEdge* edges;
} CyberiadaSM;
/* SM GraphML supported formats */
typedef enum {
cybxmlYED = 0,
cybxmlCyberiada
} CyberiadaXMLFormat;
/* -----------------------------------------------------------------------------
* The Cyberiada GraphML error codes
* ----------------------------------------------------------------------------- */
#define CYBERIADA_NO_ERROR 0
#define CYBERIADA_XML_ERROR 1
#define CYBERIADA_FORMAT_ERROR 2
#define CYBERIADA_NOT_FOUND 3
#define CYBERIADA_BAD_PARAMETER 4
/* -----------------------------------------------------------------------------
* The Cyberiada GraphML library functions
* ----------------------------------------------------------------------------- */
/* Allocate the SM structure in memory (for heap usage) */
CyberiadaSM* cyberiada_create_sm();
/* Initialize the SM structure. Do not use the structure before the initialization! */
int cyberiada_init_sm(CyberiadaSM* sm);
/* Cleanup the content of the SM structure, free the conents memory */
int cyberiada_cleanup_sm(CyberiadaSM* sm);
/* Free the allocated SM structure (for heap usage) */
int cyberiada_destroy_sm(CyberiadaSM* sm);
/* Read an XML file and decode the SM structure */
int cyberiada_read_sm(CyberiadaSM* sm, const char* filename, CyberiadaXMLFormat format);
/* Print the SM structure to stdout */
int cyberiada_print_sm(CyberiadaSM* sm);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">
<data key="gFormat">Cyberiada-GraphML</data>
<key id="dName" for="node" attr.name="name" attr.type="string"/>
<key id="dData" for="edge" attr.name="data" attr.type="string"/>
<key id="dData" for="node" attr.name="data" attr.type="string"/>
<key id="dInitial" for="node" attr.name="initial" attr.type="string"/>
<key id="dGeometry" for="edge"/>
<key id="dGeometry" for="node"/>
<graph id="G" edgedefault="directed">
<node id="">
<data key="dName">BearlogaDefend</data>
<data key="dData">name/ Автобортник
author/ Матросов В.М.
contact/ matrosov@mail.ru
description/ Пример описания схемы,
который может быть многострочным, потому что так удобнее
unit/ Autoborder
</data>
</node>
<node id="n0">
<data key="dName">Бой</data>
<data key="dData">entry/
exit/
</data>
<data key="dGeometry" x="-578.005" y="438.187256"
width="672.532166" height="802.962646" />
<graph>
<node id="n0::n1">
<data key="dName">Сближение</data>
<data key="dData">entry/
МодульДвижения.ДвигатьсяКЦели()
exit/
</data>
<data key="dGeometry" x="-525.738953" y="609.6686"
width="468" height="170" />
</node>
<node id="n0::n2">
<data key="dName">Атака</data>
<data key="dData">entry/
ОружиеЦелевое.АтаковатьЦель()
exit/
</data>
<data key="dGeometry" x="-630.2711" y="206.705933"
width="468" height="170" />
</node>
</graph>
</node>
<node id="n3">
<data key="dName">Скан</data>
<data key="dData">entry/
Сенсор.ПоискВрагаПоДистанции(мин)
exit/
Сенсор.ОстановкаПоиска()
</data>
<data key="dGeometry" x="-1582.03857" y="606.497559"
width="468" height="330" />
</node>
<node id="init">
<data key="dInitial"></data>
<data key="dGeometry" x="-1482.03857" y="606.497559"
width="20" height="20" />
</node>
<edge source="init" target="n3"> </edge>
<edge source="n0" target="n3">
<data key="dData">АнализаторЦели.ЦельУничтожена/
</data>
</edge>
<edge source="n0" target="n3">
<data key="dData">АнализаторЦели.ЦельПотеряна/
</data>
</edge>
<edge source="n3" target="n0::n1">
<data key="dData">Сенсор.ЦельПолучена/
</data>
</edge>
<edge source="n0::n1" target="n0::n2">
<data key="dData">ОружиеЦелевое.ЦельВошлаВЗонуАтаки/
</data>
</edge>
<edge source="n0::n2" target="n0::n1">
<data key="dData">ОружиеЦелевое.ЦельВышлаИзЗоныАтаки/
</data>
</edge>
</graph>
</graphml>

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">
<data key="gFormat">Cyberiada-GraphML</data>
<key id="dName" for="node" attr.name="name" attr.type="string"/>
<key id="dData" for="edge" attr.name="data" attr.type="string"/>
<key id="dData" for="node" attr.name="data" attr.type="string"/>
<key id="dInitial" for="node" attr.name="initial" attr.type="string"/>
<key id="dGeometry" for="edge"/>
<key id="dGeometry" for="node"/>
<key id="dColor" for="edge"/>
<graph id="G" edgedefault="directed">
<node id="">
<data key="dName">ArduinoUno</data>
<data key="dData">name/ Arduino-Blinker
description/ Включение и выключение лампочки по таймеру
</data>
</node>
<node id="init">
<data key="dInitial"></data>
<data key="dGeometry" x="311" y="-94"></data>
</node>
<node id="LED1">
<data key="dName">LED1</data>
<data key="dData">type/ LED
name/ Светодиод
description/ Встроенный в плату светодиод, чтобы им мигать
pin/ 12
</data>
</node>
<node id="timer1">
<data key="dName">timer1</data>
<data key="dData">type/ Timer
name/ Светодиод
description/ Программный таймер.
</data>
</node>
<node id="diod1">
<data key="dName">Включен</data>
<data key="dData">entry/
LED1.on()
timer1.start(1000)
</data>
<data key="dGeometry" x="82" y="57"
width="450.0" height="95" />
</node>
<node id="diod2">
<data key="dName">Выключен</data>
<data key="dData">entry/
LED1.off()
timer1.start(1000)
</data>
<data key="dGeometry" x="81" y="334"
width="450" height="95" />
</node>
<edge source="" target="LED1"></edge>
<edge source="" target="timer1"></edge>
<edge source="init" target="diod1"></edge>
<edge source="diod1" target="diod2">
<data key="dData">timer1.timeout/</data>
<data key="dColor">#F29727</data>
<data key="dGeometry" x="457" y="173"/>
</edge>
<edge source="diod2" target="diod1">
<data key="dData">timer1.timeout/</data>
<data key="dGeometry" x="16" y="175"/>
<data key="dColor">#F24C3D</data>
</edge>
</graph>
</graphml>

View File

@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" yed:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd" SchemeName="Автобортник" entryPosition="-1573,862 1002,069">
<key attr.name="Description" attr.type="string" for="graph" id="d0" />
<key for="port" id="d1" yfiles.type="portgraphics" />
<key for="port" id="d2" yfiles.type="portgeometry" />
<key for="port" id="d3" yfiles.type="portuserdata" />
<key attr.name="url" attr.type="string" for="node" id="d4" />
<key attr.name="description" attr.type="string" for="node" id="d5" />
<key for="node" id="d6" yfiles.type="nodegraphics" />
<key for="graphml" id="d7" yfiles.type="resources" />
<key attr.name="url" attr.type="string" for="edge" id="d8" />
<key attr.name="description" attr.type="string" for="edge" id="d9" />
<key for="edge" id="d10" yfiles.type="edgegraphics" />
<graph edgedefault="directed" id="G">
<data key="d0" xml:space="preserve" />
<node id="">
<data key="d6">
<y:GenericNode configuration="com.yworks.bpmn.Event.withShadow">
<y:Geometry x="-1628" y="748" width="10" height="10" />
<y:Fill color="#333333" color2="#000000" transparent="false" />
<y:BorderStyle color="#000000" type="line" width="1.0" />
<y:NodeLabel />
</y:GenericNode>
</data>
</node>
<node id="n0" yfiles.foldertype="group">
<data key="d4" xml:space="preserve" />
<data key="d6">
<y:ProxyAutoBoundsNode>
<y:Realizers active="0">
<y:GroupNode>
<y:Geometry x="-786" y="492" width="517" height="770" />
<y:Fill color="#F5F5F5" transparent="false" />
<y:BorderStyle color="#000000" type="line" width="1.0" />
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="bold" hasLineColor="false" height="22" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="517" x="0" xml:space="preserve" y="0">Бой</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="node_size" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="770" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="517" x="0" xml:space="preserve" y="0">entry/
exit/
</y:NodeLabel>
<y:Shape type="roundrectangle" />
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false" />
<y:NodeBounds considerNodeLabelSize="true" />
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0" />
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0" />
</y:GroupNode>
</y:Realizers>
</y:ProxyAutoBoundsNode>
</data>
<graph edgedefault="directed" id="n0:">
<node id="n0::n1">
<data key="d6">
<y:GenericNode>
<y:Geometry x="-788" y="645" width="413" height="208" />
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false" />
<y:BorderStyle color="#000000" type="line" width="1.0" />
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="15" fontStyle="bold" hasLineColor="false" height="22" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="413" x="0" xml:space="preserve" y="0">Сближение</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.name" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="208" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="413" x="0" xml:space="preserve" y="0">entry/
МодульДвижения.ДвигатьсяКЦели()
exit/
</y:NodeLabel>
</y:GenericNode>
</data>
</node>
<node id="n0::n2">
<data key="d6">
<y:GenericNode>
<y:Geometry x="-784" y="311" width="413" height="208" />
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false" />
<y:BorderStyle color="#000000" type="line" width="1.0" />
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="15" fontStyle="bold" hasLineColor="false" height="22" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="413" x="0" xml:space="preserve" y="0">Атака</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.name" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="208" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="413" x="0" xml:space="preserve" y="0">entry/
ОружиеЦелевое.АтаковатьЦель()
exit/
</y:NodeLabel>
</y:GenericNode>
</data>
</node>
</graph>
</node>
<node id="n3">
<data key="d6">
<y:GenericNode>
<y:Geometry x="-1573" y="738" width="413" height="288" />
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false" />
<y:BorderStyle color="#000000" type="line" width="1.0" />
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="15" fontStyle="bold" hasLineColor="false" height="22" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="413" x="0" xml:space="preserve" y="0">Скан</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.name" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="288" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="413" x="0" xml:space="preserve" y="0">entry/
Сенсор.ПоискВрагаПоДистанции(мин)
exit/
Сенсор.ОстановкаПоиска()
</y:NodeLabel>
</y:GenericNode>
</data>
</node>
<edge source="n0" target="n3">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">АнализаторЦели.ЦельПотеряна/
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="n0" target="n3">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">АнализаторЦели.ЦельУничтожена/
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="n3" target="n0::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">Сенсор.ЦельПолучена/
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="n0::n1" target="n0::n2">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">ОружиеЦелевое.ЦельВошлаВЗонуАтаки/
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="n0::n2" target="n0::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">ОружиеЦелевое.ЦельВышлаИзЗоныАтаки/
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="" target="n3">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="false" xml:space="preserve">
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" />
</y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
</graph>
</graphml>

View File

@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" yed:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd" SchemeName="Степлер" entryPosition="-1012,038 514,2684">
<key attr.name="Description" attr.type="string" for="graph" id="d0" />
<key for="port" id="d1" yfiles.type="portgraphics" />
<key for="port" id="d2" yfiles.type="portgeometry" />
<key for="port" id="d3" yfiles.type="portuserdata" />
<key attr.name="url" attr.type="string" for="node" id="d4" />
<key attr.name="description" attr.type="string" for="node" id="d5" />
<key for="node" id="d6" yfiles.type="nodegraphics" />
<key for="graphml" id="d7" yfiles.type="resources" />
<key attr.name="url" attr.type="string" for="edge" id="d8" />
<key attr.name="description" attr.type="string" for="edge" id="d9" />
<key for="edge" id="d10" yfiles.type="edgegraphics" />
<graph edgedefault="directed" id="G">
<data key="d0" xml:space="preserve" />
<node id="">
<data key="d6">
<y:GenericNode configuration="com.yworks.bpmn.Event.withShadow">
<y:Geometry x="-1067" y="260" width="10" height="10" />
<y:Fill color="#333333" color2="#000000" transparent="false" />
<y:BorderStyle color="#000000" type="line" width="1.0" />
<y:NodeLabel />
</y:GenericNode>
</data>
</node>
<node id="n0" yfiles.foldertype="group">
<data key="d4" xml:space="preserve" />
<data key="d6">
<y:ProxyAutoBoundsNode>
<y:Realizers active="0">
<y:GroupNode>
<y:Geometry x="-175" y="-89" width="691" height="931" />
<y:Fill color="#F5F5F5" transparent="false" />
<y:BorderStyle color="#000000" type="line" width="1.0" />
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="bold" hasLineColor="false" height="22" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="691" x="0" xml:space="preserve" y="0">Бой</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="node_size" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="931" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="691" x="0" xml:space="preserve" y="0">entry/
exit/
</y:NodeLabel>
<y:Shape type="roundrectangle" />
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false" />
<y:NodeBounds considerNodeLabelSize="true" />
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0" />
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0" />
</y:GroupNode>
</y:Realizers>
</y:ProxyAutoBoundsNode>
</data>
<graph edgedefault="directed" id="n0:">
<node id="n0::n1">
<data key="d6">
<y:GenericNode>
<y:Geometry x="-86" y="144" width="413" height="208" />
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false" />
<y:BorderStyle color="#000000" type="line" width="1.0" />
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="15" fontStyle="bold" hasLineColor="false" height="22" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="413" x="0" xml:space="preserve" y="0">Сближение</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.name" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="208" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="413" x="0" xml:space="preserve" y="0">entry/
МодульДвижения.ДвигатьсяКЦели()
exit/
</y:NodeLabel>
</y:GenericNode>
</data>
</node>
<node id="n0::n2">
<data key="d6">
<y:GenericNode>
<y:Geometry x="-175" y="-351" width="590" height="208" />
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false" />
<y:BorderStyle color="#000000" type="line" width="1.0" />
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="15" fontStyle="bold" hasLineColor="false" height="22" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="590" x="0" xml:space="preserve" y="0">Атака</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.name" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="208" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="590" x="0" xml:space="preserve" y="0">entry/
ОружиеЦелевое.АтаковатьЦель()
МодульДвижения.Стоп()
exit/
</y:NodeLabel>
</y:GenericNode>
</data>
</node>
</graph>
</node>
<node id="n3">
<data key="d6">
<y:GenericNode>
<y:Geometry x="-1012" y="250" width="413" height="288" />
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false" />
<y:BorderStyle color="#000000" type="line" width="1.0" />
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="15" fontStyle="bold" hasLineColor="false" height="22" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="413" x="0" xml:space="preserve" y="0">Скан</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.name" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="288" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="413" x="0" xml:space="preserve" y="0">entry/
Сенсор.ПоискВрагаПоДистанции(мин)
exit/
Сенсор.ОстановкаПоиска()
</y:NodeLabel>
</y:GenericNode>
</data>
</node>
<edge source="n0" target="n3">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">АнализаторЦели.ЦельПотеряна/
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="n0" target="n3">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">АнализаторЦели.ЦельУничтожена/
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="n3" target="n0::n2">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">Сенсор.ЦельПолучена/
[ОружиеЦелевое.ЦельВЗонеАтаки == 1]
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="n3" target="n0::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">Сенсор.ЦельПолучена/
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="n0::n1" target="n0::n2">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">ОружиеЦелевое.ЦельВошлаВЗонуАтаки/
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="n0::n2" target="n0::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="true" xml:space="preserve">ОружиеЦелевое.ЦельВышлаИзЗоныАтаки/
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" /></y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
<edge source="" target="n3">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0" sy="0" tx="0" ty="0" />
<y:LineStyle color="#000000" type="line" width="1.0" />
<y:Arrows source="none" target="standard" />
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="5.0" textColor="#000000" verticalTextPosition="bottom" visible="false" xml:space="preserve">
<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow" />
</y:EdgeLabel>
</y:PolyLineEdge>
</data>
</edge>
</graph>
</graphml>

View File

@@ -0,0 +1,588 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
<!--Created by yEd 3.22-->
<key attr.name="Description" attr.type="string" for="graph" id="d0"/>
<key for="port" id="d1" yfiles.type="portgraphics"/>
<key for="port" id="d2" yfiles.type="portgeometry"/>
<key for="port" id="d3" yfiles.type="portuserdata"/>
<key attr.name="url" attr.type="string" for="node" id="d4"/>
<key attr.name="description" attr.type="string" for="node" id="d5"/>
<key for="node" id="d6" yfiles.type="nodegraphics"/>
<key for="graphml" id="d7" yfiles.type="resources"/>
<key attr.name="url" attr.type="string" for="edge" id="d8"/>
<key attr.name="description" attr.type="string" for="edge" id="d9"/>
<key for="edge" id="d10" yfiles.type="edgegraphics"/>
<graph edgedefault="directed" id="G">
<data key="d0" xml:space="preserve"/>
<node id="n0" yfiles.foldertype="group">
<data key="d6">
<y:ProxyAutoBoundsNode>
<y:Realizers active="0">
<y:GroupNode>
<y:Geometry height="725.3842622366843" width="1149.4752403124412" x="409.9045651123043" y="50.595300857790946"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="1149.4752403124412" x="0.0" xml:space="preserve" y="0.0">orientation</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="node_size" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="725.3842622366843" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="tr" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="1149.4752403124412" x="-4.0" xml:space="preserve" y="4.0">
entry/</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
<y:BorderInsets bottom="13" bottomF="13.379942942133312" left="17" leftF="16.55746774366395" right="10" rightF="9.570776255707642" top="7" topF="6.657305253647749"/>
</y:GroupNode>
<y:GroupNode>
<y:Geometry height="50.0" width="89.0" x="647.4531034482759" y="-202.83523673221987"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="89.0" x="0.0" xml:space="preserve" y="0.0">get_shot</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="true" closedHeight="50.0" closedWidth="89.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
</y:GroupNode>
</y:Realizers>
</y:ProxyAutoBoundsNode>
</data>
<graph edgedefault="directed" id="n0:">
<node id="n0::n0" yfiles.foldertype="group">
<data key="d6">
<y:ProxyAutoBoundsNode>
<y:Realizers active="0">
<y:GroupNode>
<y:Geometry height="506.21265704722373" width="297.494718399637" x="445.46203285596823" y="97.71354361143867"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="297.494718399637" x="0.0" xml:space="preserve" y="0.0">turn</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="node_size" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="506.21265704722373" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="br" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="297.494718399637" x="-4.0" xml:space="preserve" y="-4.0">
entry/
orientation.start_motor(AXIS_Z)
exit/
orientation.stop_motor(AXIS_Z)</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
<y:BorderInsets bottom="13" bottomF="13.399086757990858" left="0" leftF="0.0" right="0" rightF="0.0" top="105" topF="105.27853881278551"/>
</y:GroupNode>
<y:GroupNode>
<y:Geometry height="50.0" width="89.0" x="647.4531034482759" y="-202.83523673221987"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="89.0" x="0.0" xml:space="preserve" y="0.0">get_shot</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="true" closedHeight="50.0" closedWidth="89.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
</y:GroupNode>
</y:Realizers>
</y:ProxyAutoBoundsNode>
</data>
<graph edgedefault="directed" id="n0::n0:">
<node id="n0::n0::n0">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="69.21185172122063" width="267.494718399637" x="460.4620328559683" y="286.4530199242241"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="267.494718399637" x="0.0" xml:space="preserve" y="4.0">slow_down</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="59.875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="97.134765625" x="4.0" xml:space="preserve" y="4.0">
entry/
reduce_speed()</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n0::n0::n1">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="69.21185172122068" width="267.494718399637" x="460.4620328559683" y="396.3841410518375"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="267.494718399637" x="0.0" xml:space="preserve" y="4.0">start_turn</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="59.875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="98.4765625" x="4.0" xml:space="preserve" y="4.0">
entry/
calculate_turn()</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n0::n0::n2">
<data key="d6">
<y:GenericNode configuration="com.yworks.bpmn.Event">
<y:Geometry height="17.0" width="8.83984375" x="589.7894701807868" y="239.45301992422418"/>
<y:Fill color="#333333" color2="#000000" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="12.83984375" y="4.333333333333343">
<y:LabelModel>
<y:SmartNodeLabelModel distance="4.0"/>
</y:LabelModel>
<y:ModelParameter>
<y:SmartNodeLabelModelParameter labelRatioX="-0.5" labelRatioY="-0.5" nodeRatioX="0.5" nodeRatioY="-0.24509803921568613" offsetX="4.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
</y:ModelParameter>
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.line.color" value="#000000"/>
<y:Property class="com.yworks.yfiles.bpmn.view.EventCharEnum" name="com.yworks.bpmn.characteristic" value="EVENT_CHARACTERISTIC_START"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill2" value="#d4d4d4cc"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill" value="#ffffffe6"/>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="EVENT_TYPE_PLAIN"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n0::n0::n3">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="69.21185172122068" width="267.494718399637" x="460.46203285596823" y="506.3152621794508"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="267.494718399637" x="0.0" xml:space="preserve" y="4.000000000000057">finish_turn</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="59.875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="100.263671875" x="4.0" xml:space="preserve" y="4.000000000000057">
entry/
complete_turn()</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
</graph>
</node>
<node id="n0::n1">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="117.95245407947306" width="313.21683037237307" x="766.1680201290268" y="103.96248223336107"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="313.21683037237307" x="0.0" xml:space="preserve" y="4.0">idle</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="45.90625" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="39.771484375" x="4.0" xml:space="preserve" y="4.0">
entry/
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n0::n2" yfiles.foldertype="group">
<data key="d6">
<y:ProxyAutoBoundsNode>
<y:Realizers active="0">
<y:GroupNode>
<y:Geometry height="640.6628002976208" width="432.21290979421633" x="1102.5961193748215" y="106.93681985472102"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="432.21290979421633" x="0.0" xml:space="preserve" y="0.0"> wait</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="node_size" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="640.6628002976208" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="br" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="432.21290979421633" x="-4.0" xml:space="preserve" y="-4.0">
entry/
</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
<y:BorderInsets bottom="12" bottomF="11.781924910944781" left="0" leftF="0.0" right="4" rightF="3.5016189987190955" top="11" topF="11.040951918376578"/>
</y:GroupNode>
<y:GroupNode>
<y:Geometry height="50.0" width="89.0" x="647.4531034482759" y="-202.83523673221987"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="89.0" x="0.0" xml:space="preserve" y="0.0">get_shot</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="true" closedHeight="50.0" closedWidth="89.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
</y:GroupNode>
</y:Realizers>
</y:ProxyAutoBoundsNode>
</data>
<graph edgedefault="directed" id="n0::n2:">
<node id="n0::n2::n0" yfiles.foldertype="group">
<data key="d6">
<y:ProxyAutoBoundsNode>
<y:Realizers active="0">
<y:GroupNode>
<y:Geometry height="400.0737264670697" width="393.60012474356904" x="1121.5961193748215" y="320.7439687743274"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="393.60012474356904" x="0.0" xml:space="preserve" y="0.0">maintain</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="node_size" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="400.0737264670697" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="br" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="393.60012474356904" x="-4.0" xml:space="preserve" y="-4.0">
entry/
orientation.start_motor(AXIS_Z)
exit/
orientation.stop_motor(AXIS_Z)</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
<y:BorderInsets bottom="6" bottomF="6.317196313421391" left="4" leftF="3.75365630476972" right="2" rightF="1.5313242009133319" top="75" topF="75.03254994929318"/>
</y:GroupNode>
<y:GroupNode>
<y:Geometry height="50.0" width="89.0" x="647.4531034482759" y="-202.83523673221987"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="89.0" x="0.0" xml:space="preserve" y="0.0">get_shot</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="true" closedHeight="50.0" closedWidth="89.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
</y:GroupNode>
</y:Realizers>
</y:ProxyAutoBoundsNode>
</data>
<graph edgedefault="directed" id="n0::n2::n0:">
<node id="n0::n2::n0::n0">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="75.33714852487361" width="358.3151442378855" x="1140.3497756795916" y="479.23745622362065"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="358.3151442378855" x="0.0" xml:space="preserve" y="4.0">correct_cw</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="59.875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="263.705078125" x="4.0" xml:space="preserve" y="4.000000000000057">
entry/
orientation.set_motor_moment(AXIS_Z, -M)</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n0::n2::n0::n1">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="75.33714852487361" width="358.3151442378855" x="1140.3497756795912" y="624.1633504031022"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="358.3151442378855" x="0.0" xml:space="preserve" y="4.0">correct_ccw</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="59.875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="259.375" x="4.0" xml:space="preserve" y="4.0">
entry/
orientation.set_motor_moment(AXIS_Z, M)</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n0::n2::n0::n2">
<data key="d6">
<y:GenericNode configuration="com.yworks.bpmn.Event">
<y:Geometry height="8.230320699708443" width="31.376914946017564" x="1303.8188903255257" y="432.2374562236206"/>
<y:Fill color="#333333" color2="#000000" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="35.37691494601768" y="2.0979248842394327">
<y:LabelModel>
<y:SmartNodeLabelModel distance="4.0"/>
</y:LabelModel>
<y:ModelParameter>
<y:SmartNodeLabelModelParameter labelRatioX="-0.5" labelRatioY="-0.5" nodeRatioX="0.5" nodeRatioY="-0.24509803921568613" offsetX="4.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
</y:ModelParameter>
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.line.color" value="#000000"/>
<y:Property class="com.yworks.yfiles.bpmn.view.EventCharEnum" name="com.yworks.bpmn.characteristic" value="EVENT_CHARACTERISTIC_START"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill2" value="#d4d4d4cc"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill" value="#ffffffe6"/>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="EVENT_TYPE_PLAIN"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
</graph>
</node>
<node id="n0::n2::n1">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="75.33714852487361" width="393.6001247435691" x="1122.7072854267496" y="201.4387092730976"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="393.6001247435691" x="0.0" xml:space="preserve" y="4.0">static</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="45.90625" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="39.771484375" x="4.0" xml:space="preserve" y="4.0">
entry/</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n0::n2::n2">
<data key="d6">
<y:GenericNode configuration="com.yworks.bpmn.Event">
<y:Geometry height="8.230320699708443" width="31.376914946017564" x="1303.8188903255254" y="154.4387092730976"/>
<y:Fill color="#333333" color2="#000000" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="35.37691494601768" y="2.0979248842394043">
<y:LabelModel>
<y:SmartNodeLabelModel distance="4.0"/>
</y:LabelModel>
<y:ModelParameter>
<y:SmartNodeLabelModelParameter labelRatioX="-0.5" labelRatioY="-0.5" nodeRatioX="0.5" nodeRatioY="-0.24509803921568613" offsetX="4.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
</y:ModelParameter>
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.line.color" value="#000000"/>
<y:Property class="com.yworks.yfiles.bpmn.view.EventCharEnum" name="com.yworks.bpmn.characteristic" value="EVENT_CHARACTERISTIC_START"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill2" value="#d4d4d4cc"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill" value="#ffffffe6"/>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="EVENT_TYPE_PLAIN"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
</graph>
</node>
</graph>
</node>
<node id="n1">
<data key="d6">
<y:GenericNode configuration="com.yworks.bpmn.Event">
<y:Geometry height="17.0" width="8.83984375" x="941.3644224011249" y="-33.90241603718603"/>
<y:Fill color="#333333" color2="#000000" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="12.83984375" y="4.333333333333336">
<y:LabelModel>
<y:SmartNodeLabelModel distance="4.0"/>
</y:LabelModel>
<y:ModelParameter>
<y:SmartNodeLabelModelParameter labelRatioX="-0.5" labelRatioY="-0.5" nodeRatioX="0.5" nodeRatioY="-0.24509803921568613" offsetX="4.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
</y:ModelParameter>
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.line.color" value="#000000"/>
<y:Property class="com.yworks.yfiles.bpmn.view.EventCharEnum" name="com.yworks.bpmn.characteristic" value="EVENT_CHARACTERISTIC_START"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill2" value="#d4d4d4cc"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill" value="#ffffffe6"/>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="EVENT_TYPE_PLAIN"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n2">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:UMLNoteNode>
<y:Geometry height="95.04560645259676" width="160.08441028104863" x="445.46203285596823" y="652.5540136997452"/>
<y:Fill color="#FFCC00" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="left" autoSizePolicy="content" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="75.875" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="t" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="151.572265625" x="4.256072328024288" xml:space="preserve" y="4.0">Init scripts:
test3sm_constants.py
test3sm_orient.py</y:NodeLabel>
</y:UMLNoteNode>
</data>
</node>
<edge id="e0" source="n1" target="n0::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="23.00790896091155" ty="-7.047745352111548"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="e1" source="n0" target="n0::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="-157.87181814523683" sy="-122.80905699738382" tx="-4.118959516125983" ty="-7.297270290007049">
<y:Point x="826.770367123288" y="-4.9513868019391225"/>
<y:Point x="918.6574757990874" y="-4.9513868019391225"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="35.62890625" x="-50.90453084892238" xml:space="preserve" y="-43.77661474941784">STOP<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="33.09005910502287" distanceToCenter="true" position="left" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::e0" source="n0::n1" target="n0::n0">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="95.23204604496436" sy="21.02917232091835" tx="129.20784467038118" ty="23.561826495086848">
<y:Point x="1018.0084813601777" y="374.3816986301374"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="31.9375" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="238.861328125" x="-248.97679143659298" xml:space="preserve" y="112.88070634823896">TANGENT(target_a) /
update_turn_parameters(target_a, 0.0)<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="23.58386276529688" distanceToCenter="true" position="right" ratio="0.8600797235850546" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::e1" source="n0::n1" target="n0::n0">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="113.64346807762149" sy="25.929409763840738" tx="148.77410037814377" ty="117.96722332279865">
<y:Point x="1036.4199033928348" y="468.7870954578492"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="31.9375" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="254.130859375" x="-263.4272210589752" xml:space="preserve" y="205.21680871258775">BACK(target_a) /
update_turn_parameters(target_a, 180.0)<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="25.691227907370774" distanceToCenter="true" position="right" ratio="0.8448804036363177" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::n0::e0" source="n0::n0::n2" target="n0::n0::n0">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::n0::e1" source="n0::n0::n0" target="n0::n0::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="86.39453125" x="1.5749479275011709" xml:space="preserve" y="11.3861701670005">[completed()]<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="44.77223311780813" distanceToCenter="true" position="left" ratio="0.5000000000000022" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::n0::e2" source="n0::n0::n1" target="n0::n0::n3">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="86.39453125" x="5.91246478010396" xml:space="preserve" y="11.386169468442006">[completed()]<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="49.10974997041092" distanceToCenter="true" position="left" ratio="0.5" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::e2" source="n0::n2" target="n0::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="-216.09354057786163" sy="98.8431288457129" tx="128.21976031506392" ty="13.393254819548332">
<y:Point x="1050.9961956302773" y="526.1113488492443"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="45.90625" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="231.630859375" x="-237.11585723043345" xml:space="preserve" y="17.656166371763447">TIME_TICK [orientation_completed()] /
DISPATCH(cpu, 'ORIENTED')
DISPATCH(navigation, 'ORIENTED')<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="69.71276086852323" distanceToCenter="true" position="left" ratio="-40.60927064751911" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::n2::n0::e0" source="n0::n2::n0::n0" target="n0::n2::n0::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="-154.388989495136" sy="1.8103811435131574" tx="-154.3889894951362" ty="5.481529825815554"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="297.185546875" x="11.403486988376017" xml:space="preserve" y="9.562100644783186">[orientation.get_angular_velocity(AXIS_Z) &lt; DW]<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="159.99631032560305" distanceToCenter="true" position="left" ratio="0.11012598847800568" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::n2::n0::e1" source="n0::n2::n0::n1" target="n0::n2::n0::n0">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="163.3004073978625" sy="-10.020716769587466" tx="163.30040739786233" ty="1.0930127555159288"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="297.185546875" x="-299.02950504084106" xml:space="preserve" y="-26.17719383487315">[orientation.get_angular_velocity(AXIS_Z) &gt; DW]<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="150.4367475419249" distanceToCenter="true" position="left" ratio="0.07763648751784133" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::n2::n0::e2" source="n0::n2::n0::n2" target="n0::n2::n0::n0">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::n2::e0" source="n0::n2::n2" target="n0::n2::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::e3" source="n0::n0::n3" target="n0::n2">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="71.4174301016476" sy="14.49499271795628" tx="-17.616568441025947" ty="284.0153076932616">
<y:Point x="665.6268221574344" y="711.283527696793"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="86.39453125" x="17.58260885967104" xml:space="preserve" y="96.75264390773054">[completed()]<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="left" ratio="0.1563381067639392" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::n2::e1" source="n0::n2::n0" target="n0::n2::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="138.10772495893343" sy="-80.28581743060283" tx="136.99655890700524" ty="11.085690225398537"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="98.44140625" x="-100.93222462864446" xml:space="preserve" y="-30.99088017088195">[is_target_dw()]<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="51.71152195918398" distanceToCenter="true" position="left" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n0::n2::e2" source="n0::n2::n1" target="n0::n2::n0">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="-136.09125450407396" sy="13.45350363647728" tx="-134.98008845214576" ty="-169.29806232856197"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="121.908203125" x="9.669483191166364" xml:space="preserve" y="13.809601800578434">[not is_target_dw()]<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="70.62362915451867" distanceToCenter="true" position="left" ratio="0.5496277473876174" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
</graph>
<data key="d7">
<y:Resources/>
</data>
</graphml>

View File

@@ -0,0 +1,899 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
<!--Created by yEd 3.18.2-->
<key attr.name="Description" attr.type="string" for="graph" id="d0"/>
<key for="port" id="d1" yfiles.type="portgraphics"/>
<key for="port" id="d2" yfiles.type="portgeometry"/>
<key for="port" id="d3" yfiles.type="portuserdata"/>
<key attr.name="url" attr.type="string" for="node" id="d4"/>
<key attr.name="description" attr.type="string" for="node" id="d5"/>
<key for="node" id="d6" yfiles.type="nodegraphics"/>
<key for="graphml" id="d7" yfiles.type="resources"/>
<key attr.name="url" attr.type="string" for="edge" id="d8"/>
<key attr.name="description" attr.type="string" for="edge" id="d9"/>
<key for="edge" id="d10" yfiles.type="edgegraphics"/>
<graph edgedefault="directed" id="G">
<data key="d0" xml:space="preserve"/>
<node id="n0">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:UMLNoteNode>
<y:Geometry height="100.0" width="294.5812615050841" x="-863.5186423143789" y="-272.9353236126077"/>
<y:Fill color="#FFCC00" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="64.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="281.1015625" x="4.0" xml:space="preserve" y="4.0">State fields (do not delete this caption):
unsigned int CharHP;
QStateHandler StartState;
unsigned int TimerAgony;</y:NodeLabel>
</y:UMLNoteNode>
</data>
</node>
<node id="n1">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:UMLNoteNode>
<y:Geometry height="345.5578800105054" width="294.5812615050841" x="-863.5186423143789" y="282.4018972252154"/>
<y:Fill color="#FFCC00" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="292.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="307.4921875" x="4.0" xml:space="preserve" y="4.0">Code for h-file: (do not delete this caption):
#define HEALTHY 1
#define AGONY 2
#define DEAD 0
#define GHOUL_GOOD 3
#define GHOUL_WOUNDED 4
#define GHOUL_HEALING 5
#define BLESSED 6
#define FLASH_MS 200
#define FLASH_SEC 1010
#define FLASH_1M 60100
#define TIMEOUT_AGONY_S 600
#define TIMEOUT_DEATH_S 15
#define TIMEOUT_RADX_S 900
#define LONG_BEEP_MS 15000
#define MEDIUM_BEEP_MS 3000
#define SHORT_BEEP_MS 500
#define RED 255
#define RED_MEDIUM 127
#define GREEN_MEDIUM 127
#define BLUE_MEDIUM 127
#define DEFAULT_HP 27000
#define GHOUL_HP (DEFAULT_HP/3)</y:NodeLabel>
</y:UMLNoteNode>
</data>
</node>
<node id="n2">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:UMLNoteNode>
<y:Geometry height="100.0" width="293.6575525707892" x="-862.5949333800841" y="10.622823612607704"/>
<y:Fill color="#FFCC00" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="52.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="320.6875" x="4.0" xml:space="preserve" y="4.0">Constructor fields (do not delete this caption):
unsigned int HP;
unsigned int State;
unsigned int TimerAgony;
</y:NodeLabel>
</y:UMLNoteNode>
</data>
</node>
<node id="n3">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:UMLNoteNode>
<y:Geometry height="537.9258620689657" width="516.4898821947393" x="846.0579910309465" y="114.12097856140628"/>
<y:Fill color="#FFCC00" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="520.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="459.23828125" x="4.0" xml:space="preserve" y="4.0">Constructor code: (do not delete this caption):
me-&gt;CharHP = HP;
me-&gt;TimerAgony = TimerAgony;
switch (State) {
case HEALTHY: {
me-&gt;StartState =
(QStateHandler)&amp;OregonPlayer_healthy;
break;
}
case AGONY: {
me-&gt;StartState =
(QStateHandler)&amp; OregonPlayer_agony;
break;
}
case DEAD: {
me-&gt;StartState =
(QStateHandler)&amp; OregonPlayer_dead;
break;
}
case GHOUL_GOOD: {
me-&gt;StartState =
(QStateHandler)&amp; OregonPlayer_ghoul_good;
break;
}
case GHOUL_WOUNDED: {
me-&gt;StartState =
(QStateHandler)&amp; OregonPlayer_wounded;
break;
}
case GHOUL_HEALING: {
me-&gt;StartState =
(QStateHandler)&amp; OregonPlayer_ghoul_healing;
break;
}
case BLESSED: {
me-&gt;StartState =
(QStateHandler)&amp; OregonPlayer_blessed;
break;
}
default:
me-&gt;StartState =(QStateHandler)&amp; OregonPlayer_healthy;
}
</y:NodeLabel>
</y:UMLNoteNode>
</data>
</node>
<node id="n4">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:UMLNoteNode>
<y:Geometry height="453.7197957472877" width="554.6107145205119" x="839.167994400236" y="-369.59881718588144"/>
<y:Fill color="#FFCC00" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="445.03515625" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="530.8515625" x="4.0" xml:space="preserve" y="4.342319748643831">Comments:
void ShowCurrentHealth (OregonPlayer* me) {
Flash(255 - me-&gt;CharHP*255/DEFAULT_HP, me&gt;CharHP*255/DEFAULT_HP, 0, FLASH_MS);
}
void ShowCurrentHealthGhoul (OregonPlayer* me) {
Flash(255 - me-&gt;CharHP*255/DEFAULT_HP, me&gt;CharHP*255/DEFAULT_HP, 0, FLASH_MS);
}
void UpdateHP(OregonPlayer* me, unsigned int NewHP) {
if (NewHP &lt;= DEFAULT_HP) {
me-&gt;CharHP = NewHP;;
} else {
me-&gt;CharHP = DEFAULT_HP
SaveHP(me-&gt;CharHP);
}
void Reset(OregonPlayer* me) {
UpdateHP(me, DEFAULT_HP);
me-&gt;TimerDeath = 0;
UpdateTimerAgony(0);
return Q_TRAN(healthy);
}
void UpdateTimerAgony(PlayerOregon* me, unsigned int Timer) {
me-&gt;TimerAgony = Timer;
SaveTimerAgony(Timer);
}</y:NodeLabel>
</y:UMLNoteNode>
</data>
</node>
<node id="n5" yfiles.foldertype="group">
<data key="d6">
<y:ProxyAutoBoundsNode>
<y:Realizers active="0">
<y:GroupNode>
<y:Geometry height="960.246525456085" width="1379.0711278544618" x="-558.2255859375" y="-369.59881718588144"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="19.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="1379.0711278544618" x="0.0" xml:space="preserve" y="0.0">active</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="node_size" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="960.246525456085" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="1379.0711278544618" x="0.0" xml:space="preserve" y="4.0">
entry/
</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
<y:BorderInsets bottom="4" bottomF="3.775461510203968" left="25" leftF="24.7880859375" right="15" rightF="15.0" top="0" topF="0.0"/>
</y:GroupNode>
<y:GroupNode>
<y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="dashed" width="1.0"/>
<y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.37646484375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="59.02685546875" x="-4.513427734375" xml:space="preserve" y="0.0">Folder 4</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
</y:GroupNode>
</y:Realizers>
</y:ProxyAutoBoundsNode>
</data>
<graph edgedefault="directed" id="n5:">
<node id="n5::n0">
<data key="d6">
<y:GenericNode configuration="com.yworks.bpmn.Event.withShadow">
<y:Geometry height="17.0" width="8.83984375" x="-320.482421875" y="-93.81974357327374"/>
<y:Fill color="#333333" color2="#000000" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="12.83984375" y="4.333333333333343">
<y:LabelModel>
<y:SmartNodeLabelModel distance="4.0"/>
</y:LabelModel>
<y:ModelParameter>
<y:SmartNodeLabelModelParameter labelRatioX="-0.5" labelRatioY="-0.5" nodeRatioX="0.5" nodeRatioY="-0.24509803921568613" offsetX="4.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
</y:ModelParameter>
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.line.color" value="#000000"/>
<y:Property class="com.yworks.yfiles.bpmn.view.EventCharEnum" name="com.yworks.bpmn.characteristic" value="EVENT_CHARACTERISTIC_START"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill2" value="#d4d4d4cc"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill" value="#ffffffe6"/>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="EVENT_TYPE_PLAIN"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n5::n1" yfiles.foldertype="group">
<data key="d6">
<y:ProxyAutoBoundsNode>
<y:Realizers active="0">
<y:GroupNode>
<y:Geometry height="622.0007144110969" width="885.8365246843564" x="-442.59914466594824" y="-335.59881718588144"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.37646484375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="885.8365246843564" x="0.0" xml:space="preserve" y="0.0">alive</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="node_size" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="622.0007144110969" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="885.8365246843564" x="4.0" xml:space="preserve" y="4.0">
entry/
\
</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
<y:BorderInsets bottom="0" bottomF="0.0" left="53" leftF="53.293029987652346" right="0" rightF="0.0" top="113" topF="112.5901087688577"/>
</y:GroupNode>
<y:GroupNode>
<y:Geometry height="50.0" width="82.0" x="-125.8125" y="28.75"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.37646484375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="82.0" x="0.0" xml:space="preserve" y="0.0">get_shot</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="true" closedHeight="50.0" closedWidth="82.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
</y:GroupNode>
</y:Realizers>
</y:ProxyAutoBoundsNode>
</data>
<graph edgedefault="directed" id="n5::n1:">
<node id="n5::n1::n0">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="174.5254733043319" width="284.189453125" x="115.7627706434082" y="-185.63224357327374"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Consolas" fontSize="12" fontStyle="bold" hasLineColor="false" height="16.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="284.189453125" x="0.0" xml:space="preserve" y="4.0">agony</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="172.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="221.72265625" x="4.0" xml:space="preserve" y="4.0">
entry/
BeepForPeriod(LONG_BEEP_MS);
SaveState(AGONY);
UpdateHP(me, 1);
me-&gt;TimerAgony = 0;
TIME_TICK_1S[else]/
me-&gt;TimerAgony++;
Flash(RED, 0, 0, FLASH_MS);
TIME_TICK_10S/
BeepForPeriod(SHORT_BEEP_MS);</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="true"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n5::n1::n1">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="185.16724137931033" width="285.9375" x="-359.3061146782959" y="-185.63224357327374"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="285.9375" x="0.0" xml:space="preserve" y="4.0">healthy</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="172.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="393.26171875" x="4.0" xml:space="preserve" y="4.0">
entry/
SaveState(HEALTHY);
BeepForTime(MEDIUM_BEEP_MS);
RAD_RCVD[else]/
UpdateHP(me, me-&gt;CharHP-((oregonPlayerQEvt*)e)-&gt;value);
TIME_TICK_1S/
ShowCurrentHealth(me);
HEAL/
UpdateHP(me, me-&gt;CharHP+((oregonPlayerQEvt*)e)-&gt;value);</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="true"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n5::n1::n2" yfiles.foldertype="group">
<data key="d6">
<y:ProxyAutoBoundsNode>
<y:Realizers active="0">
<y:GroupNode>
<y:Geometry height="252.72164079848915" width="802.5434946967041" x="-374.3061146782959" y="14.68025642672626"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.37646484375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="802.5434946967041" x="0.0" xml:space="preserve" y="0.0">immune</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="node_size" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="252.72164079848915" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="802.5434946967041" x="0.0" xml:space="preserve" y="4.0">
entry/
BeepForTime(MEDIUM_BEEP_MS);
TIME_TICK_1S/
Flash(0, GREEN_MEDIUM, 0, FLASH_SEC);
HEAL/
UpdateHP(me, me-&gt;CharHP+((oregonPlayerQEvt*)e)-&gt;value);</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="3" rightF="3.4970703125" top="81" topF="81.33265026107463"/>
</y:GroupNode>
<y:GroupNode>
<y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="dashed" width="1.0"/>
<y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.37646484375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="59.02685546875" x="-4.513427734375" xml:space="preserve" y="0.0">Folder 4</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
</y:GroupNode>
</y:Realizers>
</y:ProxyAutoBoundsNode>
</data>
<graph edgedefault="directed" id="n5::n1::n2:">
<node id="n5::n1::n2::n0">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="100.0" width="285.9375" x="-359.3061146782959" y="152.4018972252154"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="285.9375" x="0.0" xml:space="preserve" y="4.0">temp_immune</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="64.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="43.5859375" x="4.0" xml:space="preserve" y="4.0">
entry/
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="true"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n5::n1::n2::n1">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="108.85890539939834" width="284.189453125" x="125.5508565809082" y="133.3893715315509"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="284.189453125" x="0.0" xml:space="preserve" y="4.0">blessed</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="64.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="155.74609375" x="4.0" xml:space="preserve" y="4.0">
entry/
SaveState(BLESSED);
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="true"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
</graph>
</node>
</graph>
</node>
<node id="n5::n2">
<data key="d6">
<y:GenericNode configuration="com.yworks.bpmn.Event.withShadow">
<y:Geometry height="17.0" width="8.83984375" x="-518.4375" y="-101.7662411538538"/>
<y:Fill color="#333333" color2="#000000" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="12.83984375" y="4.333333333333343">
<y:LabelModel>
<y:SmartNodeLabelModel distance="4.0"/>
</y:LabelModel>
<y:ModelParameter>
<y:SmartNodeLabelModelParameter labelRatioX="-0.5" labelRatioY="-0.5" nodeRatioX="0.5" nodeRatioY="-0.24509803921568613" offsetX="4.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
</y:ModelParameter>
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.line.color" value="#000000"/>
<y:Property class="com.yworks.yfiles.bpmn.view.EventCharEnum" name="com.yworks.bpmn.characteristic" value="EVENT_CHARACTERISTIC_START"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill2" value="#d4d4d4cc"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill" value="#ffffffe6"/>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="EVENT_TYPE_PLAIN"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n5::n3" yfiles.foldertype="group">
<data key="d6">
<y:ProxyAutoBoundsNode>
<y:Realizers active="0">
<y:GroupNode>
<y:Geometry height="262.2556560571152" width="1233.44468658291" x="-442.5991446659482" y="305.6165907028844"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="19.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="1233.44468658291" x="0.0" xml:space="preserve" y="0.0">ghoul</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="node_size" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="262.2556560571152" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="1233.44468658291" x="0.0" xml:space="preserve" y="4.0">
entry/
TIME_TICK_1S/
ShowCurrentHealthGhoul(me); </y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:NodeBounds considerNodeLabelSize="true"/>
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
<y:BorderInsets bottom="44" bottomF="44.49172059879527" left="53" leftF="53.29302998765229" right="38" rightF="37.98686734799617" top="47" topF="47.127828028557474"/>
</y:GroupNode>
<y:GroupNode>
<y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/>
<y:Fill color="#F5F5F5" transparent="false"/>
<y:BorderStyle color="#000000" type="dashed" width="1.0"/>
<y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.37646484375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="59.02685546875" x="-4.513427734375" xml:space="preserve" y="0.0">Folder 4</y:NodeLabel>
<y:Shape type="roundrectangle"/>
<y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
<y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
<y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
</y:GroupNode>
</y:Realizers>
</y:ProxyAutoBoundsNode>
</data>
<graph edgedefault="directed" id="n5::n3:">
<node id="n5::n3::n0">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="116.26393545831985" width="285.9375" x="-374.3061146782959" y="392.1165907028845"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="285.9375" x="0.0" xml:space="preserve" y="4.0">ghoul_good</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="76.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="228.3203125" x="4.0" xml:space="preserve" y="4.0">
entry/
SaveState(GHOUL_GOOD);
BeepForPeriod(MEDIUM_BEEP_MS);
UpdateHP(me, GHOUL_HP);
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="true"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n5::n3::n1">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="120.69338815801899" width="220.93510536398463" x="512.1360183189655" y="387.68713800318534"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="220.93510536398463" x="0.0" xml:space="preserve" y="4.0">wounded</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="112.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="221.72265625" x="4.0" xml:space="preserve" y="4.0">
entry/
SaveState(GHOUL_WOUNDED);
UpdateHP(me, 1);
BeepForPeriod(LONG_BEEP_MS);
TIME_TICK_10S/
BeepForPeriod(SHORT_BEEP_MS);</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="true"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n5::n3::n2">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="121.63610742976238" width="462.242318456657" x="30.08988914795799" y="386.7444187314419"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="462.242318456657" x="0.0" xml:space="preserve" y="4.0">ghoul_healing</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="100.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="406.45703125" x="4.0" xml:space="preserve" y="4.0">
entry/
SaveState(GHOUL_HEALING);
RAD_RCVD[else]/
UpdateHP(me, me-&gt;CharHP + ((oregonPlayerQEvt*)e)-&gt;value);
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="true"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
</graph>
</node>
<node id="n5::n4">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="174.5254733043319" width="220.93510536398458" x="527.1360183189655" y="-185.63224357327374"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="220.93510536398458" x="0.0" xml:space="preserve" y="4.0">dead</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="136.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="221.72265625" x="4.0" xml:space="preserve" y="4.0">
entry/
SaveState(DEAD);
BeepForTime(LONG_BEEP_MS);
UpdateHP(me, 0);
Flash(RED, 0, 0, 1000);
TIME_TICK_1M/
BeepForPeriod(SHORT_BEEP_MS);
Flash(255, 0, 0, FLASH_1M);</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="true"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<node id="n5::n5">
<data key="d6">
<y:GenericNode configuration="com.yworks.bpmn.Gateway.withShadow">
<y:Geometry height="26.0" width="26.0" x="624.6035710009578" y="97.52444554216106"/>
<y:Fill color="#FFFFFFE6" color2="#D4D4D4CC" transparent="false"/>
<y:BorderStyle color="#E38B00" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="-8.0" y="0.0">
<y:LabelModel>
<y:SmartNodeLabelModel distance="4.0"/>
</y:LabelModel>
<y:ModelParameter>
<y:SmartNodeLabelModelParameter labelRatioX="0.5" labelRatioY="-0.5" nodeRatioX="-0.5" nodeRatioY="-0.5" offsetX="-4.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
</y:ModelParameter>
</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.line.color" value="#000000"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill2" value="#d4d4d4"/>
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill" value="#ffffff"/>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="GATEWAY_TYPE_PLAIN"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
</graph>
</node>
<node id="n6">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:UMLNoteNode>
<y:Geometry height="100.0" width="292.9728788494972" x="-861.910259658792" y="152.4018972252154"/>
<y:Fill color="#FFCC00" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="40.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="281.1015625" x="4.0" xml:space="preserve" y="4.0">Event fields (do not delete this caption):
unsigned int value;</y:NodeLabel>
</y:UMLNoteNode>
</data>
</node>
<node id="n7">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
<y:Geometry height="212.92649572649566" width="220.93510536398458" x="-326.8049173602882" y="621.0639307498625"/>
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="220.93510536398458" x="0.0" xml:space="preserve" y="4.0">test</y:NodeLabel>
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="112.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="208.52734375" x="4.0" xml:space="preserve" y="4.0">
entry/
BeepForPeriod(SHORT_BEEP_MS);
Flash(127, 0, 0, FLASH_MS);
RAD_RCVD/
BeepForPeriod(SHORT_BEEP_MS);
Flash(127, 0, 0, FLASH_MS);</y:NodeLabel>
<y:StyleProperties>
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="true"/>
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
</y:StyleProperties>
</y:GenericNode>
</data>
</node>
<edge id="n5::n1::e0" source="n5::n1::n1" target="n5::n1::n0">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="143.0049630080373" sy="-18.016860899809846" tx="-142.09810200116686" ty="-12.695976862320634"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="332.787109375" x="-138.34045994199562" xml:space="preserve" y="-7.90148215458305">RAD_RCVD[((oregonPlayerQEvt*)e)-&gt;value &gt;= me-&gt;CharHP]<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n5::e0" source="n5::n1::n0" target="n5::n4">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0">
<y:Point x="257.8574972059082" y="-215.72805081078405"/>
<y:Point x="392.94109396914496" y="-215.72805081078405"/>
<y:Point x="637.6035710009578" y="-215.72805081078405"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="319.416015625" x="41.8500265187231" xml:space="preserve" y="-39.396985705145426">TIME_TICK_1S[me-&gt;TimerAgony &gt; TIMEOUT_AGONY_S]<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n5::e1" source="n5::n2" target="n5::n1::n1">
<data key="d10">
<y:GenericEdge configuration="com.yworks.bpmn.Connection">
<y:Path sx="3.638671875" sy="-2.4950358072916714" tx="-142.96875" ty="-2.7126540775268873"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasLineColor="false" height="16.0" horizontalTextPosition="center" iconTextGap="4" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="201.9296875" x="-37.504385664901974" xml:space="preserve" y="16.45706509394148">return Q_TRAN(me-&gt;StartState);<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:StyleProperties>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="CONNECTION_TYPE_MESSAGE_FLOW"/>
</y:StyleProperties>
</y:GenericEdge>
</data>
</edge>
<edge id="n5::n1::e1" source="n5::n1::n1" target="n5::n1::n0">
<data key="d10">
<y:GenericEdge configuration="com.yworks.bpmn.Connection">
<y:Path sx="8.06322674726141" sy="25.105783681122134" tx="70.33934187455156" ty="30.426667718611338"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasLineColor="false" height="16.0" horizontalTextPosition="center" iconTextGap="4" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="36.98828125" x="108.4909867711516" xml:space="preserve" y="-4.507712511317564">AGONY<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:StyleProperties>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="CONNECTION_TYPE_MESSAGE_FLOW"/>
</y:StyleProperties>
</y:GenericEdge>
</data>
</edge>
<edge id="n5::n1::e2" source="n5::n1::n1" target="n5::n1::n2::n0">
<data key="d10">
<y:GenericEdge configuration="com.yworks.bpmn.Connection">
<y:Path sx="-83.94033518145125" sy="3.8898308118111924" tx="-82.1941921239478" ty="10.348668233140245">
<y:Point x="-298.5315568022437" y="57.8695626564554"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasLineColor="false" height="16.0" horizontalTextPosition="center" iconTextGap="4" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="43.5859375" x="-21.259233910414764" xml:space="preserve" y="16.80361986680694">IMMUNE<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:StyleProperties>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="CONNECTION_TYPE_MESSAGE_FLOW"/>
</y:StyleProperties>
</y:GenericEdge>
</data>
</edge>
<edge id="n5::e2" source="n5::n1" target="n5::n3::n0">
<data key="d10">
<y:GenericEdge configuration="com.yworks.bpmn.Connection">
<y:Path sx="-231.65648235452585" sy="-114.91804653313784" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="left" backgroundColor="#FFFFFF" distance="2.0" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasLineColor="false" height="16.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="69.9765625" x="-34.988274102124024" xml:space="preserve" y="65.39656763227742">PILL_GHOUL<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="2.0" distanceToCenter="false" position="center" ratio="0.757998210010501" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:StyleProperties>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="CONNECTION_TYPE_MESSAGE_FLOW"/>
</y:StyleProperties>
</y:GenericEdge>
</data>
</edge>
<edge id="n5::n3::e0" source="n5::n3::n0" target="n5::n3::n1">
<data key="d10">
<y:GenericEdge configuration="com.yworks.bpmn.Connection">
<y:Path sx="84.52115301724112" sy="6.546060476425686" tx="54.872493494635386" ty="6.795453937393572">
<y:Point x="-146.8162116610548" y="355.5297109035891"/>
<y:Point x="677.4760644955932" y="359.4745384897961"/>
<y:Point x="677.4760644955932" y="355.5297109035891"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" distance="2.0" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasLineColor="false" height="16.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="83.171875" x="293.3954195109718" xml:space="preserve" y="-42.93729329964924">PILL_REMOVED<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="2.0" distanceToCenter="true" position="center" ratio="0.4063866306599053" segment="1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:StyleProperties>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="CONNECTION_TYPE_MESSAGE_FLOW"/>
</y:StyleProperties>
</y:GenericEdge>
</data>
</edge>
<edge id="n5::n3::e1" source="n5::n3::n1" target="n5::n3::n2">
<data key="d10">
<y:GenericEdge configuration="com.yworks.bpmn.Connection">
<y:Path sx="-64.64309539288544" sy="-7.6669174252078385" tx="-37.90760010042459" ty="19.300554373600335">
<y:Point x="557.9604756080723" y="536.6206836455449"/>
<y:Point x="223.3034482758619" y="536.6206836455449"/>
<y:Point x="223.3034482758619" y="526.6525862068966"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="left" backgroundColor="#FFFFFF" distance="2.0" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasLineColor="false" height="28.0" horizontalTextPosition="center" iconTextGap="4" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="406.45703125" x="-367.99691503532097" xml:space="preserve" y="18.130939585952547">RAD_RCVD/
UpdateHP(me, me-&gt;CharHP + ((oregonPlayerQEvt*)e)-&gt;value);<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:StyleProperties>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="CONNECTION_TYPE_MESSAGE_FLOW"/>
</y:StyleProperties>
</y:GenericEdge>
</data>
</edge>
<edge id="n5::n1::e3" source="n5::n1::n2::n0" target="n5::n1::n1">
<data key="d10">
<y:GenericEdge configuration="com.yworks.bpmn.Connection">
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" distance="2.0" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasLineColor="false" height="16.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="69.9765625" x="-34.988274102123995" xml:space="preserve" y="-84.41027562890525">NOT_IMMUNE<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="2.0" distanceToCenter="false" position="center" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:StyleProperties>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="CONNECTION_TYPE_MESSAGE_FLOW"/>
</y:StyleProperties>
</y:GenericEdge>
</data>
</edge>
<edge id="n5::n1::e4" source="n5::n1::n0" target="n5::n1::n2::n1">
<data key="d10">
<y:GenericEdge configuration="com.yworks.bpmn.Connection">
<y:Path sx="9.7880859375" sy="-0.39621844596112543" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" distance="2.0" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasLineColor="false" height="16.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="50.18359375" x="-25.091782579248047" xml:space="preserve" y="64.27344460560873">BLESSED<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="2.0" distanceToCenter="false" position="center" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:StyleProperties>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="CONNECTION_TYPE_MESSAGE_FLOW"/>
</y:StyleProperties>
</y:GenericEdge>
</data>
</edge>
<edge id="n5::n1::e5" source="n5::n1::n2" target="n5::n1::n0">
<data key="d10">
<y:GenericEdge configuration="com.yworks.bpmn.Connection">
<y:Path sx="-12.886632267801007" sy="-119.29757045043678" tx="79.80284762167798" ty="75.15308934340948">
<y:Point x="14.079000402255147" y="-23.21641757769831"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasLineColor="false" height="16.0" horizontalTextPosition="center" iconTextGap="4" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="36.98828125" x="28.192376143356796" xml:space="preserve" y="-42.75677815500987">AGONY<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:StyleProperties>
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="CONNECTION_TYPE_MESSAGE_FLOW"/>
</y:StyleProperties>
</y:GenericEdge>
</data>
</edge>
<edge id="e0" source="n5" target="n5::n1::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="100.36505698598819" ty="-71.28727701581313">
<y:Point x="130.77400929418104" y="-397.8314809000522"/>
<y:Point x="-115.97230769230771" y="-397.8314809000522"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="left" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="33.40234375" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="78.701171875" x="-162.75347659164146" xml:space="preserve" y="-44.90524188638034">PILL_RESET/
Reset(me);<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n5::n3::e2" source="n5::n3::n2" target="n5::n3::n0">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="421.796875" x="-299.91241406214004" xml:space="preserve" y="15.435431333157226">RAD_RCVD [((((oregonPlayerQEvt*)e)-&gt;value+me-&gt;CharHP )&gt;=GHOUL_HP)]<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="e1" source="n7" target="n5::n3::n0">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="-15.0" sy="-106.4667731712999" tx="0.0" ty="58.118431456466"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="78.033203125" x="-39.016594414624024" xml:space="preserve" y="-65.68878228665403">PILL_GHOUL<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="e2" source="n7" target="n5::n1::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="-110.46755268199229" sy="0.0" tx="-142.96875" ty="52.574270320197044">
<y:Point x="-505.585469452273" y="727.5271786131103"/>
<y:Point x="-505.585469452273" y="-40.47435256342153"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="33.40234375" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="78.701171875" x="-218.0874836124292" xml:space="preserve" y="-400.7019194946869">PILL_RESET/
Reset(me);<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="e3" source="n5" target="n7">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="-291.51979088402294" sy="480.1232627280425" tx="53.733776340996144" ty="-106.46324786324783"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#F5F5F5" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="centered" modelPosition="center" preferredPlacement="center_on_edge" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="66.02734375" x="-34.21056414118655" xml:space="preserve" y="5.8575284944080295">PILL_TEST<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" placement="center" side="on_edge" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n5::n1::e6" source="n5::n1::n0" target="n5::n1::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="-53.73508341280467" sy="-64.26928618234044" tx="137.67357157484764" ty="-43.990443157326446">
<y:Point x="204.12241379310353" y="-215.66120689655168"/>
<y:Point x="-78.66379310344826" y="-215.66120689655168"/>
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" backgroundColor="#FFFFFF" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="33.40234375" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="356.46484375" x="-319.6255327948208" xml:space="preserve" y="-46.70750206256736">HEAL/
UpdateHP(me, me-&gt;CharHP + ((oregonPlayerQEvt*)e)-&gt;value);<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="11.113102188167746" distanceToCenter="false" position="center" ratio="0.5" segment="1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n5::e3" source="n5::n4" target="n5::n5">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="96.009765625" x="-78.00488847169845" xml:space="preserve" y="44.9421140037971">TEST_TRIGGER<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n5::e4" source="n5::n5" target="n5::n3::n1">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="15.0" ty="-41.17262518564314"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="94.703125" x="-77.35156815919845" xml:space="preserve" y="122.74432631857167">[me-&gt;CharHP&gt;0]<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
<edge id="n5::e5" source="n5::n5" target="n5::n1::n0">
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.701171875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="32.681640625" x="-133.29931208797325" xml:space="preserve" y="-73.68809131240403">[else]<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="center" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
</edge>
</graph>
<data key="d7">
<y:Resources/>
</data>
</graphml>

88
test.c Normal file
View File

@@ -0,0 +1,88 @@
/* -----------------------------------------------------------------------------
* The Cyberiada GraphML library implemention
*
* The testing program
*
* Copyright (C) 2024 Alexey Fedoseev <aleksey@fedoseev.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/
* ----------------------------------------------------------------------------- */
#include <stdio.h>
#include <string.h>
#include "cyberiadaml.h"
const char* formats[] = {
"yed", /* cybxmlYED */
"cyberiada" /* cybxmlCyberiada */
};
const char* format_names[] = {
"yEd editor format used by Ostranna projects and the Orbita Simulator",
"Cyberiada-GraphML format"
};
unsigned int format_count = sizeof(formats) / sizeof(char*);
void print_usage(const char* name)
{
unsigned int i;
fprintf(stderr, "%s -t <format> <path-to-graphml-file>\n\n", name);
fprintf(stderr, "Supported formats:\n");
for (i = 0; i < format_count; i++) {
fprintf(stderr, " %-20s %s\n", formats[i], format_names[i]);
}
fprintf(stderr, "\n");
}
int main(int argc, char** argv)
{
char *filename;
char *format_str = "";
CyberiadaXMLFormat format;
unsigned int i;
int res;
CyberiadaSM sm;
if (argc != 4 ||
strcmp(argv[1], "-t") != 0) {
print_usage(argv[0]);
return 1;
}
for(i = 0; i < format_count; i++) {
if (strcmp(argv[2], formats[i]) == 0) {
format = (CyberiadaXMLFormat)i;
format_str = argv[2];
break;
}
}
if(strlen(format_str) == 0) {
fprintf(stderr, "unsupported graphml format %s\n", argv[2]);
print_usage(argv[0]);
return 2;
}
filename = argv[3];
if ((res = cyberiada_read_sm(&sm, filename, format)) != CYBERIADA_NO_ERROR) {
fprintf(stderr, "error while reading %s file: %d\n",
filename, res);
return 2;
}
cyberiada_print_sm(&sm);
cyberiada_cleanup_sm(&sm);
return 0;
}