Operation Integer getPrimaryInterface (Integer portID, String system_name), in Class Port

Documentation
returns 0 if it's not the primary interface
1 if yes, -1 if it's this option is not available