Loading ttcn/Security/LibItsSecurity_Functions.ttcn3 +87 −98 Original line number Diff line number Diff line Loading @@ -8,107 +8,96 @@ module LibItsSecurity_Functions { // LibCommon import from LibCommon_BasicTypesAndValues { type UInt64 } import from LibCommon_DataStrings { type Oct32 } import from LibCommon_Sync all; // LibItsSecurity import from LibItsSecurity_Templates all; import from LibItsSecurity_TestSystem all; group configurationFunctions { /** * @desc */ function f_cf01Up() runs on ItsGnSecurity { // Map map(self:acPort, system:acPort); map(self:utPort, system:utPort); map(self:gnSecurityPort, system:gnSecurityPort); // Connect f_connect4SelfOrClientSync(); activate(a_cf01Down()); // Initialze the IUT/DUT f_initialState(); } // End of function f_cf01Up function f_cf01Down() runs on ItsGnSecurity { // Unmap unmap(self:acPort, system:acPort); unmap(self:utPort, system:utPort); unmap(self:gnSecurityPort, system:gnSecurityPort); // Disconnect f_disconnect4SelfOrClientSync(); } // End of function f_cf01Down } // End of group configurationFunctions group preambles { /** * @desc Brings the IUT into an initial state. */ function f_initialState() runs on ItsBaseGnSecurity { // TODO } } // End of group preambles group postambles { } // End of group postambles group securityAltsteps { /** * @desc The base default behavior. */ altstep a_default() runs on ItsGnSecurity { [] gnSecurityPort.receive(mw_gnSecurityInd(?)) { log("*** a_default: WARNING: Received an unexpected message ***"); repeat; } [] gnSecurityPort.receive { log("*** a_default: WARNING: Received an unexpected message ***"); repeat; } [] tc_wait.timeout { log("*** a_default: ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } [] tc_ac.timeout { log("*** a_default: ERROR: Timeout while awaiting the reception of a message ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } [] a_shutdown() { log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); stop; } } // End of 'altstep' statement altstep a_cf01Down() runs on ItsGnSecurity { [] a_shutdown() { f_cf01Down(); log("*** a_cf01Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); stop; } } // End of 'altstep' statement } // End of group securityAltsteps // group configurationFunctions { // // /** // * @desc // */ // function f_cf01Up() runs on ItsGnSecurity { // // // Map // map(self:acPort, system:acPort); // map(self:utPort, system:utPort); // map(self:gnSecurityPort, system:gnSecurityPort); // // // Connect // f_connect4SelfOrClientSync(); // activate(a_cf01Down()); // // // Initialze the IUT/DUT // f_initialState(); // // } // End of function f_cf01Up // // function f_cf01Down() runs on ItsGnSecurity { // // // Unmap // unmap(self:acPort, system:acPort); // unmap(self:utPort, system:utPort); // unmap(self:gnSecurityPort, system:gnSecurityPort); // // // Disconnect // f_disconnect4SelfOrClientSync(); // } // End of function f_cf01Down // // } // End of group configurationFunctions // // group preambles { // // /** // * @desc Brings the IUT into an initial state. // */ // function f_initialState() runs on ItsBaseGnSecurity { // // TODO // } // // } // End of group preambles // // group postambles { // // } // End of group postambles // // group securityAltsteps { // // /** // * @desc The base default behavior. // */ // altstep a_default() runs on ItsGnSecurity { // [] gnSecurityPort.receive(mw_gnSecurityInd(?)) { // log("*** a_default: WARNING: Received an unexpected message ***"); // repeat; // } // [] gnSecurityPort.receive { // log("*** a_default: WARNING: Received an unexpected message ***"); // repeat; // } // [] tc_wait.timeout { // log("*** a_default: ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***"); // f_selfOrClientSyncAndVerdict("error", e_timeout); // } // [] tc_ac.timeout { // log("*** a_default: ERROR: Timeout while awaiting the reception of a message ***"); // f_selfOrClientSyncAndVerdict("error", e_timeout); // } // [] a_shutdown() { // log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); // stop; // } // } // End of 'altstep' statement // // altstep a_cf01Down() runs on ItsGnSecurity { // [] a_shutdown() { // f_cf01Down(); // log("*** a_cf01Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); // stop; // } // } // End of 'altstep' statement // // } // End of group securityAltsteps // group helpersFunctions { /** Loading ttcn/Security/LibItsSecurity_Templates.ttcn3 +16 −16 Original line number Diff line number Diff line Loading @@ -29,23 +29,23 @@ module LibItsSecurity_Templates { // LibItsSecurity import from LibItsSecurity_TypesAndValues all; import from LibItsSecurity_Pixits all; import from LibItsSecurity_TestSystem { type GnSecurityReq, GnSecurityInd } template (value) GnSecurityReq m_gnSecurityReq( in template (value) SecuredMessage p_msgReq ) := { msgReq := p_msgReq } // End of template m_gnSecurityReq template (present) GnSecurityInd mw_gnSecurityInd( in template (present) SecuredMessage p_msgInd ) := { msgInd := p_msgInd } // End of template mw_gnSecurityIng // import from LibItsSecurity_TestSystem { // type // GnSecurityReq, GnSecurityInd // } // template (value) GnSecurityReq m_gnSecurityReq( // in template (value) SecuredMessage p_msgReq // ) := { // msgReq := p_msgReq // } // End of template m_gnSecurityReq // // template (present) GnSecurityInd mw_gnSecurityInd( // in template (present) SecuredMessage p_msgInd // ) := { // msgInd := p_msgInd // } // End of template mw_gnSecurityIng // /** * @desc Constants declaration */ Loading ttcn/Security/LibItsSecurity_TestSystem.ttcn3 +130 −130 Original line number Diff line number Diff line Loading @@ -6,134 +6,134 @@ * */ module LibItsSecurity_TestSystem { // LibCommon import from LibCommon_Sync { type ServerSyncComp }; // LibItsCommon import from LibItsCommon_TestSystem all; import from LibItsCommon_TypesAndValues all; // LibItsSecurity import from LibItsSecurity_TypesAndValues all; group portDefinitions { /** * @desc Adapter control port */ type port AdapterControlPort message { out AcGnSecurityPrimitive; in AcGnSecurityResponse; } // End of AdapterControlPort /** * @desc Upper Tester port */ type port UpperTesterPort message { out UtInitialize; in UtInitializeResult; } // End of UpperTesterPort } // End of portDefinitions group interfacePorts { group networkAndTransportPorts { group nt2Ports { /** * @desc NT2 GeoNetworking Secutity Port (GnSec/G5) */ type port GnSecurityPort message { in GnSecurityInd; out GnSecurityReq; } // End of GnSecurityPort } // End of group nt2Ports } // End of group networkAndTransportPorts } // End of group interfacePorts group componentDefinitions { /** * @desc ITS Main Test Component */ type component ItsMtc extends ItsBaseMtc, ServerSyncComp { port UpperTesterPort utPort; port AdapterControlPort acPort; } // End of type ItsMtc /** * @desc ITS System Adapter */ type component ItsGnSecuritySystem { port UpperTesterPort utPort; port AdapterControlPort acPort; // NT2 ports port GnSecurityPort gnSecurityPort; } // End of type ItsGnSecuritySystem } // End of group componentDefinitions type component ItsBaseGnSecurity extends ItsBaseComponent { port UpperTesterPort utPort; port AdapterControlPort acPort; } /** * @desc Test component for ITS Network and Transport layer */ type component ItsGnSecurity extends ItsBaseGnSecurity { // NT2 ports port GnSecurityPort gnSecurityPort; // Variables for GnSecurity } // End of component ItsGeoNetworking group networkAndTransportPrimitives { group nt2Primitives { /** * @desc NT2 GeoNetworking Security Indication Primitive * @member msgInd TODO */ type record GnSecurityInd { SecuredMessage msgInd } // End of type GnSecurityInd /** * @desc NT2 GeoNetworking Security Request Primitive * @member msgReq TODO */ type record GnSecurityReq { SecuredMessage msgReq } // End of type GnSecurityReq } // End of group nt2Primitives } // End of group networkAndTransportPrimitives with { encode "LibIts_Interface" } // End of group interfacePrimitives // // // LibCommon // import from LibCommon_Sync { // type ServerSyncComp // }; // // // LibItsCommon // import from LibItsCommon_TestSystem all; // import from LibItsCommon_TypesAndValues all; // // // LibItsSecurity // import from LibItsSecurity_TypesAndValues all; // // group portDefinitions { // // /** // * @desc Adapter control port // */ // type port AdapterControlPort message { // out // AcGnSecurityPrimitive; // in // AcGnSecurityResponse; // } // End of AdapterControlPort // // /** // * @desc Upper Tester port // */ // type port UpperTesterPort message { // out // UtInitialize; // in // UtInitializeResult; // } // End of UpperTesterPort // // } // End of portDefinitions // // group interfacePorts { // // group networkAndTransportPorts { // // group nt2Ports { // // /** // * @desc NT2 GeoNetworking Secutity Port (GnSec/G5) // */ // type port GnSecurityPort message { // in GnSecurityInd; // out GnSecurityReq; // } // End of GnSecurityPort // // } // End of group nt2Ports // // } // End of group networkAndTransportPorts // // } // End of group interfacePorts // // group componentDefinitions { // // /** // * @desc ITS Main Test Component // */ // type component ItsMtc extends ItsBaseMtc, ServerSyncComp { // // port UpperTesterPort utPort; // port AdapterControlPort acPort; // // } // End of type ItsMtc // // /** // * @desc ITS System Adapter // */ // type component ItsGnSecuritySystem { // // port UpperTesterPort utPort; // port AdapterControlPort acPort; // // // NT2 ports // port GnSecurityPort gnSecurityPort; // // } // End of type ItsGnSecuritySystem // // } // End of group componentDefinitions // // type component ItsBaseGnSecurity extends ItsBaseComponent { // // port UpperTesterPort utPort; // port AdapterControlPort acPort; // // } // // /** // * @desc Test component for ITS Network and Transport layer // */ // type component ItsGnSecurity extends ItsBaseGnSecurity { // // // NT2 ports // port GnSecurityPort gnSecurityPort; // // // Variables for GnSecurity // // } // End of component ItsGeoNetworking // // group networkAndTransportPrimitives { // // group nt2Primitives { // // /** // * @desc NT2 GeoNetworking Security Indication Primitive // * @member msgInd TODO // */ // type record GnSecurityInd { // SecuredMessage msgInd // } // End of type GnSecurityInd // // /** // * @desc NT2 GeoNetworking Security Request Primitive // * @member msgReq TODO // */ // type record GnSecurityReq { // SecuredMessage msgReq // } // End of type GnSecurityReq // // } // End of group nt2Primitives // // } // End of group networkAndTransportPrimitives // with { // encode "LibIts_Interface" // } // End of group interfacePrimitives // } // End of module LibItsSecurity_TestSystem No newline at end of file Loading
ttcn/Security/LibItsSecurity_Functions.ttcn3 +87 −98 Original line number Diff line number Diff line Loading @@ -8,107 +8,96 @@ module LibItsSecurity_Functions { // LibCommon import from LibCommon_BasicTypesAndValues { type UInt64 } import from LibCommon_DataStrings { type Oct32 } import from LibCommon_Sync all; // LibItsSecurity import from LibItsSecurity_Templates all; import from LibItsSecurity_TestSystem all; group configurationFunctions { /** * @desc */ function f_cf01Up() runs on ItsGnSecurity { // Map map(self:acPort, system:acPort); map(self:utPort, system:utPort); map(self:gnSecurityPort, system:gnSecurityPort); // Connect f_connect4SelfOrClientSync(); activate(a_cf01Down()); // Initialze the IUT/DUT f_initialState(); } // End of function f_cf01Up function f_cf01Down() runs on ItsGnSecurity { // Unmap unmap(self:acPort, system:acPort); unmap(self:utPort, system:utPort); unmap(self:gnSecurityPort, system:gnSecurityPort); // Disconnect f_disconnect4SelfOrClientSync(); } // End of function f_cf01Down } // End of group configurationFunctions group preambles { /** * @desc Brings the IUT into an initial state. */ function f_initialState() runs on ItsBaseGnSecurity { // TODO } } // End of group preambles group postambles { } // End of group postambles group securityAltsteps { /** * @desc The base default behavior. */ altstep a_default() runs on ItsGnSecurity { [] gnSecurityPort.receive(mw_gnSecurityInd(?)) { log("*** a_default: WARNING: Received an unexpected message ***"); repeat; } [] gnSecurityPort.receive { log("*** a_default: WARNING: Received an unexpected message ***"); repeat; } [] tc_wait.timeout { log("*** a_default: ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } [] tc_ac.timeout { log("*** a_default: ERROR: Timeout while awaiting the reception of a message ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } [] a_shutdown() { log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); stop; } } // End of 'altstep' statement altstep a_cf01Down() runs on ItsGnSecurity { [] a_shutdown() { f_cf01Down(); log("*** a_cf01Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); stop; } } // End of 'altstep' statement } // End of group securityAltsteps // group configurationFunctions { // // /** // * @desc // */ // function f_cf01Up() runs on ItsGnSecurity { // // // Map // map(self:acPort, system:acPort); // map(self:utPort, system:utPort); // map(self:gnSecurityPort, system:gnSecurityPort); // // // Connect // f_connect4SelfOrClientSync(); // activate(a_cf01Down()); // // // Initialze the IUT/DUT // f_initialState(); // // } // End of function f_cf01Up // // function f_cf01Down() runs on ItsGnSecurity { // // // Unmap // unmap(self:acPort, system:acPort); // unmap(self:utPort, system:utPort); // unmap(self:gnSecurityPort, system:gnSecurityPort); // // // Disconnect // f_disconnect4SelfOrClientSync(); // } // End of function f_cf01Down // // } // End of group configurationFunctions // // group preambles { // // /** // * @desc Brings the IUT into an initial state. // */ // function f_initialState() runs on ItsBaseGnSecurity { // // TODO // } // // } // End of group preambles // // group postambles { // // } // End of group postambles // // group securityAltsteps { // // /** // * @desc The base default behavior. // */ // altstep a_default() runs on ItsGnSecurity { // [] gnSecurityPort.receive(mw_gnSecurityInd(?)) { // log("*** a_default: WARNING: Received an unexpected message ***"); // repeat; // } // [] gnSecurityPort.receive { // log("*** a_default: WARNING: Received an unexpected message ***"); // repeat; // } // [] tc_wait.timeout { // log("*** a_default: ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***"); // f_selfOrClientSyncAndVerdict("error", e_timeout); // } // [] tc_ac.timeout { // log("*** a_default: ERROR: Timeout while awaiting the reception of a message ***"); // f_selfOrClientSyncAndVerdict("error", e_timeout); // } // [] a_shutdown() { // log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); // stop; // } // } // End of 'altstep' statement // // altstep a_cf01Down() runs on ItsGnSecurity { // [] a_shutdown() { // f_cf01Down(); // log("*** a_cf01Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); // stop; // } // } // End of 'altstep' statement // // } // End of group securityAltsteps // group helpersFunctions { /** Loading
ttcn/Security/LibItsSecurity_Templates.ttcn3 +16 −16 Original line number Diff line number Diff line Loading @@ -29,23 +29,23 @@ module LibItsSecurity_Templates { // LibItsSecurity import from LibItsSecurity_TypesAndValues all; import from LibItsSecurity_Pixits all; import from LibItsSecurity_TestSystem { type GnSecurityReq, GnSecurityInd } template (value) GnSecurityReq m_gnSecurityReq( in template (value) SecuredMessage p_msgReq ) := { msgReq := p_msgReq } // End of template m_gnSecurityReq template (present) GnSecurityInd mw_gnSecurityInd( in template (present) SecuredMessage p_msgInd ) := { msgInd := p_msgInd } // End of template mw_gnSecurityIng // import from LibItsSecurity_TestSystem { // type // GnSecurityReq, GnSecurityInd // } // template (value) GnSecurityReq m_gnSecurityReq( // in template (value) SecuredMessage p_msgReq // ) := { // msgReq := p_msgReq // } // End of template m_gnSecurityReq // // template (present) GnSecurityInd mw_gnSecurityInd( // in template (present) SecuredMessage p_msgInd // ) := { // msgInd := p_msgInd // } // End of template mw_gnSecurityIng // /** * @desc Constants declaration */ Loading
ttcn/Security/LibItsSecurity_TestSystem.ttcn3 +130 −130 Original line number Diff line number Diff line Loading @@ -6,134 +6,134 @@ * */ module LibItsSecurity_TestSystem { // LibCommon import from LibCommon_Sync { type ServerSyncComp }; // LibItsCommon import from LibItsCommon_TestSystem all; import from LibItsCommon_TypesAndValues all; // LibItsSecurity import from LibItsSecurity_TypesAndValues all; group portDefinitions { /** * @desc Adapter control port */ type port AdapterControlPort message { out AcGnSecurityPrimitive; in AcGnSecurityResponse; } // End of AdapterControlPort /** * @desc Upper Tester port */ type port UpperTesterPort message { out UtInitialize; in UtInitializeResult; } // End of UpperTesterPort } // End of portDefinitions group interfacePorts { group networkAndTransportPorts { group nt2Ports { /** * @desc NT2 GeoNetworking Secutity Port (GnSec/G5) */ type port GnSecurityPort message { in GnSecurityInd; out GnSecurityReq; } // End of GnSecurityPort } // End of group nt2Ports } // End of group networkAndTransportPorts } // End of group interfacePorts group componentDefinitions { /** * @desc ITS Main Test Component */ type component ItsMtc extends ItsBaseMtc, ServerSyncComp { port UpperTesterPort utPort; port AdapterControlPort acPort; } // End of type ItsMtc /** * @desc ITS System Adapter */ type component ItsGnSecuritySystem { port UpperTesterPort utPort; port AdapterControlPort acPort; // NT2 ports port GnSecurityPort gnSecurityPort; } // End of type ItsGnSecuritySystem } // End of group componentDefinitions type component ItsBaseGnSecurity extends ItsBaseComponent { port UpperTesterPort utPort; port AdapterControlPort acPort; } /** * @desc Test component for ITS Network and Transport layer */ type component ItsGnSecurity extends ItsBaseGnSecurity { // NT2 ports port GnSecurityPort gnSecurityPort; // Variables for GnSecurity } // End of component ItsGeoNetworking group networkAndTransportPrimitives { group nt2Primitives { /** * @desc NT2 GeoNetworking Security Indication Primitive * @member msgInd TODO */ type record GnSecurityInd { SecuredMessage msgInd } // End of type GnSecurityInd /** * @desc NT2 GeoNetworking Security Request Primitive * @member msgReq TODO */ type record GnSecurityReq { SecuredMessage msgReq } // End of type GnSecurityReq } // End of group nt2Primitives } // End of group networkAndTransportPrimitives with { encode "LibIts_Interface" } // End of group interfacePrimitives // // // LibCommon // import from LibCommon_Sync { // type ServerSyncComp // }; // // // LibItsCommon // import from LibItsCommon_TestSystem all; // import from LibItsCommon_TypesAndValues all; // // // LibItsSecurity // import from LibItsSecurity_TypesAndValues all; // // group portDefinitions { // // /** // * @desc Adapter control port // */ // type port AdapterControlPort message { // out // AcGnSecurityPrimitive; // in // AcGnSecurityResponse; // } // End of AdapterControlPort // // /** // * @desc Upper Tester port // */ // type port UpperTesterPort message { // out // UtInitialize; // in // UtInitializeResult; // } // End of UpperTesterPort // // } // End of portDefinitions // // group interfacePorts { // // group networkAndTransportPorts { // // group nt2Ports { // // /** // * @desc NT2 GeoNetworking Secutity Port (GnSec/G5) // */ // type port GnSecurityPort message { // in GnSecurityInd; // out GnSecurityReq; // } // End of GnSecurityPort // // } // End of group nt2Ports // // } // End of group networkAndTransportPorts // // } // End of group interfacePorts // // group componentDefinitions { // // /** // * @desc ITS Main Test Component // */ // type component ItsMtc extends ItsBaseMtc, ServerSyncComp { // // port UpperTesterPort utPort; // port AdapterControlPort acPort; // // } // End of type ItsMtc // // /** // * @desc ITS System Adapter // */ // type component ItsGnSecuritySystem { // // port UpperTesterPort utPort; // port AdapterControlPort acPort; // // // NT2 ports // port GnSecurityPort gnSecurityPort; // // } // End of type ItsGnSecuritySystem // // } // End of group componentDefinitions // // type component ItsBaseGnSecurity extends ItsBaseComponent { // // port UpperTesterPort utPort; // port AdapterControlPort acPort; // // } // // /** // * @desc Test component for ITS Network and Transport layer // */ // type component ItsGnSecurity extends ItsBaseGnSecurity { // // // NT2 ports // port GnSecurityPort gnSecurityPort; // // // Variables for GnSecurity // // } // End of component ItsGeoNetworking // // group networkAndTransportPrimitives { // // group nt2Primitives { // // /** // * @desc NT2 GeoNetworking Security Indication Primitive // * @member msgInd TODO // */ // type record GnSecurityInd { // SecuredMessage msgInd // } // End of type GnSecurityInd // // /** // * @desc NT2 GeoNetworking Security Request Primitive // * @member msgReq TODO // */ // type record GnSecurityReq { // SecuredMessage msgReq // } // End of type GnSecurityReq // // } // End of group nt2Primitives // // } // End of group networkAndTransportPrimitives // with { // encode "LibIts_Interface" // } // End of group interfacePrimitives // } // End of module LibItsSecurity_TestSystem No newline at end of file