Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* @author ETSI / STF422_EETS
* @version $URL:$
* $Id:$
* @desc FAST networking & transport layer protocol (ISO 29281-2) functions
*/
module LibItsFntp_Functions {
// Libcommon
import from LibCommon_Sync all;
import from LibCommon_VerdictControl {
type FncRetCode
};
import from LibCommon_Time {
function f_sleepIgnoreDef
};
import from LibCommon_BasicTypesAndValues {
type UInt16
};
// LibIts
import from CALMmanagement language "ASN.1:1997" {
type StationID, ITS_scuId;
};
import from CALMllsap language "ASN.1:1997" {
type
EUI64, IN_SAPaddress, LLserviceAddr, Link_ID, AccessParameters
};
import from CALMfntp language "ASN.1:1997" all;
import from LibItsMgt_Functions {
altstep
a_mgtMNSapPortDefault, a_mgtSapAwaitFWTupdate
};
import from LibItsFntp_TypesAndValues {
const c_portDyn, c_portNon;
type AcFntpPrimitive
};
import from LibItsFntp_Templates all;
import from LibItsFntp_Pixits all;
import from LibItsFntp_Pics {
modulepar PICS_ITS_S_INW;
};
garciay
committed
// FIXME To be removed
// import from LibItsCommon_TypesAndValues {
// type UtCommandConfirm
// };
group fntpConfigurationFunctions {
/**
* @desc This configuration features:
* <li>Host and Router are combined (see ISO/WD 29281-2 - Figure 1 - Implementation architecture I)</li>
* <li>MGT1 IISC Port (IISC/LAN) is not used</li>
*/
// Sanity check
if (PICS_ITS_S_INW) {
log("*** f_cf01Up: ERROR: PICS_ITS_S_INW shall not be required for executing the TC ***");
stop;
}
// Map
map(self:acPort, system:acPort);
map(self:utPort, system:utPort);
map(self:mgtMNSapPort, system:mgtMNSapPort);
map(self:fntpPort, system:fntpPort);
// Connect
f_connect4SelfOrClientSync();
// Set processing on shutdown
activate(a_cf01Down());
// Initialize the component
f_initialiseComponent("cf01Up");
// Initialze the IUT
f_initialState();
} // End of function f_cf01Up
/**
* @desc This configuration features:
* <li>Host and Router are separated (see ISO/WD 29281-2 - Figure 3 - Implementation architecture II & III)</li>
* <li>MGT1 IISC Port (IISC/LAN) is not used</li>
*/
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// Sanity check
if (not(PICS_ITS_S_INW)) {
log("*** f_cf02Up: ERROR: PICS_ITS_S_INW required for executing the TC ***");
stop;
}
vc_commandRef := 0;
vc_pduCounter := 0;
// Map
map(self:acPort, system:acPort);
map(self:utPort, system:utPort);
map(self:mgtMNSapPort, system:mgtMNSapPort);
map(self:fntpPort, system:fntpPort);
// Connect
f_connect4SelfOrClientSync();
// Set processing on shutdown
activate(a_cf02Down());
// Initialize the component
f_initialiseComponent("cf02Up");
// Initialze the IUT
f_initialState();
} // End of function f_cf02Up
/**
* @desc Deletes configuration cf01
*/
deactivate;
// Unmap
unmap(self:acPort, system:acPort);
unmap(self:utPort, system:utPort);
unmap(self:mgtMNSapPort, system:mgtMNSapPort);
unmap(self:fntpPort, system:fntpPort);
// Disconnect
f_disconnect4SelfOrClientSync();
garciay
committed
/**
* @desc Deletes configuration cf02
*/
deactivate;
// Unmap
unmap(self:acPort, system:acPort);
unmap(self:utPort, system:utPort);
unmap(self:fntpPort, system:fntpPort);
// Disconnect
f_disconnect4SelfOrClientSync();
/**
* @desc Behavior function for initializing component's variables and tables
* @param p_componentName Name of the component
*/
function f_initialiseComponent(in charstring p_componentName) runs on ItsCalm {
// Initialize variables
vc_componentName := p_componentName;
vc_portNumber := { portLong := c_portNon };
// Set defaults
activate(a_fntpDefault()); // Default for Fntp module
activate(a_mgtMNSapPortDefault()); // Default for MGT module / MF-SAP port
} // End of group fntpConfigurationFunctions
group preambles {
/**
* @desc Brings the IUT into an initial state.
*/
f_utInitializeIut(m_fntpInitialize);
f_sleepIgnoreDef(PX_WAIT_FOR_IUT_READY); // Wait until the IUT is in a stable situation (beaconing...)
} // End of function f_initialState
/**
* @desc Implement the following Initial conditions:
* <li>the IUT having set up properly the FNTP forwarding table, and the local port number of the ITS-S application</li>
* <li>the IUT having an entry in the FNTP forwarding table for unicast communication with remote Link Port and Service Port</li>
* <li>the IUT having an entry in the FNTP forwarding table for Service Port = port1, but not for Service Port = port2</li>
* <li>the IUT having an entry in the FNTP forwarding table for a Service Port, but no entry for the peer station</li>
* @param p_port Indicates the port number
* @verdict Unchanged on success, set to fail on error (e_timeout)
* @see ISO/WD 29281-2 Clause 8.2
*/
function f_initializeFntpForwardingTable(in PortNumber p_port) runs on ItsCalm {
// Request allocation of a port number associated with the ITS-SP
// TODO Consider case of c_portDyn, and use f_utCommandRequestConfirm
f_utCommandRequestWithoutConfirm(
m_generateNfFntpPortCreationRequest(
f_getIutServiceRef(),
// Store the allocated port number
if (ischosen(vc_portNumber.portShort)) {
log("*** f_initializeFntpForwardingTable: INFO: portNumber value is: " & int2str(vc_portNumber.portShort) & " ***");
} else {
log("*** f_initializeFntpForwardingTable: INFO: portNumber value is: " & int2str(vc_portNumber.portLong) & " ***");
}
// And wait for a MN-SAP.MN-COMMAND/FWTupdate message sent by IST management entity to update the forwarding table
f_mnSapAwaitFWTupdate();
} // End of function f_initializeFntpForwardingTable
/**
* @desc Call this method to remove entry created by f_initializeFntpForwardingTable() in FNTP Forwarding Table
* @verdict Unchanged
*/
function f_unInitializeFntpForwardingTable() runs on ItsCalm {
// Send for FTN-SOCKET.request & Wait for FTN-SOCKET.confirm
f_utCommandRequestConfirm(
m_generateNfFntpPortDeletionRequest(f_getIutServiceRef(), vc_portNumber),
mw_fntpPortConfirm(f_getIutServiceRef(), ?),
false,
vc_utCommandConf);
} // End of function f_unInitializeFntpForwardingTable
/**
* @desc Trigger a basic FNTPNPDU to create an entry in forwarding table for a known peer station
*/
f_acGenerateFntpNPDU(
f_getIutRemotePortNumberValue(),
vc_portNumber,
m_llServiceAddr(m_linkID(f_getIutSrcRemoteCIID_BC(), f_getIutSrcLocalCIID())),
m_llServiceAddr(m_linkID(f_getIutRemoteDestCIID_BC(), f_getIutDestLocalCIID())),
f_getIutSHopValue()
);
// TODO Do we ignore management and NF-COMM.indication messages?
} // End of function f_setupKnownPeerStation
} // End of group preambles
group postambles {
/**
* @desc The default postamble.
*/
}
} // End of group postambles
/**
* @desc MN-SAP primitives
* @see ISO/CD 24102-3 - Clause 7. MN-SAP
*/
group testerFunctions {
} // End of group testerFunctions
group mnSapFunctions {
/**
* @desc Wait for MN-SAP.MN-COMMAND/FWTupdate message sent by IST management entity to update the forwarding table
* @verdict Unchanged
*/
tc_ac.start;
alt {
[] a_mgtSapAwaitFWTupdate() {
tc_ac.stop;
log("*** f_mnSapAwaitFWTupdate: INFO: Expected message not received ***");
}
[] tc_ac.timeout {
log("*** f_mnSapAwaitFWTupdate: ERROR: MN-SAP FWTupdate service primitive not received ***");
}
} // End of 'alt' statement
} // End of function f_mnSapAwaitFWTupdate()
/**
* @desc Generate a correctly formatted GCctxTxCmd message via IN-SAP interface
* @param p_commandRef Unique cyclic reference number of command. Same value as in related MN-REQUEST.request
* @param p_linkID Link ID of the peer station
* @param p_clientID TODO
* @verdict Unchanged
*/
// FIXME To be removed - Moved on NF-SAP
// function f_mnSapGenerateGCctxTxCmd(in CommandRef p_commandRef, in Link_ID p_linkID, in ITSaid p_clientID) runs on ItsCalm {
// f_mgtGenerateGCctxTxCmd(
// p_commandRef,
// m_gCctxTxCmd(
// f_getIutINSapAddress(),
// p_linkID,
// p_clientID
// )
// );
// }
/**
* @desc Generate a correctly formatted SAM/CTXrxNot message from peer station via IN-SAP interface
* @param p_commandRef Unique cyclic reference number of command. Same value as in related MN-REQUEST.request
* @param p_linkID Link ID of the peer station
* @param p_clientID
* @verdict Unchanged
*/
// FIXME To be removed - Moved on NF-SAP
// function f_mnSapGenerateCTXrxNot(in CommandRef p_commandRef, in Link_ID p_linkID, in ITSaid p_clientID) runs on ItsCalm {
// f_mgtGenerateCTXrxNot(
// p_commandRef,
// m_cTXrxNot(
// f_getIutINSapAddress(),
// p_linkID,
// p_clientID
// )
// );
// }
} // End of group testerFunctions
group adapterControl {
/**
* @desc Triggers event in the test system adaptation via IN-SAP interface.
* @param p_event The event to trigger
*/
function f_acTriggerEvent(template (value) AcFntpPrimitive p_event) runs on ItsCalm {
acPort.send(p_event);
}
/**
* @desc Triggers test adapter to send FNTP NDPU
* @param p_sourcePort TODO
* @param p_destinationPort TODO
* @param p_sourcePort IN-SAP source port
* @param p_destinationPort IN-SAP destination port
* @param p_hops N-hops value
*/
function f_acGenerateFntpNPDU(
in template (value) PortNumber p_sourcePort,
in template (value) PortNumber p_destinationPort,
in template (value) LLserviceAddr p_insapSourceAddress,
in template (value) LLserviceAddr p_insapDestAddress,
in FNTPhopCount p_hops
f_acTriggerEvent(
m_generateFntpNPDU(
p_insapSourceAddress,
p_insapDestAddress,
bit2oct(
encvalue(
p_sourcePort,
p_destinationPort,
p_hops
)
)
)
)
);
} // End of function f_acGenerateFntpNPDU
/**
* @desc Triggers lower tester to send FNTP station-internal NDPU with several hops and an invalid control field
* @param p_sourcePort Source port
* @param p_destinationPort Destination port
* @param p_insapSourceAddress IN-SAP source port
* @param p_insapDestAddress IN-SAP destination port
* @param p_hops N-hops value
*/
function f_acGenerateFntpNPDU_InvalidCtrlField(
in template (value) PortNumber p_sourcePort,
in template (value) PortNumber p_destinationPort,
in template (value) LLserviceAddr p_insapSourceAddress, // TODO Rename in p_insapSourceAddress
in template (value) LLserviceAddr p_insapDestAddress, // TODO Rename in p_insapDestAddress
in template (value) FNTPhopCount p_hops
f_acTriggerEvent(
m_generateFntpNPDU(
p_insapSourceAddress,
p_insapDestAddress,
bit2oct(
encvalue(
p_sourcePort,
p_destinationPort,
p_hops
)
)
)
)
);
} // End of function f_acGenerateFntpNPDU_InvalidCtrlField
/**
* @desc Triggers lower tester to send FNTP station-internal NDPU with bit5 set
* @param p_sourcePort Source port
* @param p_destinationPort Destination port
* @param p_insapSourceAddress IN-SAP source port
* @param p_insapDestAddress IN-SAP destination port
*/
function f_acGenerateFntpNPDU_InvalidBitSet(
in template (value) PortNumber p_sourcePort,
in template (value) PortNumber p_destinationPort,
in template (value) LLserviceAddr p_insapSourceAddress, // TODO Rename in p_insapSourceAddress
in template (value) LLserviceAddr p_insapDestAddress // TODO Rename in p_insapDestAddress
f_acTriggerEvent(
m_generateFntpNPDU(
p_insapSourceAddress,
p_insapDestAddress,
bit2oct(
encvalue(
p_sourcePort,
p_destinationPort,
omit
)
)
)
)
);
} // End of function f_acGenerateFntpNPDU_With_Bit5
/**
* @desc Triggers test adapter to send FNTP NDPU
* @param p_sourcePort Source port
* @param p_destinationPort Destination port
* @param p_insapSourceAddress IN-SAP source port
* @param p_insapDestAddress IN-SAP destination port
* @param p_hops N-hops value
* @param p_rxCIP Receive (RX) parameter settings
* @param p_txCIP Transmit (TX) parameters of a VCI
* @param p_accessParams Access parameters
*/
function f_acGenerateFntpNPDU_CIP(
in template (value) PortNumber p_sourcePort,
in template (value) PortNumber p_destinationPort,
in template (value) LLserviceAddr p_insapSourceAddress, // TODO Rename in p_insapSourceAddress
in template (value) LLserviceAddr p_insapDestAddress, // TODO Rename in p_insapDestAddress
in template (value) FNTPhopCount p_hops,
in template (value) RXcip p_rxCIP, // TODO Perhaps this parameter is not required, p_accessParams would be enough
in template (value) TXcip p_txCIP, // TODO Perhaps this parameter is not required, p_accessParams would be enough
in template (value) AccessParameters p_accessParams
f_acTriggerEvent(
m_generateFntpNPDU_CIP(
p_insapSourceAddress,
p_insapDestAddress,
bit2oct(
encvalue(
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
p_sourcePort,
p_destinationPort,
p_hops,
p_rxCIP, // TODO Perhaps this parameter is not required, p_accessParams would be enough
p_txCIP // TODO Perhaps this parameter is not required, p_accessParams would be enough
)
)
),
p_accessParams
)
);
} // End of function f_acGenerateFntpNPDU_CIP
/**
* @desc Triggers test adapter to send FNTP forwarding NDPU
* @param p_sourcePort Source port (c_portRtr or c_portHst)
* @param p_destinationPort Destination port (c_portRtr or c_portHst)
* @param p_fromPort Forwarding source port
* @param p_toPort Forwarding destination port
* @param p_sourcePort IN-SAP source port
* @param p_destinationPort IN-SAP destination port
* @param p_counter Expected value of FNTP packet counter counter field
* @param p_hops N-hops value
*/
function f_acGenerateFntpForwardingNPDU(
in template (value) PortNumber p_sourcePort,
in template (value) PortNumber p_destinationPort,
in template (value) PortNumber p_fromPort,
in template (value) PortNumber p_toPort,
in template (value) LLserviceAddr p_insapSourceAddress, // TODO Rename in p_insapSourceAddress
in template (value) LLserviceAddr p_insapDestAddress, // TODO Rename in p_insapDestAddress
in template (value) FNTPpacketCounter p_counter,
in template (value) FNTPhopCount p_hops
f_acTriggerEvent(
m_generateFntpNPDU(
p_insapSourceAddress,
p_insapDestAddress,
bit2oct(
encvalue(
p_sourcePort,
p_destinationPort,
p_hops,
p_fromPort,
p_toPort,
p_counter
) // End of function encvalue
) // End of function bit2oct
) // End of field 'm_generateFntpNPDU'
);
} // End of function f_acGenerateFntpForwardingNPDU
/**
* @desc Triggers test adapter to send FNTP forwarding NDPU with an unknown ITS-SCU-ID
* @param p_sourcePort Source port (c_portRtr or c_portHst)
* @param p_destinationPort Destination port (c_portRtr or c_portHst)
* @param p_fromPort Forwarding source port
* @param p_toPort Forwarding destination port
* @param p_sourcePort IN-SAP source port
* @param p_destinationPort IN-SAP destination port
* @param p_counter Expected value of FNTP packet counter counter field
* @param p_hops N-hops value
*/
function f_acGenerateFntpForwardingNPDU_UnknownITS_SCU_ID(
in template (value) PortNumber p_sourcePort,
in template (value) PortNumber p_destinationPort,
in template (value) PortNumber p_fromPort,
in template (value) PortNumber p_toPort,
in template (value) LLserviceAddr p_insapSourceAddress, // TODO Rename in p_insapSourceAddress
in template (value) LLserviceAddr p_insapDestAddress, // TODO Rename in p_insapDestAddress
in template (value) FNTPpacketCounter p_counter,
in template (value) FNTPhopCount p_hops
f_acTriggerEvent(
m_generateFntpNPDU(
p_insapSourceAddress,
p_insapDestAddress,
bit2oct(
encvalue(
p_sourcePort,
p_destinationPort,
p_hops,
p_fromPort,
p_toPort,
p_counter
) // End of field 'md_fntpForwardingNPDU_UnknownITS_SCU_ID'
) // End of function encvalue
) // End of function bit2oct
) // End of field 'm_generateFntpNPDU'
);
} // End of function f_acGenerateFntpForwardingNPDU_UnknownITS_SCU_ID
/**
* @desc Triggers test adapter to send FNTP forwarding NDPU with CIP
* @param p_sourcePort Source port (c_portRtr or c_portHst)
* @param p_destinationPort Destination port (c_portRtr or c_portHst)
* @param p_fromPort Forwarding source port
* @param p_toPort Forwarding destination port
* @param p_sourcePort IN-SAP source port
* @param p_destinationPort IN-SAP destination port
* @param p_counter Expected value of FNTP packet counter counter field
* @param p_hops N-hops value
* @param p_rxCIP Receive (RX) parameter settings
* @param p_txCIP Transmit (TX) parameters of a VCI
*/
function f_acGenerateFntpForwardingNPDU_CIP(
in template (value) PortNumber p_sourcePort,
in template (value) PortNumber p_destinationPort,
in template (value) PortNumber p_fromPort,
in template (value) PortNumber p_toPort,
in template (value) LLserviceAddr p_insapSourceAddress, // TODO Rename in p_insapSourceAddress
in template (value) LLserviceAddr p_insapDestAddress, // TODO Rename in p_insapDestAddress
in template (value) FNTPpacketCounter p_counter,
in template (value) FNTPhopCount p_hops,
in template (value) RXcip p_rxCIP, // TODO Perhaps this parameter is not required, p_accessParams would be enough
in template (value) TXcip p_txCIP, // TODO Perhaps this parameter is not required, p_accessParams would be enough
in template (value) AccessParameters p_accessParams
f_acTriggerEvent(
m_generateFntpNPDU_CIP(
p_insapSourceAddress,
p_insapDestAddress,
bit2oct(
encvalue(
p_sourcePort,
p_destinationPort,
p_hops,
p_fromPort,
p_toPort,
p_counter,
p_rxCIP, // TODO Perhaps this parameter is not required, p_accessParams would be enough
p_txCIP // TODO Perhaps this parameter is not required, p_accessParams would be enough
) // End of field 'md_fntpForwardingNPDU_CIP'
) // End of function 'encvalue'
), // End of function 'bit2oct'
p_accessParams
)
);
} // End of function f_acGenerateFntpForwardingNPDU_CIP
} // End of group adapterControl
group internalFunctions { // TODO Use parametrized function (ETSI ES 202 784) insetad of the three oct2xxx functions
/**
* @desc This function convert the specified octetstring into a template (FNTPNPDU or FntpExtInd or FntpFwdInd)
* This SHALL be done due to the ASN.1 description of IN-SAP service primitives DL_Unitdata_request/DL_Unitdata_indication
* @param p_data An octetstring to decode
* @param p_syncPoint Current synchronisation point, required to set verdict according to the LibCommon rules
* @param p_decoded The decoded message
* @verdict Unchanged on success, set to fail otherwise
* @see ISO/CD 21218 - Clause 8.2.2
*/
function f_oct2npdu(in octetstring p_data, in charstring p_syncPoint, out FNTPNPDU p_decoded) runs on ItsCalm {
var integer v_result;
v_result := decvalue(oct2bit(p_data), p_decoded);
if (v_result == 1) {
f_selfOrClientSyncAndVerdictTestBody(p_syncPoint, e_error);
log("*** f_oct2npdu: FAIL: 'decvalue' operation failed ***");
} else if (v_result == 2) {
f_selfOrClientSyncAndVerdictTestBody(p_syncPoint, e_error);
log("*** f_oct2npdu: FAIL: 'decvalue' operation failed, not enougth bits ***");
log("*** f_oct2npdu: INFO: Decoded message done ***");
} // End of function f_oct2npdu
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
} // End of group internalFunctions
group iutFunctions {
/**
* @desc Get the local identifier of the VCI
* @return The local identifier of the VCI
* @see PX_SRC_LOCAL_CIID
* @verdict Unchanged
* @see ISO 21218 - Clause 6.2 Link Identifier
*/
function f_getIutSrcLocalCIID() return EUI64 {
return PX_SRC_LOCAL_CIID;
}
/**
* @desc Get the local identifier of the VCI
* @return The local identifier of the VCI
* @see PX_DEST_LOCAL_CIID
* @verdict Unchanged
* @see ISO 21218 - Clause 6.2 Link Identifier
*/
function f_getIutDestLocalCIID() return EUI64 {
return PX_DEST_LOCAL_CIID;
}
/**
* @desc Get the local identifier of the VCI for broadcast on ITS-S host
* @return The local identifier of the VCI for broadcast on ITS-S host
* @see PX_SRC_REMOTE_CIID_BC
* @verdict Unchanged
*/
function f_getIutSrcRemoteCIID_BC() return EUI64 {
return PX_SRC_REMOTE_CIID_BC;
}
/**
* @desc Get the identifier of a different VCI on ITS-S host/router only
* @return The identifier of a different VCI on ITS-S host/router only
* @see PX_SRC_DIFFERENT_LOCAL_CIID
* @verdict Unchanged
*/
function f_getIutSrcDifferentLocalCIID() return EUI64 {
return PX_SRC_DIFFERENT_LOCAL_CIID;
}
/**
* @desc Get the identifier of a second VCI for unicast (peer to peer) on ITS-S host
* @return The identifier of a a second VCI for unicast (peer to peer) on ITS-S host
* @see PX_SRC_SECOND_REMOTE_CIID_UC
* @verdict Unchanged
*/
function f_getIutSrcSecondRemoteCIID() return EUI64 {
return PX_SRC_SECOND_REMOTE_CIID_UC;
}
/**
* @desc Get the remote CIID for unicast (peer to peer)
* @return The remote CIID for unicast
* @see PX_SRC_REMOTE_CIID_UC
* @verdict Unchanged
*/
function f_getIutSrcRemoteCIID_UC() return EUI64 {
return PX_SRC_REMOTE_CIID_UC;
}
/**
* @desc Get the remote identifier of a second VCI for unicast (peer to peer) on ITS-S host
* @return The remote identifier of a a second VCI for unicast (peer to peer) on ITS-S host
* @see PX_DEST_REMOTE_CIID_UC
* @verdict Unchanged
*/
function f_getIutDestRemoteCIID() return EUI64 {
return PX_DEST_REMOTE_CIID_UC;
}
/**
* @desc Get the application port number, used instead of c_portDyn
* @return The application port number, used instead of c_portDyn
* @see PX_APP_PORT_NUMBER
* @verdict Unchanged
*/
function f_getIutAppPortValue() return PortNumber {
return PX_APP_PORT_NUMBER;
}
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
/**
* @desc Get the source forwarding port
* @return The source forwarding port
* @see PX_FORWARDING_SRC_PORT
* @verdict Unchanged
*/
function f_getIutForwardingSrcPort() return PortNumber {
return PX_FORWARDING_SRC_PORT;
}
/**
* @desc Get the destination forwarding port
* @return The destination forwarding port
* @see PX_FORWARDING_DST_PORT
* @verdict Unchanged
*/
function f_getIutForwardingDestPort() return PortNumber {
return PX_FORWARDING_DST_PORT;
}
/**
* @desc Get the source port number, i.e. the local endpoint
* @return The source port number
* @see PX_LOCAL_PORT_NUMBER
* @verdict Unchanged
*/
function f_getIutLocalPortNumberValue() return PortNumber {
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
return PX_LOCAL_PORT_NUMBER;
}
/**
* @desc Get the remote identifier of the VCI for broadcast on ITS-S host
* @return The remote identifier of the VCI for broadcast on ITS-S host
* @see PX_DEST_REMOTE_CIID_BC
* @verdict Unchanged
* @see ISO 21218 - Clause 6.2 Link Identifier
*/
function f_getIutRemoteDestCIID_BC() return EUI64 {
return PX_DEST_REMOTE_CIID_BC;
}
/**
* @desc Get the IUT Link-ID in broadcast transmission mode
* @return The IUT Link-ID in broadcast transmission mode
* @see PX_LINK_ID_BC
* @verdict Unchanged
* @see ISO 21218 - Clause 6.2 Link Identifier
*/
function f_getIutLinkId_BC() return Link_ID {
return PX_LINK_ID_BC;
}
/**
* @desc TODO
* @return TODO
* @verdict Unchanged
*/
function f_getIutLinkId_BC_Router() return Link_ID {
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
return PX_LINK_ID_BC_WITH_SECOND_SCU_ID;
}
// /**
// * @desc TODO
// * @return TODO
// * @verdict Unchanged
// */
// function f_getIutLinkId_BC_WithThirdScuId() return Link_ID {
// return PX_LINK_ID_BC_WITH_THIRD_SCU_ID;
// }
//
// /**
// * @desc TODO
// * @return TODO
// * @verdict Unchanged
// */
// function f_getIutLinkId_BC_WithFourthScuId() return Link_ID {
// return PX_LINK_ID_BC_WITH_FOURTH_SCU_ID;
// }
//
/**
* @desc Get the IUT Link-ID in multicast transmission mode
* @return The IUT Link-ID in broadcast transmission mode
* @see PX_LINK_ID_BC
* @verdict Unchanged
*/
function f_getIutLinkId_MC() return Link_ID {
return PX_LINK_ID_MC;
}
/**
* @desc TODO
* @return TODO
* @verdict Unchanged
*/
function f_getIutLinkId_UNKWNON_BC() return Link_ID {
return PX_LINK_ID_UNKWNON_BC;
}
/**
* @desc TODO
* @return TODO
* @verdict Unchanged
*/
function f_getIutLinkId_UNKWNON_UC() return Link_ID {
return PX_LINK_ID_UNKWNON_UC;
}
/**
* @desc TODO
* @return TODO
* @verdict Unchanged
*/
function f_getIutLinkId_UC() return Link_ID {
return PX_LINK_ID_UC;
}
/**
* @desc Get an unknown IUT station identifier
* @return An unknown IUT station identifier
* @see PX_STATION_ID_UNKNOWN
* @verdict Unchanged
*/
function f_getIutStationId_UNKWNON() return StationID { // FIXME Rename into f_getIutPeerStationId
return PX_STATION_ID_UNKNOWN;
}
/**
* @desc Get the ITS-SP payload EPDU
* @return The ITS-SP payload EPDU
* @verdict Unchanged
*/
function f_getIutItsFPDU() return ITSfpdu {
return PX_ITS_FPDU;
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
}
/**
* @desc Get the service reference defining a number uniquely identifying the endpoint at this host in an implementation specific way
* @return The service reference
* @see PX_SERVICE_REF
* @verdict Unchanged
*/
function f_getIutServiceRef() return integer {
return PX_SERVICE_REF;
}
/**
* @desc Get the Single-hop value
* @return The Single-hop value
* @verdict Unchanged
*/
function f_getIutSHopValue() return FNTPhopCount {
return PX_SHOP;
}
/**
* @desc Get the N-hops value
* @return The N-hops value
* @verdict Unchanged
*/
function f_getIutNHopsValue() return FNTPhopCount {
return PX_NHOPS;
}
/**
* @desc Get the host scuID value
* @return The host scuID value
* @see PX_HOST_SCU_ID
* @verdict Unchanged
*/
function f_getIutHostScuIdValue() return ITS_scuId {
return PX_HOST_SCU_ID;
}
/**
* @desc Get a service port number
* @return The service port number
* @see PX_SERVICE_PORT
* @verdict Unchanged
*/
function f_getIutServicePortValue() return PortNumber {
return PX_SERVICE_PORT;
}
/**
* @desc Get the reception access parameter
* @return The reception access parameter
* @see PX_CIP_RX_SETTINGS
* @verdict Unchanged
*/
function f_getIutRXcipValue() return RXcip {
return PX_CIP_RX_SETTINGS;
}
/**
* @desc Get the transmission access parameter
* @return The transmission access parameter
* @see PX_CIP_TX_SETTINGS
* @verdict Unchanged
*/
function f_getIutTXcipValue() return TXcip {
return PX_CIP_TX_SETTINGS;
}
/**
* @desc Get the remote port number value
* @return The remote port number value
* @see PX_REMOTE_PORT_NUMBER
* @verdict Unchanged
*/
function f_getIutRemotePortNumberValue() return PortNumber {
return PX_REMOTE_PORT_NUMBER;
} // End of function f_getIutRemotePortNumberValue
/**
* @desc Get the second remote port number value
* @return The second remote port number value
* @see PX_SECOND_REMOTE_PORT_NUMBER
* @verdict Unchanged
*/
function f_getIutSecondRemotePortNumberValue() return PortNumber {
return PX_SECOND_REMOTE_PORT_NUMBER;
} // End of function f_getIutSecondRemotePortNumberValue
} // End of group iutFunctions
group fntpAltsteps {
/**
* @desc The base default.
*/
// FIXME Check why TTWB detect an error here?
// [] fntpPort.receive(mw_fntpInSapPrimitiveReq(mw_inUnitDataReq_any)) {
// log("*** a_fntpDefault: INFO: IN-UNITDATA.request received in default ***");
// repeat;
// }
// FIXME Add support of response to NF-FNTP-PORT.confirm & NF-FNTP-COMM.confirm
[] fntpPort.receive {
log("*** a_fntpDefault: INFO: Unkown FNTP NDPU received in default ***");
repeat;
}
[] tc_wait.timeout {
log("*** a_fntpDefault: ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] tc_ac.timeout { // For security because it should be done in main altsetp bloc
log("*** a_fntpDefault: ERROR: Timeout while awaiting the reception of a message ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] any timer.timeout {
log("*** a_fntpDefault: INCONC: An unknown timer has expired in default ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] a_shutdown() {
f_poDefault();
log("*** a_fntpDefault: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
if(self == mtc) {
f_cf01Down();
}
stop;
}
} // End of altstep a_fntpDefault()
/**
* @desc Default handling cf01 de-initialisation.
*/
[] a_shutdown() {
f_poDefault();
f_cf01Down();
log("*** a_cf01Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;
}
} // End of altstep a_cf01Down()
/**
* @desc Default handling cf02 de-initialisation.
*/