| <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| <!DOCTYPE FBType SYSTEM "http://www.holobloc.com/xml/LibraryElement.dtd"> |
| <FBType Comment="Translate individual fields to an ArrowheadService type" Name="FieldsToArrowheadService"> |
| <Identification Description="Copyright (c) 2018 fortiss GmbH This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/ SPDX-License-Identifier: EPL-2.0" Standard="61499-2"/> |
| <VersionInfo Author="Jose Cabral" Date="2018-09-21" Organization="fortiss GmbH" Version="1.0"/> |
| <InterfaceList> |
| <EventInputs> |
| <Event Comment="Create arrowhead service" Name="REQ" Type="Event"> |
| <With Var="serviceDefinition"/> |
| <With Var="interfaces"/> |
| <With Var="serviceMetadata"/> |
| </Event> |
| </EventInputs> |
| <EventOutputs> |
| <Event Comment="Arrowhead service created" Name="CNF" Type="Event"> |
| <With Var="arrowheadService"/> |
| </Event> |
| </EventOutputs> |
| <InputVars> |
| <VarDeclaration Comment="Identification of the service" Name="serviceDefinition" Type="WSTRING"/> |
| <VarDeclaration ArraySize="10" Comment="Interfaces implemented by the service" Name="interfaces" Type="WSTRING"/> |
| <VarDeclaration ArraySize="10" Comment="Metadata of the service in key=value format" Name="serviceMetadata" Type="WSTRING"/> |
| </InputVars> |
| <OutputVars> |
| <VarDeclaration Comment="Created Arrowhead service" Name="arrowheadService" Type="ArrowheadService"/> |
| </OutputVars> |
| </InterfaceList> |
| <BasicFB> |
| <ECC> |
| <ECState Comment="Initial State" Name="START" x="555.0" y="425.0"/> |
| <ECState Comment="Normal execution" Name="REQ" x="215.0" y="755.0"> |
| <ECAction Algorithm="REQ" Output="CNF"/> |
| </ECState> |
| <ECTransition Comment="" Condition="REQ" Destination="REQ" Source="START" x="555.0" y="600.0"/> |
| <ECTransition Comment="" Condition="1" Destination="START" Source="REQ" x="215.0" y="425.0"/> |
| </ECC> |
| <Algorithm Comment="Normally executed algorithm" Name="REQ"> |
| <ST Text="VAR i: INT; END_VAR; i := 0; arrowheadService.serviceDefinition := serviceDefinition; WHILE i < 10 DO //looks like while is faster than FOR when exporting to cpp arrowheadService.interfaces[i] := interfaces[i]; arrowheadService.serviceMetadata[i] := serviceMetadata[i]; i := i + 1; END_WHILE "/> |
| </Algorithm> |
| </BasicFB> |
| </FBType> |