(*
   $Id$
   ISO TC184/SC4/WG12 N3852 - ISO/TS 10303-1635 Assembly functional interface requirement - EXPRESS ARM
   Supersedes ISO TC184/SC4/WG12 N3294
*)

SCHEMA Assembly_functional_interface_requirement_arm;

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

REFERENCE FROM Specification_document_arm(get_document_definition);	-- ISO/TS 10303-1747

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

  ENTITY Minimally_defined_connector
    SUBTYPE OF (Packaged_part);
      SELF\Packaged_part.used_package : SET[1:?] OF Package_external_reference;
    INVERSE
      terminal : SET[1:?] OF Shape_element FOR containing_shape;
    WHERE
      WR1 : SIZEOF(SELF\Packaged_part.access_mechanisms) = 0;
      WR2 : NOT EXISTS(SELF\Packaged_part.implemented_function);
      WR3 : NOT ('ALTERED_PART_ARM.ALTERED_PACKAGED_PART' IN TYPEOF(SELF));
  END_ENTITY;

  ENTITY Protocol_physical_layer_definition
    SUBTYPE OF (Requirement_view_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 
    SUBTYPE OF (Protocol_physical_layer_definition);
      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;

