(*
 * $Id$
 *
 * JSDAI(TM), a way to implement STEP, ISO 10303
 * Copyright (C) 1997-2008, LKSoftWare GmbH, Germany
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License
 * version 3 as published by the Free Software Foundation (AGPL v3).
 *
 * 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * JSDAI is a registered trademark of LKSoftWare GmbH, Germany
 * This software is also available under commercial licenses.
 * See also http://www.jsdai.net/
 *)

(*
   Derived from ISO TC184/SC4/WG12 N - ISO/CD-TS 10303-xxxx Assembly functional interface requirement - EXPRESS ARM
   by LKSoftWare GmbH for implementation purpose within IDA-STEP(TM)
*)

SCHEMA Assembly_functional_interface_requirement_xim;

USE FROM Altered_part_xim;	-- ISO/TS 10303-1602

USE FROM Assembly_functional_interface_requirement_mim;

REFERENCE FROM Specification_document_xim(get_document_definition);


	TYPE afir_documented_element_select = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON documented_element_select WITH 
	   (Protocol_physical_layer_definition_armx);
	END_TYPE; 

  ENTITY Minimally_defined_connector_armx
    (* CONNOTATIONAL *) SUBTYPE OF (Packaged_part_armx, minimally_defined_connector);
    	SELF\Packaged_part_armx.used_package	: SET[1:?] OF Package_external_reference;
    INVERSE
      terminal 												: SET[1:?] OF Shape_element FOR containing_shape;
    WHERE
      WR1 : SIZEOF(SELF\Packaged_part_armx.access_mechanisms) = 0;
      WR2 : NOT EXISTS(SELF\Packaged_part_armx.implemented_function);
      WR3 : NOT ('ALTERED_PART_XIM.ALTERED_PACKAGED_PART' IN TYPEOF(SELF));      
  END_ENTITY;

  ENTITY Protocol_physical_layer_definition_armx
    SUBTYPE OF (Requirement_view_definition, protocol_physical_layer_definition);
      host_connector                       : OPTIONAL Minimally_defined_connector;
      host_functional_definition           : Functional_unit_usage_view;
      media_connector                      : OPTIONAL Minimally_defined_connector;
      media_functional_definition          : OPTIONAL Functional_unit_usage_view;
	DERIVE
		reference_document: SET[0:?] OF Document_definition :=
  			get_document_definition(SELF, 'reference document', 
  			'DOCUMENT_DEFINITION_ARM.DOCUMENT_DEFINITION');
	WHERE
   		WR1 : EXISTS (reference_document) AND (SIZEOF(reference_document) = 1);
      	WR2 : EXISTS(host_functional_definition) OR EXISTS(media_functional_definition);   		
  END_ENTITY;
  
  ENTITY Protocol_physical_layer_definition_with_characterization_armx 
    SUBTYPE OF (Protocol_physical_layer_definition, protocol_physical_layer_definition_with_characterization);
       host_rcv_functional_characterization : OPTIONAL SET[1:?] OF Functional_specification_definition;
       host_xmt_functional_characterization : OPTIONAL SET[1:?] OF Functional_specification_definition;
       media_functional_characterization    : OPTIONAL SET[1:?] OF Functional_specification_definition;
	WHERE
       WR1 : EXISTS (host_rcv_functional_characterization) OR EXISTS (host_xmt_functional_characterization) OR EXISTS(media_functional_characterization);	
  END_ENTITY;


END_SCHEMA;


