Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > ARINC 653 for PikeOS 653 code > ARINC 653 for PikeOS 653 profile items > Sampling port (ARINC for PikeOS code)
  
Sampling port (ARINC for PikeOS code)
A Sampling Port is a port on a partition to which a channel can connect for sampling based interpartition communication. Will be designated either SOURCE or DESTINATION based on the toolbar icon used to create it. For more information see the ARINC SPECIFICATION 653P1-2, December 1, 2005.
A Sampling Port models a <SamplingPort> element, which is an element of a Partition's <SamplingPortList> element.
The structure of the <SamplingPort> element is as follows for PikeOS:
<SamplingPort Name="" Direction="" >
</SamplingPort
When a Sampling Port is used by an Application Part, the Sampling Port is created in the application startup code that is generated for the Application Part. For example, using C:
/* Header File */
#include <apex_samplingports.h>
...
extern SAMPLING_PORT_ID_TYPE SamplingPort1_id;

/* Implementation File */
SAMPLING_PORT_ID_TYPE SamplingPort1_id
...
CREATE_SAMPLING_PORT("SamplingPort1", 256, DESTINATION, 1, &SamplingPort1_id, &rc);
ASSERT(rc == NO_ERROR);
Create a Sampling Port on a Configuration Diagram: click the
Source Sampling Port or Destination Sampling Port toolbar button, and then click within a Partition Part.
Ensure that through a Port Usage, each Sampling Port is linked to an Application Part within the Partition Part.
Ensure that through a Channel, each Sampling Port is linked to another Sampling Port on a different Partition Part.
To set an ARINC 653 property of a Sampling Port: right-click the Sampling Port, point to ARINC 653, point to Set, and then click the command for the property you want to set.
When shown on a Configuration Diagram, a Sampling Port's notation is as follows:
You can view Sampling Ports in the Parts pane.
A Sampling Port is based on a UML Attribute.
The following sections provide information about how a Sampling Port is used in the model.
Shown on these diagrams
Configuration Diagram
ARINC properties
Direction - specifies the direction of the port, that is, Source or Destination. When set to Source, 'VMPORT_SOURCE' is generated as the Direction attribute of the <SamplingPort> element. When set to Source, 'VMPORT_DESTINATION' is generated as the Direction attribute of the <SamplingPort> element. To set this property: right-click the Sampling Port, point to ARINC 653, point to Set, and then click Direction.
IsSource - shows whether the Sampling Port is a source port. Possible values are TRUE or FALSE.
IsTarget - shows whether the Sampling Port is a destination port. Possible values are TRUE or FALSE
MaxMessageSize - generated in the startup code for defining the Sampling Port. To set this property: right-click the Sampling Port, point to ARINC 653, point to Set, and then click MaxMessageSize.
RefreshRateSeconds - generated in the startup code for defining the Sampling Port. To set this property: right-click the Sampling Port, point to ARINC 653, point to Set, and then click MaxNbMessages.
The Name of the Sampling Port is generated as the Name attribute of the <SamplingPort> element.