Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > ARINC 653 for VxWorks 653 code > ARINC 653 for VxWorks 653 profile items > Sampling port (ARINC for VxWorks code)
  
Sampling port (ARINC for VxWorks 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 a child element of a <Ports> element, which in turn is a child element of an <Application> element's <ApplicationDescription> element. In addition, Sampling Ports are generated in the application startup code.
* 
ACS only generates XML and application startup code for a Sampling Port after it has been linked to an Application Part through a Port Usage.
The structure of the <SamplingPort> element is as follows for VxWorks:
<SamplingPort
Attribute=""
Direction=""
DriverName=""
MessageSize=""
Name=""
RefreshRate="">
</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 */
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
Attribute - generated as the Attribute attribute of the <SamplingPort> element. To set this property: right-click the Sampling Port, point to ARINC 653, point to Set, and then click Attribute. Possible values are DIRECT_ACCESS_PORT, LOCAL_PORT, NULL_PORT, PSEUDO_PORT or NONE.
Direction - specifies the direction of the port, that is, Source or Destination. When set to Source, 'SOURCE' is generated as the Direction attribute of the <SamplingPort> element. When set to Destination, '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.
DriverName - generated as the DriverName attribute of the <SamplingPort> element. To set this property: right-click the Sampling Port, point to ARINC 653, point to Set, and then click DriverName.
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 as the MessageSize attribute of the <SamplingPort> element. Also 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 as the RefreshRate attribute of the <SamplingPort> element. Also 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 RefreshRateSeconds.
The Name of the Sampling Port is generated as the Name attribute of the <SamplingPort> element.