Data type definition for NCES

(as of 17.03.2003, draft in development)

<!-- ***************************** COMMENT ************************** -->
<!-- SNSType                                                          -->
<!-- Document Type Definition for a SNS function block                -->
<!-- Based on                                                         -->
<!-- * SESA Formalism                                                 -->
<!-- * IEC 61499 FBType node (defined in LibraryElement.dtd)          -->
<!-- Created on 28.12.2001 (Gustavo Bouzon)                           -->
<!-- Last Modified on 17.03.2003 (Valeriy Vyatkin)                    -->
<!-- Point+ to Point* in declaration of arc elements                  -->
<!-- ***************************** /COMMENT ************************* -->

<!ELEMENT SNSType (Options?, InterfaceList, (SNS|SNSNetwork))>
<!ATTLIST SNSType
          GlobalNumber CDATA #IMPLIED
          Name NMTOKENS #REQUIRED
          Comment NMTOKENS #IMPLIED
          X CDATA #REQUIRED
          Y CDATA #REQUIRED>

<!-- ***************************** COMMENT ************************** -->
<!-- Files should have <SNSType> as a parent node                     -->
<!-- LocNum makes no sense for a single Block, thus deleted           -->
<!-- GlobalNumber is the new Name for Num                             -->
<!-- X and Y have to be better defined                                -->
<!-- ***************************** /COMMENT ************************* -->

<!ELEMENT Options (Colors*,Priorities?,Greediness?,SynchroSets*,FiringRule?)>

<!ELEMENT Colors EMPTY>
<!-- <!ATTLIST Colors                                                 -->
<!--           Number CDATA #REQUIRED                                 -->
<!--           GlobalNumber CDATA #IMPLIED                            -->
<!--           Name CDATA #REQUIRED                                   -->
<!--           Comment NMTOKENS #IMPLIED>                             -->
<!ELEMENT Priorities EMPTY>
<!ELEMENT Greediness EMPTY>
<!ELEMENT SynchroSets EMPTY>
<!ATTLIST SynchroSets
          Number CDATA #REQUIRED
          GlobalNumber CDATA #IMPLIED
          Name CDATA #REQUIRED
          Comment NMTOKENS #IMPLIED>
<!ELEMENT FiringRule EMPTY>
<!ATTLIST FiringRule
          Name CDATA #REQUIRED>

<!-- ***************************** COMMENT ************************** -->
<!-- Here not every combination of options is allowed!                -->
<!-- Combination must be checked for consistency                      -->
<!-- Although the set of colors may be determined here, it is still   -->
<!-- not clear how to include them in transitions, places and so on   -->
<!-- SNSNetworks may also be composed of blocks with meaningfull      -->
<!-- combination of options                                           -->
<!-- If options are not specified, assume that all disabled and       -->
<!-- FiringRule Name="arbitrary maximal steps"                        -->
<!-- ***************************** /COMMENT ************************* -->

<!ELEMENT InterfaceList (EventInputs?,EventOutputs?,InputVars?,OutputVars?)>

<!ELEMENT EventInputs (Event+)>
<!ELEMENT EventOutputs (Event+)>

<!-- ***************************** COMMENT ************************** -->
<!-- No generation of nodes without events!!!                         -->
<!-- ***************************** /COMMENT ************************* -->

<!ELEMENT Event EMPTY>
<!ATTLIST Event
          Number CDATA #REQUIRED
          GlobalNumber CDATA #IMPLIED
          Name CDATA #REQUIRED
          Comment NMTOKENS #IMPLIED
          X CDATA #REQUIRED
          Y CDATA #REQUIRED
          Width NMTOKEN #REQUIRED
          Height NMTOKEN #REQUIRED>

<!-- ***************************** COMMENT ************************** -->
<!-- Number is the new name for the attribute LocNum                  -->
<!-- Geometry attributes X, Y Width and Height refer to position      -->
<!-- inside the module                                                -->
<!-- All other GlobalNumber Attributes make nosense in single         -->
<!-- SNS Blocks, thus implied                                         -->
<!-- ***************************** /COMMENT ************************* -->

<!-- ***************************** COMMENT ************************** -->
<!-- A new attribute could be generated, as a combination of "ei"+    -->
<!-- the Number Attribute; this would be an appropriate ID for the    -->
<!-- arcs. Same applies to "eo", "ci", "co", "p" and "t".             -->
<!-- This is not being done because additional verification would     -->
<!-- be anyway needed (for instance, verify if EndPoint of a          -->
<!-- condition arc is an event output or transition)                  -->
<!-- ***************************** /COMMENT ************************* -->

<!ELEMENT InputVars (VarDeclaration+)>
<!ELEMENT OutputVars (VarDeclaration+)>

<!-- ***************************** COMMENT ************************** -->
<!-- No generation of nodes without vars!!!                           -->
<!-- ***************************** /COMMENT ************************* -->

<!ELEMENT VarDeclaration EMPTY>
<!ATTLIST VarDeclaration
          Number CDATA #REQUIRED
          Name CDATA #REQUIRED
          Comment NMTOKENS #IMPLIED
          X CDATA #IMPLIED
          Y CDATA #IMPLIED>

<!ELEMENT SNS (place*,trans*,arc*,evarc*,condarc*)>

<!-- ***************************** COMMENT ************************** -->
<!-- Internal structure of SNS                                        -->
<!-- Notice that places and transitions should be ordered!!           -->
<!-- ***************************** /COMMENT ************************* -->

<!ELEMENT place EMPTY>
<!ATTLIST place 
          Number CDATA #REQUIRED
          Name CDATA #REQUIRED
          Comment NMTOKENS #IMPLIED
          Mark CDATA #REQUIRED
          Clock CDATA #REQUIRED
          Capacity CDATA #REQUIRED
          Diameter NMTOKENS #REQUIRED
          X CDATA #REQUIRED
          Y CDATA #REQUIRED>

<!-- ***************************** COMMENT ************************** -->
<!-- Capacity?                                                        -->
<!-- ***************************** /COMMENT ************************* -->

<!ELEMENT trans EMPTY>
<!ATTLIST trans 
          Number CDATA #REQUIRED
          Name CDATA #REQUIRED
          Comment NMTOKENS #IMPLIED
          EventBehavior ( AND | OR ) 'OR'
          ConditionBehavior ( AND | OR ) 'AND'
          Greedy ( YES | NO ) #IMPLIED
          Priority CDATA #IMPLIED
          SynchroSet CDATA #IMPLIED
          X CDATA #REQUIRED
          Y CDATA #REQUIRED
          Width NMTOKENS #IMPLIED
          Height NMTOKENS #IMPLIED>

<!-- ***************************** COMMENT ************************** -->
<!-- EventBehavior is the formal "Type" Attribute                     -->
<!-- Greedy, priority and synchroset are new, based on SESA           -->
<!-- The attributes SwitchMode and TransInscription were cut          -->
<!-- ***************************** /COMMENT ************************* -->

<!ELEMENT arc (Point*)>
<!ATTLIST arc
          ArcWeight CDATA #REQUIRED
          StartPoint CDATA #REQUIRED
          EndPoint CDATA #REQUIRED
          TimeValue CDATA #REQUIRED>

<!ELEMENT evarc (Point*)>
<!ATTLIST evarc
          StartPoint CDATA #REQUIRED
          EndPoint CDATA #REQUIRED>

<!ELEMENT condarc (Point*)>
<!ATTLIST condarc
          ArcWeight CDATA #REQUIRED
          StartPoint CDATA #REQUIRED
          EndPoint CDATA #REQUIRED>

<!ELEMENT Point EMPTY>
<!ATTLIST Point
          Num CDATA #REQUIRED
          X CDATA #REQUIRED
          Y CDATA #REQUIRED>

<!-- ***************************** COMMENT ************************** -->
<!-- Are the first Point X and Y  attributes related to their         -->
<!-- distance to the StartPoint?                                      -->
<!-- **************************** /COMMENT ************************** -->

<!-- ***************************** COMMENT ************************** -->
<!-- NMTOKENS allows the use of special characters                    -->
<!-- EMPTY node may have attributes, but no child                     -->
<!-- "*" indicates zero or more                                       -->
<!-- "+" indicates one or more                                        -->
<!-- ***************************** /COMMENT ************************* -->

<!ELEMENT CENetwork (FB*,EventConnections?,DataConnections?)> 
<!ELEMENT FB EMPTY> 
<!ATTLIST FB
  Name CDATA #REQUIRED
  Type CDATA #REQUIRED
  Comment CDATA #IMPLIED
   x CDATA #IMPLIED
   y CDATA #IMPLIED
   width CDATA #IMPLIED
   height CDATA #IMPLIED>	
<!ELEMENT EventConnections (Connection+)> 
<!ELEMENT DataConnections (Connection+)> 
<!ELEMENT Connection EMPTY> 
<!ATTLIST Connection
  Source CDATA #REQUIRED
  Destination CDATA #REQUIRED
  Comment CDATA #IMPLIED
  dx1 CDATA #IMPLIED
  dx2 CDATA #IMPLIED
  dy CDATA #IMPLIED >

<!-- ***************************** COMMENT ************************** -->
<!-- CENetwork is based on FBNetwork (for 61499)                     -->
<!-- As there, x and y attributes are not written with capital        -->
<!-- letters; dx1, dx2 and dy define geometries of connections;       -->
<!-- width and height were introduced here because geometry of a      -->
<!-- block inside a composite block may be different from its         -->
<!-- original geometry (as opposite to 61499 blocks);                 -->
<!-- the Type attribute relates to a SNS file ("FB Class")            -->
<!-- Source and Destination may be something like like Name.Output    -->
<!-- or a reference to an input/output of the composite module        -->
<!-- ***************************** /COMMENT ************************* -->