First code commit
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..3534f2f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,277 @@
+Eclipse Public License - v 2.0
+
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+ a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+
+ b) in the case of each subsequent Contributor:
+ i) changes to the Program, and
+ ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ "originates" from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+
+"Contributor" means any person or entity that Distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+"Program" means the Contributions Distributed in accordance with this
+Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+"Derivative Works" shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+"Modified Works" shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+"Distribute" means the acts of a) distributing or b) making available
+in any manner that enables the transfer of a copy.
+
+"Source Code" means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+"Secondary License" means either the GNU General Public License,
+Version 2.0, or any later versions of that license, including any
+exceptions or additional permissions as identified by the initial
+Contributor.
+
+2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby
+ assumes sole responsibility to secure any other intellectual
+ property rights needed, if any. For example, if a third party
+ patent license is required to allow Recipient to Distribute the
+ Program, it is Recipient's responsibility to acquire that license
+ before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+
+ e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License
+ (if permitted under the terms of Section 3).
+
+3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+
+ ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+
+ iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+
+ iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements
+ of this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ a) it must be made available under this Agreement, or if the
+ Program (i) is combined with other material in a separate file or
+ files made available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+
+ b) a copy of this Agreement must be included with each copy of
+ the Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability ("notices") contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program,
+the Contributor who includes the Program in a commercial product
+offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes
+the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and indemnify every
+other Contributor ("Indemnified Contributor") against any losses,
+damages and costs (collectively "Losses") arising from claims, lawsuits
+and other legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the Program
+in a commercial product offering. The obligations in this section do not
+apply to any claims or Losses relating to any actual or alleged
+intellectual property infringement. In order to qualify, an Indemnified
+Contributor must: a) promptly notify the Commercial Contributor in
+writing of such claim, and b) allow the Commercial Contributor to control,
+and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those performance
+claims and warranties, and if a court requires any other Contributor to
+pay any damages as a result, the Commercial Contributor must pay
+those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs
+or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further
+action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other software
+or hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of
+time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use
+and distribution of the Program as soon as reasonably practicable.
+However, Recipient's obligations under this Agreement and any licenses
+granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and
+may only be modified in the following manner. The Agreement Steward
+reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement
+Steward has the right to modify this Agreement. The Eclipse Foundation
+is the initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is published,
+Contributor may elect to Distribute the Program (including its
+Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+Exhibit A - Form of Secondary Licenses Notice
+
+"This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}."
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a LICENSE
+ file in a relevant directory) where a recipient would be likely to
+ look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
\ No newline at end of file
diff --git a/V5_CNL113813.tpd b/V5_CNL113813.tpd
new file mode 100644
index 0000000..f2f445a
--- /dev/null
+++ b/V5_CNL113813.tpd
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TITAN_Project_File_Information version="1.0">
+ <ProjectName>V5_CNL113813</ProjectName>
+ <ReferencedProjects>
+ <ReferencedProject name="ProtocolModules_Common" projectLocationURI="../COMMON/ProtocolModules_Common.tpd"/>
+ </ReferencedProjects>
+ <Folders>
+ <FolderResource projectRelativePath="src" relativeURI="src"/>
+ </Folders>
+ <Files>
+ <FileResource projectRelativePath="src/V5_Types.ttcn" relativeURI="src/V5_Types.ttcn"/>
+ </Files>
+ <ActiveConfiguration>Default</ActiveConfiguration>
+ <Configurations>
+ <Configuration name="Default">
+ <ProjectProperties>
+ <MakefileSettings>
+ <generateInternalMakefile>true</generateInternalMakefile>
+ <GNUMake>true</GNUMake>
+ <incrementalDependencyRefresh>true</incrementalDependencyRefresh>
+ <targetExecutable>bin/V5_CNL113813</targetExecutable>
+ <buildLevel>Level3-Creatingobjectfileswithdependencyupdate</buildLevel>
+ </MakefileSettings>
+ <LocalBuildSettings>
+ <workingDirectory>bin</workingDirectory>
+ </LocalBuildSettings>
+ </ProjectProperties>
+ </Configuration>
+ </Configurations>
+</TITAN_Project_File_Information>
\ No newline at end of file
diff --git a/doc/V5_CNL113813_1551.doc b/doc/V5_CNL113813_1551.doc
new file mode 100644
index 0000000..c641f73
--- /dev/null
+++ b/doc/V5_CNL113813_1551.doc
Binary files differ
diff --git a/doc/V5_CNL113813_PRI.doc b/doc/V5_CNL113813_PRI.doc
new file mode 100644
index 0000000..ea5172b
--- /dev/null
+++ b/doc/V5_CNL113813_PRI.doc
Binary files differ
diff --git a/src/V5_Types.ttcn b/src/V5_Types.ttcn
new file mode 100644
index 0000000..4913458
--- /dev/null
+++ b/src/V5_Types.ttcn
@@ -0,0 +1,1313 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2000-2018 Ericsson Telecom AB
+// All rights reserved. This program and the accompanying materials
+// are made available under the terms of the Eclipse Public License v2.0
+// which accompanies this distribution, and is available at
+// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
+///////////////////////////////////////////////////////////////////////////////
+//
+// File: V5_Types.ttcn
+// Description:
+// Rev: <RnXnn>
+// Prodnr: CNL 113 813
+// Updated: 2015-01-28
+// Contact: http://ttcn.ericsson.se
+//
+//
+module V5_Types {
+import from General_Types all;
+
+external function ef_PSTN_enc(in PSTN_Message pl_pdu, out octetstring pl_stream)
+with {
+ extension "prototype(fast)";
+ extension "encode(RAW)";
+}
+
+external function ef_PSTN_dec(in octetstring pl_stream, out PSTN_Message pl_pdu)
+with {
+ extension "prototype(fast)";
+ extension "decode(RAW)";
+}
+external function ef_CNTRL_enc(in CNTRL_Message pl_pdu, out octetstring pl_stream)
+with {
+ extension "prototype(fast)";
+ extension "encode(RAW)";
+}
+
+external function ef_CNTRL_dec(in octetstring pl_stream, out CNTRL_Message pl_pdu)
+with {
+ extension "prototype(fast)";
+ extension "decode(RAW)";
+}
+external function ef_PROT_enc(in PROT_Message pl_pdu, out octetstring pl_stream)
+with {
+ extension "prototype(fast)";
+ extension "encode(RAW)";
+}
+
+external function ef_PROT_dec(in octetstring pl_stream, out PROT_Message pl_pdu)
+with {
+ extension "prototype(fast)";
+ extension "decode(RAW)";
+}
+external function ef_BCC_enc(in BCC_Message pl_pdu, out octetstring pl_stream)
+with {
+ extension "prototype(fast)";
+ extension "encode(RAW)";
+}
+
+external function ef_BCC_dec(in octetstring pl_stream, out BCC_Message pl_pdu)
+with {
+ extension "prototype(fast)";
+ extension "decode(RAW)";
+}
+external function ef_LINKCNTRL_enc(in LINKCNTRL_Message pl_pdu, out octetstring pl_stream)
+with {
+ extension "prototype(fast)";
+ extension "encode(RAW)";
+}
+
+external function ef_LINKCNTRL_dec(in octetstring pl_stream, out LINKCNTRL_Message pl_pdu)
+with {
+ extension "prototype(fast)";
+ extension "decode(RAW)";
+}
+
+type record PSTN_Message {
+ BIT8 protDiscr,
+ PSTNL3Address pstnL3Addr,
+ MessageTypeIdentifier msgTypeId,
+ PSTNMessageBodies msgBody
+} with {
+ variant "PRESENCE (protDiscr = '01001000'B)";
+ variant (msgTypeId) "FIELDLENGTH(8)";
+ variant (msgBody) "CROSSTAG (
+ pstnEstablish, {msgTypeId = PSTN_ESTABLISH};
+ pstnEstablishAck, {msgTypeId = PSTN_ESTABLISH_ACK};
+ pstnSignal, {msgTypeId = PSTN_SIGNAL};
+ pstnSignalAck, {msgTypeId = PSTN_SIGNAL_ACK};
+ pstnDisconnect, {msgTypeId = PSTN_DISCONNECT};
+ pstnDisconnectComplete, {msgTypeId = PSTN_DISCONNECT_COMPLETE};
+ pstnStatusEnquiry, {msgTypeId = PSTN_STATUS_ENQUIRY};
+ pstnStatus, {msgTypeId = PSTN_STATUS};
+ pstnProtocolParameter, {msgTypeId = PSTN_PROTOCOL_PARAMETER};
+ )";
+
+}
+
+type union PSTNMessageBodies {
+ PSTN_ESTABLISH pstnEstablish,
+ PSTN_ESTABLISH_ACK pstnEstablishAck,
+ PSTN_SIGNAL pstnSignal,
+ PSTN_SIGNAL_ACK pstnSignalAck,
+ PSTN_DISCONNECT pstnDisconnect,
+ PSTN_DISCONNECT_COMPLETE pstnDisconnectComplete,
+ PSTN_STATUS_ENQUIRY pstnStatusEnquiry,
+ PSTN_STATUS pstnStatus,
+ PSTN_PROTOCOL_PARAMETER pstnProtocolParameter
+} with {
+ variant ""
+}
+
+type record CNTRL_Message {
+ BIT8 protDiscr,
+ CNTRLL3Address cntrlL3Addr,
+ MessageTypeIdentifier msgTypeId,
+ CNTRLMessageBodies msgBody
+} with {
+ variant "PRESENCE (protDiscr = '01001000'B)";
+ variant (msgTypeId) "FIELDLENGTH(8)";
+ variant (msgBody)
+ "CROSSTAG (
+ cntrlPortControl, {msgTypeId = CNTRL_PORT_CONTROL};
+ cntrlPortControlAck, {msgTypeId = CNTRL_PORT_CONTROL_ACK};
+ cntrlCommonControl, {msgTypeId = CNTRL_COMMON_CONTROL};
+ cntrlCommonControlAck, {msgTypeId = CNTRL_COMMON_CONTROL_ACK};
+ )";
+}
+
+type union CNTRLMessageBodies {
+ CNTRL_PORT_CONTROL cntrlPortControl,
+ CNTRL_PORT_CONTROL_ACK cntrlPortControlAck,
+ CNTRL_COMMON_CONTROL cntrlCommonControl,
+ CNTRL_COMMON_CONTROL_ACK cntrlCommonControlAck
+} with {
+ variant ""
+}
+
+type record PROT_Message {
+ BIT8 protDiscr,
+ LogicalC_ChannelId logc_channelId,
+ MessageTypeIdentifier msgTypeId,
+ PROTMessageBodies msgBody
+} with {
+ variant "PRESENCE (protDiscr = '01001000'B)";
+ variant (msgTypeId) "FIELDLENGTH(8)";
+ variant (msgBody)
+ "CROSSTAG (
+ protSwitchOverReq, {msgTypeId = PROT_SWITCH_OVER_REQ};
+ protSwitchOverCom, {msgTypeId = PROT_SWITCH_OVER_COM};
+ protOsSwitchOverCom, {msgTypeId = PROT_OS_SWITCH_OVER_COM};
+ protSwitchOverAck, {msgTypeId = PROT_SWITCH_OVER_ACK};
+ protSwitchOverRej, {msgTypeId = PROT_SWITCH_OVER_REJECT};
+ protProtErr, {msgTypeId = PROT_PROTOCOL_ERROR};
+ protResetSnCom, {msgTypeId = PROT_RESET_SN_COM};
+ protResetSnAck, {msgTypeId = PROT_RESET_SN_ACK};
+ )";
+}
+
+type union PROTMessageBodies {
+ PROT_SWITCH_OVER_REQ protSwitchOverReq,
+ PROT_SWITCH_OVER_COM protSwitchOverCom,
+ PROT_OS_SWITCH_OVER_COM protOsSwitchOverCom,
+ PROT_SWITCH_OVER_ACK protSwitchOverAck,
+ PROT_SWITCH_OVER_REJECT protSwitchOverRej,
+ PROT_PROTOCOL_ERROR protProtErr,
+ PROT_RESET_SN_COM protResetSnCom,
+ PROT_RESET_SN_ACK protResetSnAck
+} with {
+ variant ""
+}
+
+type record BCC_Message {
+ BIT8 protDiscr,
+ BCCReferenceNumber bccRefNum,
+ MessageTypeIdentifier msgTypeId,
+ BCCMessageBodies msgBody
+} with {
+ variant "PRESENCE (protDiscr = '01001000'B)";
+ variant (msgTypeId) "FIELDLENGTH(8)";
+ variant (msgBody)
+ "CROSSTAG (
+ bccAlloc, {msgTypeId = BCC_ALLOCATION};
+ bccAllocCompl, {msgTypeId = BCC_ALLOCATION_COMPLETE};
+ bccAllocRej, {msgTypeId = BCC_ALLOCATION_REJECT};
+ bccDealloc, {msgTypeId = BCC_DEALLOCATION};
+ bccDeallocCompl, {msgTypeId = BCC_DEALLOCATION_COMPLETE};
+ bccDeallocRej, {msgTypeId = BCC_DEALLOCATION_REJECT};
+ bccAudit, {msgTypeId = BCC_AUDIT};
+ bccAuditCompl, {msgTypeId = BCC_AUDIT_COMPLETE};
+ bccAnFault, {msgTypeId = BCC_AN_FAULT};
+ bccAnFaultAck, {msgTypeId = BCC_AN_FAULT_ACK};
+ bccProtErr, {msgTypeId = BCC_PROTOCOL_ERROR}
+ )";
+}
+
+type union BCCMessageBodies {
+ BCC_ALLOCATION bccAlloc,
+ BCC_ALLOCATION_COMPLETE bccAllocCompl,
+ BCC_ALLOCATION_REJECT bccAllocRej,
+ BCC_DEALLOCATION bccDealloc,
+ BCC_DEALLOCATION_COMPLETE bccDeallocCompl,
+ BCC_DEALLOCATION_REJECT bccDeallocRej,
+ BCC_AUDIT bccAudit,
+ BCC_AUDIT_COMPLETE bccAuditCompl,
+ BCC_AN_FAULT bccAnFault,
+ BCC_AN_FAULT_ACK bccAnFaultAck,
+ BCC_PROTOCOL_ERROR bccProtErr
+} with {
+ variant ""
+}
+
+type record LINKCNTRL_Message {
+ BIT8 protDiscr,
+ LinkCntrlL3Address linkCntrlL3Addr,
+ MessageTypeIdentifier msgTypeId,
+ LINKCNTLRMessageBodies msgBody
+} with {
+ variant "PRESENCE (protDiscr = '01001000'B)";
+ variant (msgTypeId) "FIELDLENGTH(8)";
+ variant (msgBody)
+ "CROSSTAG (
+ linkControl, {msgTypeId = LINK_CONTROL};
+ linkControlAck, {msgTypeId = LINK_CONTROL_ACK};
+ )";
+}
+
+type union LINKCNTLRMessageBodies {
+ LINK_CONTROL linkControl,
+ LINK_CONTROL_ACK linkControlAck
+} with {
+ variant ""
+}
+
+type record EnvelopeFunctionAddress {
+ BIT6 EfAddr_0,
+ BIT1 zero,
+ BIT1 EA_0,
+ BIT7 EFAddr_1,
+ BIT1 EA_1
+} with {
+ variant "PRESENCE (zero = '0'B)"
+ variant "PRESENCE (EA_0 = '0'B)"
+ variant "PRESENCE (EA_1 = '1'B)"
+}
+
+type record EnvelopeFunction {
+ BIT8 FLAG_0,
+ EnvelopeFunctionAddress EFAddr,
+ octetstring information length(3..531),
+ BIT16 FCS,
+ BIT8 FLAG_1
+} with {
+ variant "PRESENCE (FLAG_0 = '01111110'B)";
+ variant "PRESENCE (FLAG_1 = '01111110'B)";
+}
+
+type record LinkAddress {
+ BIT6 V5DLaddr_0,
+ BIT1 CR,
+ BIT1 EA_0,
+ BIT7 V5DLaddr_1,
+ BIT1 EA_1
+} with {
+ variant "PRESENCE(EA_0 = '0'B)";
+ variant "PRESENCE(EA_1 = '1'B)";
+}
+
+type record Data_LinkSublayerFrame {
+ LinkAddress linkAddr,
+ BIT16 cntrl,
+ octetstring information length(0..260) optional
+}
+
+/////////////////////////////////
+//
+// PSTN Protocol Messages
+//
+////////////////////////////////
+
+type record PSTNL3Address {
+ BIT7 address_0,
+ BIT1 padding,
+ BIT8 address_1
+} with {
+ variant "PRESENCE (padding = '1'B)";
+}
+
+type enumerated MessageTypeIdentifier {
+ //0 0 0 - - - - PSTN protocol message types
+ //0 0 0 0 - - - Path establishment messages
+ PSTN_ESTABLISH (0),
+ PSTN_ESTABLISH_ACK (1),
+ PSTN_SIGNAL (2),
+ PSTN_SIGNAL_ACK (3),
+ //0 0 0 1 0 - - Path clearing messages
+ PSTN_DISCONNECT (8),
+ PSTN_DISCONNECT_COMPLETE (9),
+ //0 0 0 1 1 - - Other messages
+ PSTN_STATUS_ENQUIRY (12),
+ PSTN_STATUS (13),
+ PSTN_PROTOCOL_PARAMETER (14),
+
+ //0 0 1 0 - - - Control protocol message types
+ CNTRL_PORT_CONTROL (16),
+ CNTRL_PORT_CONTROL_ACK (17),
+ CNTRL_COMMON_CONTROL (18),
+ CNTRL_COMMON_CONTROL_ACK (19),
+
+ //0 0 1 1 - - - Protection protocol message types
+ PROT_SWITCH_OVER_REQ (24),
+ PROT_SWITCH_OVER_COM (25),
+ PROT_OS_SWITCH_OVER_COM (26),
+ PROT_SWITCH_OVER_ACK (27),
+ PROT_SWITCH_OVER_REJECT (28),
+ PROT_PROTOCOL_ERROR (29),
+ PROT_RESET_SN_COM (30),
+ PROT_RESET_SN_ACK (31),
+
+ //0 1 0 - - - - BCC protocol message types
+ BCC_ALLOCATION (32),
+ BCC_ALLOCATION_COMPLETE (33),
+ BCC_ALLOCATION_REJECT (34),
+ BCC_DEALLOCATION (35),
+ BCC_DEALLOCATION_COMPLETE (36),
+ BCC_DEALLOCATION_REJECT (37),
+ BCC_AUDIT (38),
+ BCC_AUDIT_COMPLETE (39),
+ BCC_AN_FAULT (40),
+ BCC_AN_FAULT_ACK (41),
+ BCC_PROTOCOL_ERROR (42),
+
+ //0 1 1 - - - - Link control message types
+ LINK_CONTROL (48),
+ LINK_CONTROL_ACK (49)
+}
+
+type enumerated PSTNInformationElementIdentifier {
+ //SINGLE OCTET
+ pulseNotif (192),
+ lineInfo (8),
+ state (9),
+ autoSignSeq (10),
+ seqResp (11),
+
+ //VARIABLE LENGTH
+ seqNum (0),
+ cadencedRinging (1),
+ pulsedSignal (2),
+ steadySignal (3),
+ digitSignal (4),
+ recognTime (16),
+ enableAutoAck (17),
+ disableAutoAck (18),
+ cause (19),
+ resourceUnavail (20),
+ enableMetering (34),
+ meteringReport (35),
+ attenuation (36)
+}
+
+type union PSTNInformationElement {
+ //SINGLE OCTET
+ PulseNotification pulseNotif,
+ LineInformation lineInfo,
+ State state,
+ AutonomousSignallingSequence autoSignSeq,
+ SequenceResponse seqResp,
+
+ //VARIABLE LENGTH
+ PSTNSequenceNumber seqNum,
+ CadencedRinging cadencedRinging,
+ PulsedSignal pulsedSignal,
+ SteadySignal steadySignal,
+ DigitSignal digitSignal,
+ RecognitionTime recognTime,
+ EnableAutonomousAcknowledge enableAutoAck,
+ DisableAutonomousAcknowledge disableAutoAck,
+ Cause cause,
+ ResourceUnavailable resourceUnavail,
+ EnableMetering enableMetering,
+ MeteringReport meteringReport,
+ Attenuation attenuation
+} with {
+ variant "TAG( pulseNotif, identifier = pulseNotif;
+ lineInfo, identifier = lineInfo;
+ state, identifier = state;
+ autoSignSeq, identifier = autoSignSeq;
+ seqResp, identifier = seqResp;
+ seqNum, identifier = seqNum;
+ cadencedRinging, identifier = cadencedRinging;
+ pulsedSignal, identifier = pulsedSignal;
+ steadySignal, identifier = steadySignal;
+ digitSignal, identifier = digitSignal;
+ recognTime, identifier = recognTime;
+ enableAutoAck, identifier = enableAutoAck;
+ disableAutoAck, identifier = disableAutoAck;
+ cause, identifier = cause;
+ resourceUnavail, identifier = resourceUnavail;
+ enableMetering, identifier = enableMetering;
+ meteringReport, identifier = meteringReport;
+ attenuation, identifier = attenuation;
+ )";
+}
+
+
+//SIGNEL OCTET
+type record PulseNotification {
+ PSTNInformationElementIdentifier identifier
+}with {
+ variant "PRESENCE (identifier = pulseNotif)";
+ variant (identifier) "FIELDLENGTH(8)"
+}
+
+type record LineInformation {
+ PSTNInformationElementIdentifier identifier,
+ BIT4 lineInfoParam ('0000'B, '0001'B, '0010'B, '0011'B, '0100'B)
+}with {
+ variant "PRESENCE (identifier = lineInfo)";
+ variant (identifier) "FIELDLENGTH(4)"
+}
+
+type record State {
+ PSTNInformationElementIdentifier identifier,
+ BIT4 pstnFsmState
+}with {
+ variant "PRESENCE (identifier = state)";
+ variant (identifier) "FIELDLENGTH(4)";
+}
+
+type enumerated PstnFsmState {
+ AN0 (0),
+ AN1 (1),
+ AN2 (2),
+ AN3 (3),
+ AN4 (4),
+ AN5 (5),
+ AN6 (6),
+ AN7 (7)
+}
+
+type record AutonomousSignallingSequence {
+ PSTNInformationElementIdentifier identifier,
+ BIT4 seqType
+}with {
+ variant "PRESENCE (identifier = autoSignSeq)";
+ variant (identifier) "FIELDLENGTH(4)";
+}
+
+type record SequenceResponse {
+ PSTNInformationElementIdentifier identifier,
+ BIT4 seqRespType
+}with {
+ variant "PRESENCE (identifier = seqResp)";
+ variant (identifier) "FIELDLENGTH(4)";
+}
+
+type record PSTNSequenceNumber {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b seqNum
+} with {
+ variant "PRESENCE (identifier = seqNum)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, seqNum)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record CadencedRinging {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ BIT7 cadencedRingingType
+} with {
+ variant "PRESENCE (identifier = cadencedRinging)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, cadencedRingingType)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record PulsedSignal {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b pulseType (107..127),
+ BIT1 ext_1 optional,
+ BIT2 supprIndicator optional,
+ INT5b pulseDurationType optional,
+ BIT1 ext_2 optional,
+ BIT2 ackReqIndicator optional,
+ INT5b nofPulses (1..31) optional
+} with {
+ variant "PRESENCE (identifier = pulsedSignal)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant "PRESENCE (ext_2 = '1'B)";
+ variant (ackReqIndicator, nofPulses) "PRESENCE (ext_1 = '0'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, pulseType, ext_1, supprIndicator, pulseDurationType, ext_2, ackReqIndicator, nofPulses)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record SteadySignal {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b steadySignType (0..26, 29..30)
+} with {
+ variant "PRESENCE (identifier = steadySignal)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, steadySignType)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record DigitSignal {
+ PSTNInformationElementIdentifier identifier (digitSignal),
+ LIN1 length_,
+ BIT1 ext_0,
+ BIT1 digitAckReqInd,
+ BIT2 spare,
+ INT4b digitInformation
+} with {
+ variant "PRESENCE (identifier = digitSignal)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant "PRESENCE (spare = '00'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, digitAckReqInd, spare, digitInformation)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record RecognitionTime {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b signal (0..26, 29..30, 107..127),
+ BIT1 ext_1,
+ BIT1 spare,
+ INT6b durationType
+} with {
+ variant "PRESENCE (identifier = recognTime)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant "PRESENCE (ext_1 = '1'B)";
+ variant "PRESENCE (spare = '0'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, signal, ext_1, spare, durationType)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record EnableAutonomousAcknowledgePulsedExt {
+ BIT1 ext_0,
+ BIT2 supprIndicator,
+ BIT5 pulseDurationType,
+ BIT1 ext_1 optional,
+ BIT2 ackReqIndicator optional,
+ INT5b nofPulses (1..31) optional
+} with {
+ variant (ackReqIndicator, nofPulses) "PRESENCE(ext_0 = '0'B)";
+ variant "PRESENCE(ext_1 = '1'B)";
+}
+
+type record EnableAutonomousAcknowledge {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b signal (0..26, 29..30, 107..127),
+ BIT1 ext_1,
+ INT7b response (0..26, 29..30, 107..127),
+ EnableAutonomousAcknowledgePulsedExt pulsedExt optional
+} with {
+ variant "PRESENCE (identifier = enableAutoAck)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant "PRESENCE (ext_1 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, signal, ext_1, response, pulsedExt)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record DisableAutonomousAcknowledge {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b signal (0..26, 29..30, 107..127)
+} with {
+ variant "PRESENCE (identifier = disableAutoAck)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, signal)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record Diagnostic {
+ BIT1 zero optional,
+ MessageTypeIdentifier msgTypeId optional,
+ PSTNInformationElementIdentifier infoElementId optional
+} with {
+ variant "PRESENCE (zero = '0'B)";
+ variant (msgTypeId) "FIELDLENGTH(7)";
+ variant (infoElementId) "FIELDLENGTH(8)";
+}
+
+type record Cause {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b causeType (0..1, 3..13),
+ Diagnostic diagnostic optional
+} with {
+ variant "PRESENCE (identifier = cause)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, causeType, diagnostic)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record ResourceUnavailable {
+ PSTNInformationElementIdentifier identifier (resourceUnavail),
+ LIN1 length_,
+ PSTNInformationElement infoElement optional
+} with {
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(infoElement)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record EnableMetering {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b pulseType (107..127),
+ BIT1 ext_1,
+ INT7b rateType,
+ BIT1 ext_2 optional,
+ INT7b reportPulseCount optional,
+ BIT1 ext_3 optional,
+ BIT2 repIndicator optional,
+ INT5b reportPulseCount_low (1..31) optional,
+ BIT1 ext_4 optional,
+ BIT2 supprIndicator optional,
+ INT7b pulseDurationType optional
+} with {
+ variant "PRESENCE (identifier = enableMetering)";
+ variant "PRESENCE (ext_0 = '0'B)";
+ variant (reportPulseCount, repIndicator, reportPulseCount_low)"PRESENCE (ext_1 = '0'B)";
+ variant "PRESENCE (ext_2 = '0'B)";
+ variant "PRESENCE (ext_3 = '1'B)";
+ variant "PRESENCE (ext_4 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, pulseType, ext_1, rateType, ext_2, reportPulseCount, ext_3, repIndicator, reportPulseCount_low, ext_4, supprIndicator, supprIndicator)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record MeteringReport {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b pulseCount_0,
+ BIT1 ext_1,
+ BIT1 reportType,
+ INT6b pulseCount_1,
+ BIT1 ext_2 optional,
+ INT7b failureReason (0..1) optional
+} with {
+ variant "PRESENCE (identifier = meteringReport)";
+ variant "PRESENCE (ext_0 = '0'B)";
+ variant "PRESENCE (ext_1 = '0'B)";
+ variant "PRESENCE (ext_2 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)"
+ variant (length_) "LENGTHTO(ext_0, pulseCount_0, ext_1, reportType, pulseCount_1, ext_2, failureReason)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record Attenuation {
+ PSTNInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b attenValue
+} with {
+ variant "PRESENCE (identifier = attenuation)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, attenValue)";
+ variant (length_) "UNIT(octets)"
+}
+
+//////////////////////////////
+//
+//NOTE: Based on the standard only one field can be used from the optional fields in the PSTN messages
+//
+//////////////////////////////
+
+
+type record PSTN_ESTABLISH {
+ LineInformation lineInfo optional,
+ AutonomousSignallingSequence autoSignSeq optional,
+ CadencedRinging cadencedRinging optional,
+ PulsedSignal pulsedSign optional,
+ SteadySignal steadySign optional
+}
+
+type record PSTN_ESTABLISH_ACK {
+ AutonomousSignallingSequence autoSignSeq optional,
+ PulsedSignal pulsedSign optional,
+ SteadySignal steadySign optional
+}
+
+type record PSTN_SIGNAL {
+ PSTNSequenceNumber seqNum,
+ PulseNotification pulseNotif optional,
+ AutonomousSignallingSequence autoSignSeq optional,
+ SequenceResponse seqResp optional,
+ CadencedRinging cadancedRinging optional,
+ PulsedSignal pulsedSign optional,
+ SteadySignal steadySign optional,
+ DigitSignal digitSign optional,
+ ResourceUnavailable resourceUnavail optional,
+ EnableMetering enableMetering optional,
+ MeteringReport meteringReport optional,
+ Attenuation attenuation optional
+}
+
+type record PSTN_SIGNAL_ACK {
+ PSTNSequenceNumber seqNum
+}
+
+type record PSTN_STATUS {
+ State state,
+ Cause cause
+}
+
+type record PSTN_STATUS_ENQUIRY {
+}
+
+type record PSTN_DISCONNECT {
+ SteadySignal steadySign optional
+}
+
+type record PSTN_DISCONNECT_COMPLETE {
+ SteadySignal steadySign optional
+}
+
+type record PSTN_PROTOCOL_PARAMETER {
+ PSTNSequenceNumber seqNum,
+ RecognitionTime recognTime optional,
+ EnableAutonomousAcknowledge enableAutoAck optional,
+ DisableAutonomousAcknowledge disableAutoAck optional
+}
+
+//////////////////////////////
+//
+//Control Protocol Messages
+//
+//////////////////////////////
+
+type integer ZeroValueInt (0);
+
+type union SecondBitOf1stOctet { // this needed for the workaround which provides that
+ integer anyvalue, // the 2nd bit in the 1st octet must be zero if the 1st octet is 1
+ ZeroValueInt zerovalue
+}
+
+type record CNTRLL3Address {
+ BIT6 l3Addr_0,
+ SecondBitOf1stOctet secondBitOf1stOctet,
+ BIT1 pstnOrIsdn, //if 0 ISDN if 1 PSTN
+ BIT8 l3Addr_1
+} with {
+ variant (secondBitOf1stOctet) "CROSSTAG ( zerovalue, {pstnOrIsdn = '0'B};
+ anyvalue, {pstnOrIsdn = '1'B})";
+}
+
+type enumerated CNTRLInformationElementIdentifier {
+ //1 - - - x x x x SINGLE OCTET
+ perfGrad (14),
+ rejCause (15),
+
+ //0 - - - - - - - VARIABLE LENGTH
+ cntrlFncElement (32),
+ cntrlFncId (33),
+ variant_ (34),
+ interfaceId (35)
+}
+
+type union CNTRLInformationElement {
+ //SINGLE OCTET
+ PerformanceGrading perfGrad,
+ CntrlRejectionCause rejCause,
+
+ //VARIABLE LENGTH
+ ControlFunctionElement cntrlFncElement,
+ ControlFunctionId cntrlFncId,
+ Variant variant_,
+ InterfaceId interfaceId
+} with {
+ variant "TAG( perfGrad, identifier = perfGrad;
+ rejCause, identifier = rejCause;
+ cntrlFncElement, identifier = cntrlFncElement;
+ cntrlFncId, identifier = cntrlFncId;
+ variant_, identifier = variant_;
+ interfaceId, identifier = interfaceId;
+ )";
+}
+
+type record PerformanceGrading {
+ CNTRLInformationElementIdentifier identifier,
+ INT4b perfGrad (0..1)
+} with {
+ variant "PRESENCE (identifier = perfGrad)";
+ variant (identifier) "FIELDLENGTH(4)";
+}
+
+type record CntrlRejectionCause {
+ CNTRLInformationElementIdentifier identifier,
+ INT4b rejCause (0..2)
+} with {
+ variant "PRESENCE (identifier = rejCause)";
+ variant (identifier) "FIELDLENGTH(4)";
+}
+
+type record ControlFunctionElement {
+ CNTRLInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b cntrlFncElement (1..6, 17, 19, 21..24)
+} with {
+ variant "PRESENCE (identifier = cntrlFncElement)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, cntrlFncElement)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record ControlFunctionId {
+ CNTRLInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b cntrlFncId (0..8, 16..17)
+} with {
+ variant "PRESENCE (identifier = cntrlFncId)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, cntrlFncId)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record InterfaceId {
+ CNTRLInformationElementIdentifier identifier,
+ LIN1 length_,
+ integer interfaceId (0..16777215)
+} with {
+ variant "PRESENCE (identifier = interfaceId)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (interfaceId) "FIELDLENGTH(24)";
+ variant (length_) "LENGTHTO(interfaceId)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record Variant {
+ CNTRLInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b variant_ (0..127)
+} with {
+ variant "PRESENCE (identifier = variant_)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, variant_)";
+ variant (length_) "UNIT(octets)"
+}
+
+//////////////////////////////
+//
+//NOTE: Based on the standard only one field can be used from the optional fields in the Control messages
+//
+//////////////////////////////
+
+type record CNTRL_PORT_CONTROL {
+ ControlFunctionElement cntrlFncElement,
+ PerformanceGrading perfGrad optional
+}
+
+type record CNTRL_PORT_CONTROL_ACK {
+ ControlFunctionElement cntrlFncElement
+}
+
+type record CNTRL_COMMON_CONTROL {
+ ControlFunctionId cntrlFncId,
+ Variant variant_,
+ CntrlRejectionCause rejCause,
+ InterfaceId interfaceId
+}
+
+type record CNTRL_COMMON_CONTROL_ACK {
+ ControlFunctionId cntrlFncId
+}
+
+//////////////////////////////
+//
+//Link Control Protocol Messages
+//
+//////////////////////////////
+
+type record LinkCntrlL3Address {
+ BIT8 zero,
+ BIT8 l3AddrField
+} with {
+ variant "PRESENCE(zero = '00000000'B)";
+}
+
+type enumerated LinkCntrlInformationElementIdentifier {
+ //0 - - - - - - - VARIABLE LENGTH
+ linkCntrlFnc (48)
+}
+
+type union LinkCntrlInformationElement {
+ //VARIABLE LENGTH
+ LinkControlFunction linkCntrlFnc
+} with {
+ variant "TAG( linkCntrlFnc, identifier = linkCntrlFnc)";
+}
+
+type record LinkControlFunction {
+ LinkCntrlInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b linkCntrlFnc (0..7)
+} with {
+ variant "PRESENCE (identifier = linkCntrlFnc)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, linkCntrlFnc)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record LINK_CONTROL {
+ LinkControlFunction cntrlFncId
+}
+
+type record LINK_CONTROL_ACK {
+ LinkControlFunction cntrlFncId
+}
+
+//////////////////////////////
+//
+//BCC Protocol Messages
+//
+//////////////////////////////
+
+type enumerated BCCInformationElementIdentifier {
+ //0 - - - - - - - VARIABLE LENGTH INFORMATION ELEMENTS
+ usrPortId (64),
+ isdnPortChannelId (65),
+ v5TimeSlotId (66),
+ multiSlotMap (67),
+ rejCause (68),
+ protErrCause (69),
+ connIncompl (70)
+}
+
+type union BCCInformationElement {
+ //VARIABLE LENGTH
+ UserPortId usrPortId,
+ ISDNPortChannelId isdnPortChannelId,
+ V5TimeSlotId v5TimeSlotId,
+ MultiSlotMap multiSlotMap,
+ BccRejectionCause rejCause,
+ ProtocolErrorCause protErrCause,
+ ConnectionIncomplete connIncompl
+} with {
+ variant "TAG( usrPortId, identifier = usrPortId;
+ isdnPortChannelId, identifier = isdnPortChannelId;
+ v5TimeSlotId, identifier = v5TimeSlotId;
+ multiSlotMap, identifier = multiSlotMap;
+ rejCause, identifier = rejCause;
+ protErrCause, identifier = protErrCause;
+ connIncompl, identifier = connIncompl;
+ )";
+}
+
+type record BCCReferenceNumber {
+ BIT1 srcId,
+ BIT7 bccRefNumval_0,
+ BIT2 zero,
+ BIT6 bccRefNumval_1
+} with {
+ variant "PRESENCE(zero = '00'B)";
+}
+
+type record PSTNUserPortIdValue {
+ BIT8 usrPortIdVal_0,
+ BIT1 ext_0,
+ BIT8 usrPortIdVal_1
+} with {
+ variant "PRESENCE(ext_0 = '1'B)";
+}
+
+type record ISDNUserPortIdValue {
+ BIT6 usrPortIdVal_0,
+ BIT2 ext_0,
+ BIT7 usrPortIdVal_1,
+ BIT1 ext_1
+} with {
+ variant "PRESENCE(ext_0 = '0'B)";
+ variant "PRESENCE(ext_1 = '1'B)";
+}
+
+type union UserPortIdValue {
+ PSTNUserPortIdValue pstnUsrPortIdVal,
+ ISDNUserPortIdValue isdnUsrPortIdVal
+} with {
+ variant "TAG (pstnUsrPortIdVal, ext_0 = '1'B;
+ isdnUsrPortIdVal, OTHERWISE)";
+}
+
+type record UserPortId {
+ BCCInformationElementIdentifier identifier,
+ LIN1 length_,
+ UserPortIdValue usrPortIdVal
+} with {
+ variant "PRESENCE (identifier = usrPortId)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (usrPortIdVal) "FIELDLENGTH(16)";
+ variant (length_) "LENGTHTO(usrPortIdVal)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record ISDNPortChannelId {
+ BCCInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT3 ext_0,
+ INT5b isdnPortChannelId (1..31)
+} with {
+ variant "PRESENCE (identifier = isdnPortChannelId)";
+ variant "PRESENCE (ext_0 = '100'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, isdnPortChannelId)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record V5TimeSlotId {
+ BCCInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT8 linkId,
+ BIT3 override_,
+ BIT5 v5TimeSlotNumber
+} with {
+ variant "PRESENCE (identifier = v5TimeSlotId)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(linkId, override_, v5TimeSlotNumber)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record MultiSlotMap {
+ BCCInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT8 linkId,
+ integer v5ts1_31 (0..2147483647),
+ BIT1 ext_0,
+ integer upts1_31 (0..2147483647),
+ BIT1 ext_1
+} with {
+ variant "PRESENCE (identifier = multiSlotMap)";
+ variant "PRESENCE (ext_0 = '0'B)";
+ variant "PRESENCE (ext_1 = '0'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (v5ts1_31) "FIELDLENGTH(31)";
+ variant (upts1_31) "FIELDLENGTH(31)";
+ variant (length_) "LENGTHTO(linkId, v5ts1_31, ext_0, upts1_31, ext_1)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record BccRejectionCause {
+ BCCInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b rejCauseType (0..16),
+ BCCInformationElement diagnostic optional
+} with {
+ variant "PRESENCE (identifier = rejCause)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, rejCauseType, diagnostic)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record ProtocolErrorCause {
+ BCCInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b protErrCauseType (1, 4..14),
+ BIT1 ext_1,
+ MessageTypeIdentifier diagnMsgTypeId,
+ BCCInformationElementIdentifier diagnInfoElemenetId
+} with {
+ variant "PRESENCE (identifier = protErrCause)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant "PRESENCE (ext_1 = '0'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (diagnMsgTypeId) "FIELDLENGTH(7)";
+ variant (diagnInfoElemenetId) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, protErrCauseType, ext_1, diagnMsgTypeId, diagnInfoElemenetId)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record ConnectionIncomplete {
+ BCCInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b reason (0..5)
+} with {
+ variant "PRESENCE (identifier = connIncompl)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, reason)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record BCC_ALLOCATION {
+ UserPortId usrPortId,
+ ISDNPortChannelId isdnPortChannelId optional,
+ V5TimeSlotId v5TimeSlotId optional,
+ MultiSlotMap multiSlotMap optional
+}
+
+type record BCC_ALLOCATION_COMPLETE {
+}
+
+type record BCC_ALLOCATION_REJECT {
+ BccRejectionCause rejCause
+}
+
+type record BCC_DEALLOCATION {
+ UserPortId usrPortId,
+ ISDNPortChannelId isdnPortChannelId optional,
+ V5TimeSlotId v5TimeSlotId optional,
+ MultiSlotMap multiSlotMap optional
+}
+
+type record BCC_DEALLOCATION_COMPLETE {
+}
+
+type record BCC_DEALLOCATION_REJECT {
+ BccRejectionCause rejCause
+}
+
+type record BCC_AUDIT {
+ UserPortId usrPortId optional,
+ ISDNPortChannelId isdnPortChannelId optional,
+ V5TimeSlotId v5TimeSlotId optional
+}
+
+type record BCC_AUDIT_COMPLETE {
+ UserPortId usrPortId optional,
+ ISDNPortChannelId isdnPortChannelId optional,
+ V5TimeSlotId v5TimeSlotId optional,
+ ConnectionIncomplete connIncompl optional
+}
+
+type record BCC_AN_FAULT {
+ UserPortId usrPortId optional,
+ ISDNPortChannelId isdnPortChannelId optional,
+ V5TimeSlotId v5TimeSlotId optional
+}
+
+type record BCC_AN_FAULT_ACK {
+}
+
+type record BCC_PROTOCOL_ERROR {
+ ProtocolErrorCause protErrCause
+}
+
+//////////////////////////////
+//
+//Protection Protocol Messages
+//
+//////////////////////////////
+
+type enumerated ProtInformationElementIdentifier {
+ //0 - - - - - - - VARIABLE LENGTH INFORMATION ELEMENTS
+ seqNum (80),
+ phyc_channelId (81),
+ rejCause (82),
+ protErrCause (83)
+}
+
+type union ProtInformationElement {
+ //VARIABLE LENGTH
+ ProtSequenceNumber seqNum,
+ LogicalC_ChannelId logc_channelId,
+ PhysicalC_ChannelId phyc_channelId,
+ ProtRejectionCause rejCause,
+ ProtErrorCause protErrCause
+} with {
+ variant "TAG( seqNum, identifier = seqNum;
+ phyc_channelId, identifier = phyc_channelId;
+ rejCause, identifier = rejCause;
+ protErrCause, identifier = protErrCause;
+ logc_channelId, OTHERWISE
+
+ )";
+}
+
+type record LogicalC_ChannelId {
+ BIT8 logc_channelId_0,
+ BIT8 logc_channelId_1
+} with {
+ variant (logc_channelId_0) "FIELDLENGTH(8)";
+ variant (logc_channelId_1) "FIELDLENGTH(8)";
+}
+
+type record ProtSequenceNumber {
+ ProtInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b seqNum (0..127)
+} with {
+ variant "PRESENCE (identifier = seqNum)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, seqNum)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record PhysicalC_ChannelId {
+ ProtInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT8 v5LinkId,
+ integer v5TimeSlot (0..31)
+} with {
+ variant "PRESENCE (identifier = phyc_channelId)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "FIELDLENGTH(8)";
+ variant (v5LinkId) "FIELDLENGTH(8)";
+ variant (v5TimeSlot) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(v5LinkId, v5TimeSlot)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record ProtRejectionCause {
+ ProtInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b rejCauseType (0..6)
+} with {
+ variant "PRESENCE (identifier = rejCause)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, rejCauseType)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record ProtErrorCause {
+ ProtInformationElementIdentifier identifier,
+ LIN1 length_,
+ BIT1 ext_0,
+ INT7b protErrCauseType (1, 4, 7..9, 11..13, 15),
+ BIT1 ext_1,
+ MessageTypeIdentifier diagnMsgTypeId,
+ ProtInformationElementIdentifier diagnInfoElementId
+} with {
+ variant "PRESENCE (identifier = protErrCause)";
+ variant "PRESENCE (ext_0 = '1'B)";
+ variant "PRESENCE (ext_1 = '0'B)";
+ variant (identifier) "FIELDLENGTH(8)";
+ variant (diagnMsgTypeId) "FIELDLENGTH(7)";
+ variant (diagnInfoElementId) "FIELDLENGTH(8)";
+ variant (length_) "LENGTHTO(ext_0, protErrCauseType, ext_1, diagnMsgTypeId, diagnInfoElementId)";
+ variant (length_) "UNIT(octets)"
+}
+
+type record PROT_SWITCH_OVER_REQ {
+ ProtSequenceNumber seqNum,
+ PhysicalC_ChannelId phyc_channelId
+}
+
+type record PROT_SWITCH_OVER_COM {
+ ProtSequenceNumber seqNum,
+ PhysicalC_ChannelId phyc_channelId
+}
+
+type record PROT_OS_SWITCH_OVER_COM {
+ ProtSequenceNumber seqNum,
+ PhysicalC_ChannelId phyc_channelId
+}
+
+type record PROT_SWITCH_OVER_ACK {
+ ProtSequenceNumber seqNum,
+ PhysicalC_ChannelId phyc_channelId
+}
+
+type record PROT_SWITCH_OVER_REJECT {
+ ProtSequenceNumber seqNum,
+ PhysicalC_ChannelId phyc_channelId,
+ ProtRejectionCause rejCause
+}
+
+type record PROT_PROTOCOL_ERROR {
+ ProtSequenceNumber seqNum,
+ PhysicalC_ChannelId phyc_channelId,
+ ProtErrorCause protErrCause
+}
+
+type record PROT_RESET_SN_COM {
+}
+
+type record PROT_RESET_SN_ACK {
+}
+} with {
+encode "RAW"
+extension "version <RnXnn>"
+variant "BITORDER(msb)"
+}
\ No newline at end of file
diff --git a/test/V5_CNL113813_test.tpd b/test/V5_CNL113813_test.tpd
new file mode 100644
index 0000000..00b7a02
--- /dev/null
+++ b/test/V5_CNL113813_test.tpd
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TITAN_Project_File_Information version="1.0">
+ <ProjectName>V5_CNL113813_test</ProjectName>
+ <ReferencedProjects>
+ <ReferencedProject name="V5_CNL113813" projectLocationURI="../V5_CNL113813.tpd"/>
+ </ReferencedProjects>
+ <Files>
+ <FileResource projectRelativePath="V5_Test.ttcn" relativeURI="V5_Test.ttcn"/>
+ <FileResource projectRelativePath="cfg.cfg" relativeURI="cfg.cfg"/>
+ </Files>
+ <ActiveConfiguration>Default</ActiveConfiguration>
+ <Configurations>
+ <Configuration name="Default">
+ <ProjectProperties>
+ <MakefileSettings>
+ <generateInternalMakefile>true</generateInternalMakefile>
+ <GNUMake>true</GNUMake>
+ <incrementalDependencyRefresh>true</incrementalDependencyRefresh>
+ <targetExecutable>bin/V5_CNL113813_test</targetExecutable>
+ </MakefileSettings>
+ <LocalBuildSettings>
+ <workingDirectory>bin</workingDirectory>
+ </LocalBuildSettings>
+ </ProjectProperties>
+ </Configuration>
+ </Configurations>
+</TITAN_Project_File_Information>
\ No newline at end of file
diff --git a/test/V5_Test.ttcn b/test/V5_Test.ttcn
new file mode 100644
index 0000000..31fc141
--- /dev/null
+++ b/test/V5_Test.ttcn
@@ -0,0 +1,1589 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2000-2018 Ericsson Telecom AB
+// All rights reserved. This program and the accompanying materials
+// are made available under the terms of the Eclipse Public License v2.0
+// which accompanies this distribution, and is available at
+// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
+///////////////////////////////////////////////////////////////////////////////
+//
+// File: V5_Test.ttcn
+// Description:
+// Rev: <RnXnn>
+// Prodnr: CNL 113 813
+// Updated: 2015-01-28
+// Contact: http://ttcn.ericsson.se
+//
+//
+module V5_Test {
+
+import from V5_Types all;
+
+type component MAIN_CT {}
+
+testcase tc_PSTN_ESTABLISH() runs on MAIN_CT {
+ var PSTN_Message vl_pstn_establish := {
+ protDiscr := '01001000'B,
+ pstnL3Addr := {
+ '0001111'B,
+ '1'B,
+ '00001111'B
+
+ },
+ msgTypeId := PSTN_ESTABLISH,
+ msgBody := {
+ pstnEstablish := {
+ lineInfo := {
+ identifier := lineInfo,
+ lineInfoParam := '0000'B
+ },
+ autoSignSeq := {
+ identifier := autoSignSeq,
+ seqType := '0001'B
+ },
+ cadencedRinging := {
+ identifier := cadencedRinging,
+ length_ := 1,
+ ext_0 := '1'B,
+ cadencedRingingType := '0111000'B
+ },
+ pulsedSign := {
+ identifier := pulsedSignal,
+ length_ := 3,
+ ext_0 := '1'B,
+ pulseType := 107,
+ ext_1 := '0'B,
+ supprIndicator := '11'B,
+ pulseDurationType := 16,
+ ext_2 := '1'B,
+ ackReqIndicator := '10'B,
+ nofPulses := 31
+ },
+ steadySign := {
+ identifier := steadySignal,
+ length_ := 1,
+ ext_0 := '1'B,
+ steadySignType := 29
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PSTN_enc(vl_pstn_establish, vl_stream);
+ var PSTN_Message vl_decoded;
+ ef_PSTN_dec(vl_stream, vl_decoded);
+ if(match(vl_pstn_establish, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_pstn_establish, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PSTN_ESTABLISH_ACK() runs on MAIN_CT {
+ var PSTN_Message vl_pstn_establish_ack := {
+ protDiscr := '01001000'B,
+ pstnL3Addr := {
+ '0001111'B,
+ '1'B,
+ '00001111'B
+ },
+ msgTypeId := PSTN_ESTABLISH_ACK,
+ msgBody := {
+ pstnEstablishAck := {
+ autoSignSeq := {
+ identifier := autoSignSeq,
+ seqType := '0011'B
+ },
+ pulsedSign := {
+ identifier := pulsedSignal,
+ length_ := 3,
+ ext_0 := '1'B,
+ pulseType := 107,
+ ext_1 := '0'B,
+ supprIndicator := '11'B,
+ pulseDurationType := 16,
+ ext_2 := '1'B,
+ ackReqIndicator := '10'B,
+ nofPulses := 31
+ },
+ steadySign := {
+ identifier := steadySignal,
+ length_ := 1,
+ ext_0 := '1'B,
+ steadySignType := 29
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PSTN_enc(vl_pstn_establish_ack, vl_stream);
+ var PSTN_Message vl_decoded;
+ ef_PSTN_dec(vl_stream, vl_decoded);
+ if(match(vl_pstn_establish_ack, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_pstn_establish_ack, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PSTN_SIGNAL() runs on MAIN_CT {
+ var PSTN_Message vl_pstnSignal := {
+ protDiscr := '01001000'B,
+ pstnL3Addr := {
+ '0001111'B,
+ '1'B,
+ '00001111'B
+ },
+ msgTypeId := PSTN_SIGNAL,
+ msgBody := {
+ pstnSignal := {
+ seqNum := {
+ identifier := seqNum,
+ length_ := 1,
+ ext_0 := '1'B,
+ seqNum := 12
+ },
+ pulseNotif := {
+ identifier := pulseNotif
+ },
+ autoSignSeq := {
+ identifier := autoSignSeq,
+ seqType := '0011'B
+ },
+ seqResp := {
+ identifier := seqResp,
+ seqRespType := '0100'B
+ },
+ cadancedRinging := {
+ identifier := cadencedRinging,
+ length_ := 1,
+ ext_0 := '1'B,
+ cadencedRingingType := '0000111'B
+ },
+ pulsedSign := {
+ identifier := pulsedSignal,
+ length_ := 3,
+ ext_0 := '1'B,
+ pulseType := 107,
+ ext_1 := '0'B,
+ supprIndicator := '11'B,
+ pulseDurationType := 12,
+ ext_2 := '1'B,
+ ackReqIndicator := '01'B,
+ nofPulses := 1
+ },
+ steadySign := {
+ identifier := steadySignal,
+ length_ := 1,
+ ext_0 := '1'B,
+ steadySignType := 23
+ },
+ digitSign := {
+ identifier := digitSignal,
+ length_ := 1,
+ ext_0 := '1'B,
+ digitAckReqInd := '1'B,
+ spare := '00'B,
+ digitInformation := 15
+ },
+ resourceUnavail := {
+ identifier := resourceUnavail,
+ length_ := 3,
+ infoElement := {
+ digitSignal := {
+ identifier := digitSignal,
+ length_ := 1,
+ ext_0 := '1'B,
+ digitAckReqInd := '1'B,
+ spare := '00'B,
+ digitInformation := 15
+ }
+ }
+ },
+ enableMetering := {
+ identifier := enableMetering,
+ length_ := 5,
+ ext_0 := '0'B,
+ pulseType := 127,
+ ext_1 := '0'B,
+ rateType := 44,
+ ext_2 := '0'B,
+ reportPulseCount := 33,
+ ext_3 := '1'B,
+ repIndicator := '01'B,
+ reportPulseCount_low := 3,
+ ext_4 := '1'B,
+ supprIndicator := '00'B,
+ pulseDurationType := 9
+ },
+ meteringReport := {
+ identifier := meteringReport,
+ length_ := 3,
+ ext_0 := '0'B,
+ pulseCount_0 := 3,
+ ext_1 := '0'B,
+ reportType := '1'B,
+ pulseCount_1 := 5,
+ ext_2 := '1'B,
+ failureReason := 0
+ },
+ attenuation := {
+ identifier := attenuation,
+ length_ := 1,
+ ext_0 := '1'B,
+ attenValue := 33
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PSTN_enc(vl_pstnSignal, vl_stream);
+ var PSTN_Message vl_decoded;
+ ef_PSTN_dec(vl_stream, vl_decoded);
+ if(match(vl_pstnSignal, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_pstnSignal, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PSTN_SIGNAL_ACK() runs on MAIN_CT {
+ var PSTN_Message vl_pstnSignalAck := {
+ protDiscr := '01001000'B,
+ pstnL3Addr := {
+ '0001111'B,
+ '1'B,
+ '00001111'B
+ },
+ msgTypeId := PSTN_SIGNAL_ACK,
+ msgBody := {
+ pstnSignalAck := {
+ seqNum := {
+ identifier := seqNum,
+ length_ := 1,
+ ext_0 := '1'B,
+ seqNum := 12
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PSTN_enc(vl_pstnSignalAck, vl_stream);
+ var PSTN_Message vl_decoded;
+ ef_PSTN_dec(vl_stream, vl_decoded);
+ if(match(vl_pstnSignalAck, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_pstnSignalAck, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PSTN_STATUS() runs on MAIN_CT {
+ var PSTN_Message vl_pstnStatus := {
+ protDiscr := '01001000'B,
+ pstnL3Addr := {
+ '0001111'B,
+ '1'B,
+ '00001111'B
+ },
+ msgTypeId := PSTN_STATUS,
+ msgBody := {
+ pstnStatus := {
+ state := {
+ identifier := state,
+ pstnFsmState := '0011'B
+ },
+ cause := {
+ identifier := cause,
+ length_ := 3,
+ ext_0 := '1'B,
+ causeType := 13,
+ diagnostic := {
+ zero := '0'B,
+ msgTypeId := PSTN_SIGNAL_ACK,
+ infoElementId := state
+ }
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PSTN_enc(vl_pstnStatus, vl_stream);
+ var PSTN_Message vl_decoded;
+ ef_PSTN_dec(vl_stream, vl_decoded);
+ if(match(vl_pstnStatus, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_pstnStatus, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PSTN_STATUS_ENQUIRY() runs on MAIN_CT {
+ var PSTN_Message vl_pstnStatusEnquiry := {
+ protDiscr := '01001000'B,
+ pstnL3Addr := {
+ '0001111'B,
+ '1'B,
+ '00001111'B
+ },
+ msgTypeId := PSTN_STATUS_ENQUIRY,
+ msgBody := {
+ pstnStatusEnquiry := {}
+ }
+ }
+ var octetstring vl_stream;
+ ef_PSTN_enc(vl_pstnStatusEnquiry, vl_stream);
+ var PSTN_Message vl_decoded;
+ ef_PSTN_dec(vl_stream, vl_decoded);
+ if(match(vl_pstnStatusEnquiry, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_pstnStatusEnquiry, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PSTN_DISCONNECT() runs on MAIN_CT {
+ var PSTN_Message vl_pstnDisconnect := {
+ protDiscr := '01001000'B,
+ pstnL3Addr := {
+ '0001111'B,
+ '1'B,
+ '00001111'B
+ },
+ msgTypeId := PSTN_DISCONNECT,
+ msgBody := {
+ pstnDisconnect := {
+ steadySign := {
+ identifier := steadySignal,
+ length_ := 1,
+ ext_0 := '1'B,
+ steadySignType := 30
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PSTN_enc(vl_pstnDisconnect, vl_stream);
+ var PSTN_Message vl_decoded;
+ ef_PSTN_dec(vl_stream, vl_decoded);
+ if(match(vl_pstnDisconnect, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_pstnDisconnect, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PSTN_DISCONNECT_COMPLETE() runs on MAIN_CT {
+ var PSTN_Message vl_pstnDisconnectComplete := {
+ protDiscr := '01001000'B,
+ pstnL3Addr := {
+ '0001111'B,
+ '1'B,
+ '00001111'B
+ },
+ msgTypeId := PSTN_DISCONNECT_COMPLETE,
+ msgBody := {
+ pstnDisconnectComplete := {
+ steadySign := {
+ identifier := steadySignal,
+ length_ := 1,
+ ext_0 := '1'B,
+ steadySignType := 30
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PSTN_enc(vl_pstnDisconnectComplete, vl_stream);
+ var PSTN_Message vl_decoded;
+ ef_PSTN_dec(vl_stream, vl_decoded);
+ if(match(vl_pstnDisconnectComplete, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_pstnDisconnectComplete, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PSTN_PROTOCOL_PARAMETER() runs on MAIN_CT {
+ var PSTN_Message vl_pstnProtocolParameter := {
+ protDiscr := '01001000'B,
+ pstnL3Addr := {
+ '0001111'B,
+ '1'B,
+ '00001111'B
+ },
+ msgTypeId := PSTN_PROTOCOL_PARAMETER,
+ msgBody := {
+ pstnProtocolParameter := {
+ seqNum := {
+ identifier := seqNum,
+ length_ := 1,
+ ext_0 := '1'B,
+ seqNum := 12
+ },
+ recognTime := {
+ identifier := recognTime,
+ length_ := 2,
+ ext_0 := '1'B,
+ signal := 127,
+ ext_1 := '1'B,
+ spare := '0'B,
+ durationType := 3
+ },
+ enableAutoAck := {
+ identifier := enableAutoAck,
+ length_ := 4,
+ ext_0 := '1'B,
+ signal := 127,
+ ext_1 := '1'B,
+ response := 17,
+ pulsedExt := {
+ ext_0 := '0'B,
+ supprIndicator := '11'B,
+ pulseDurationType := '01101'B,
+ ext_1 := '1'B,
+ ackReqIndicator := '11'B,
+ nofPulses := 31
+ }
+ },
+ disableAutoAck := {
+ identifier := disableAutoAck,
+ length_ := 1,
+ ext_0 := '1'B,
+ signal := 29
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PSTN_enc(vl_pstnProtocolParameter, vl_stream);
+ log(oct2bit(vl_stream));
+ var PSTN_Message vl_decoded;
+ ef_PSTN_dec(vl_stream, vl_decoded);
+ if(match(vl_pstnProtocolParameter, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_pstnProtocolParameter, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_CNTRL_PORT_CONTROL() runs on MAIN_CT {
+ var CNTRL_Message vl_cntrlPortControl := {
+ protDiscr := '01001000'B,
+ cntrlL3Addr := {
+ l3Addr_0 := '001110'B,
+ secondBitOf1stOctet := {
+ zerovalue := 0
+ },
+ pstnOrIsdn := '0'B,
+ l3Addr_1 := '00001110'B
+ },
+ msgTypeId := CNTRL_PORT_CONTROL,
+ msgBody := {
+ cntrlPortControl := {
+ cntrlFncElement := {
+ identifier := cntrlFncElement,
+ length_ := 1,
+ ext_0 := '1'B,
+ cntrlFncElement := 19
+ },
+ perfGrad := {
+ identifier := perfGrad,
+ perfGrad := 1
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_CNTRL_enc(vl_cntrlPortControl, vl_stream);
+ var CNTRL_Message vl_decoded;
+ ef_CNTRL_dec(vl_stream, vl_decoded);
+ if(match(vl_cntrlPortControl, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_cntrlPortControl, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_CNTRL_PORT_CONTROL_ACK() runs on MAIN_CT {
+ var CNTRL_Message vl_cntrlPortControlAck := {
+ protDiscr := '01001000'B,
+ cntrlL3Addr := {
+ l3Addr_0 := '001110'B,
+ secondBitOf1stOctet := {
+ zerovalue := 0
+ },
+ pstnOrIsdn := '0'B,
+ l3Addr_1 := '00001110'B
+ },
+ msgTypeId := CNTRL_PORT_CONTROL_ACK,
+ msgBody := {
+ cntrlPortControlAck := {
+ cntrlFncElement := {
+ identifier := cntrlFncElement,
+ length_ := 1,
+ ext_0 := '1'B,
+ cntrlFncElement := 19
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_CNTRL_enc(vl_cntrlPortControlAck, vl_stream);
+ var CNTRL_Message vl_decoded;
+ ef_CNTRL_dec(vl_stream, vl_decoded);
+ if(match(vl_cntrlPortControlAck, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_cntrlPortControlAck, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_CNTRL_COMMON_CONTROL() runs on MAIN_CT {
+ var CNTRL_Message vl_cntrlCommonControl := {
+ protDiscr := '01001000'B,
+ cntrlL3Addr := {
+ l3Addr_0 := '001110'B,
+ secondBitOf1stOctet := {
+ zerovalue := 0
+ },
+ pstnOrIsdn := '0'B,
+ l3Addr_1 := '00001110'B
+ },
+ msgTypeId := CNTRL_COMMON_CONTROL,
+ msgBody := {
+ cntrlCommonControl := {
+ cntrlFncId := {
+ identifier := cntrlFncId,
+ length_ := 1,
+ ext_0 := '1'B,
+ cntrlFncId := 17
+ },
+ variant_ := {
+ identifier := variant_,
+ length_ := 1,
+ ext_0 := '1'B,
+ variant_ := 120
+ },
+ rejCause := {
+ identifier := rejCause,
+ rejCause := 2
+ },
+ interfaceId := {
+ identifier := interfaceId,
+ length_ := 3,
+ interfaceId := 16777215
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_CNTRL_enc(vl_cntrlCommonControl, vl_stream);
+ var CNTRL_Message vl_decoded;
+ ef_CNTRL_dec(vl_stream, vl_decoded);
+ if(match(vl_cntrlCommonControl, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_cntrlCommonControl, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_CNTRL_COMMON_CONTROL_ACK() runs on MAIN_CT {
+ var CNTRL_Message vl_cntrlCommonControlAck := {
+ protDiscr := '01001000'B,
+ cntrlL3Addr := {
+ l3Addr_0 := '001110'B,
+ secondBitOf1stOctet := {
+ zerovalue := 0
+ },
+ pstnOrIsdn := '0'B,
+ l3Addr_1 := '00001110'B
+ },
+ msgTypeId := CNTRL_COMMON_CONTROL_ACK,
+ msgBody := {
+ cntrlCommonControlAck := {
+ cntrlFncId := {
+ identifier := cntrlFncId,
+ length_ := 1,
+ ext_0 := '1'B,
+ cntrlFncId := 17
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_CNTRL_enc(vl_cntrlCommonControlAck, vl_stream);
+ var CNTRL_Message vl_decoded;
+ ef_CNTRL_dec(vl_stream, vl_decoded);
+ if(match(vl_cntrlCommonControlAck, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_cntrlCommonControlAck, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_LINK_CONTROL() runs on MAIN_CT {
+ var LINKCNTRL_Message vl_linkControl := {
+ protDiscr := '01001000'B,
+ linkCntrlL3Addr := {
+ zero := '00000000'B,
+ l3AddrField := '00101011'B
+ },
+ msgTypeId := LINK_CONTROL,
+ msgBody := {
+ linkControl := {
+ cntrlFncId := {
+ identifier := linkCntrlFnc,
+ length_ := 1,
+ ext_0 := '1'B,
+ linkCntrlFnc := 5
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_LINKCNTRL_enc(vl_linkControl, vl_stream);
+ var LINKCNTRL_Message vl_decoded;
+ ef_LINKCNTRL_dec(vl_stream, vl_decoded);
+ if(match(vl_linkControl, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_linkControl, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_LINK_CONTROL_ACK() runs on MAIN_CT {
+ var LINKCNTRL_Message vl_linkControlAck := {
+ protDiscr := '01001000'B,
+ linkCntrlL3Addr := {
+ zero := '00000000'B,
+ l3AddrField := '00101011'B
+ },
+ msgTypeId := LINK_CONTROL_ACK,
+ msgBody := {
+ linkControlAck := {
+ cntrlFncId := {
+ identifier := linkCntrlFnc,
+ length_ := 1,
+ ext_0 := '1'B,
+ linkCntrlFnc := 5
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_LINKCNTRL_enc(vl_linkControlAck, vl_stream);
+ var LINKCNTRL_Message vl_decoded;
+ ef_LINKCNTRL_dec(vl_stream, vl_decoded);
+ if(match(vl_linkControlAck, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_linkControlAck, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_ALLOCATION() runs on MAIN_CT {
+ var BCC_Message vl_bccAlloc := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_ALLOCATION,
+ msgBody := {
+ bccAlloc:= {
+ usrPortId := {
+ identifier := usrPortId,
+ length_ := 2,
+ usrPortIdVal := {
+ isdnUsrPortIdVal := {
+ usrPortIdVal_0 := '000011'B,
+ ext_0 := '00'B,
+ usrPortIdVal_1 := '0000101'B,
+ ext_1 := '1'B
+ }
+ }
+ },
+ isdnPortChannelId := {
+ identifier := isdnPortChannelId,
+ length_ := 1,
+ ext_0 := '100'B,
+ isdnPortChannelId := 31
+ },
+ v5TimeSlotId := {
+ identifier := v5TimeSlotId,
+ length_ := 2,
+ linkId := '01100110'B,
+ override_ := '111'B,
+ v5TimeSlotNumber := '01001'B
+ },
+ multiSlotMap := {
+ identifier := multiSlotMap,
+ length_ := 9,
+ linkId := '00110101'B,
+ v5ts1_31 := 2147483647,
+ ext_0 := '0'B,
+ upts1_31 := 2147483647,
+ ext_1 := '0'B
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccAlloc, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccAlloc, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccAlloc, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_ALLOCATION_COMPLETE() runs on MAIN_CT {
+ var BCC_Message vl_bccAllocCompl := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_ALLOCATION_COMPLETE,
+ msgBody := {
+ bccAllocCompl:= {
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccAllocCompl, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccAllocCompl, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccAllocCompl, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_ALLOCATION_REJECT() runs on MAIN_CT {
+ var BCC_Message vl_bccAllocRej := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_ALLOCATION_REJECT,
+ msgBody := {
+ bccAllocRej:= {
+ rejCause := {
+ identifier := rejCause,
+ length_ := 5,
+ ext_0 := '1'B,
+ rejCauseType := 16,
+ diagnostic := {
+ usrPortId := {
+ identifier := usrPortId,
+ length_ := 2,
+ usrPortIdVal := {
+ isdnUsrPortIdVal := {
+ usrPortIdVal_0 := '000011'B,
+ ext_0 := '00'B,
+ usrPortIdVal_1 := '0000111'B,
+ ext_1 := '1'B
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccAllocRej, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccAllocRej, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccAllocRej, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_DEALLOCATION() runs on MAIN_CT {
+ var BCC_Message vl_bccDealloc := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_DEALLOCATION,
+ msgBody := {
+ bccDealloc:= {
+ usrPortId := {
+ identifier := usrPortId,
+ length_ := 2,
+ usrPortIdVal := {
+ isdnUsrPortIdVal := {
+ usrPortIdVal_0 := '000011'B,
+ ext_0 := '00'B,
+ usrPortIdVal_1 := '0000111'B,
+ ext_1 := '1'B
+ }
+ }
+ },
+ isdnPortChannelId := {
+ identifier := isdnPortChannelId,
+ length_ := 1,
+ ext_0 := '100'B,
+ isdnPortChannelId := 31
+ },
+ v5TimeSlotId := {
+ identifier := v5TimeSlotId,
+ length_ := 2,
+ linkId := '01100110'B,
+ override_ := '111'B,
+ v5TimeSlotNumber := '01001'B
+ },
+ multiSlotMap := {
+ identifier := multiSlotMap,
+ length_ := 9,
+ linkId := '00110101'B,
+ v5ts1_31 := 2147483647,
+ ext_0 := '0'B,
+ upts1_31 := 2147483647,
+ ext_1 := '0'B
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccDealloc, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccDealloc, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccDealloc, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_DEALLOCATION_COMPLETE() runs on MAIN_CT {
+ var BCC_Message vl_bccDeallocCompl := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_DEALLOCATION_COMPLETE,
+ msgBody := {
+ bccDeallocCompl:= {
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccDeallocCompl, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccDeallocCompl, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccDeallocCompl, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_DEALLOCATION_REJECT() runs on MAIN_CT {
+ var BCC_Message vl_bccDeallocRej := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_DEALLOCATION_REJECT,
+ msgBody := {
+ bccDeallocRej:= {
+ rejCause := {
+ identifier := rejCause,
+ length_ := 5,
+ ext_0 := '1'B,
+ rejCauseType := 16,
+ diagnostic := {
+ usrPortId := {
+ identifier := usrPortId,
+ length_ := 2,
+ usrPortIdVal := {
+ isdnUsrPortIdVal := {
+ usrPortIdVal_0 := '000011'B,
+ ext_0 := '00'B,
+ usrPortIdVal_1 := '0000111'B,
+ ext_1 := '1'B
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccDeallocRej, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccDeallocRej, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccDeallocRej, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_AUDIT() runs on MAIN_CT {
+ var BCC_Message vl_bccAudit := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_AUDIT,
+ msgBody := {
+ bccAudit:= {
+ usrPortId := {
+ identifier := usrPortId,
+ length_ := 2,
+ usrPortIdVal := {
+ isdnUsrPortIdVal := {
+ usrPortIdVal_0 := '000011'B,
+ ext_0 := '00'B,
+ usrPortIdVal_1 := '0000111'B,
+ ext_1 := '1'B
+ }
+ }
+ },
+ isdnPortChannelId := {
+ identifier := isdnPortChannelId,
+ length_ := 1,
+ ext_0 := '100'B,
+ isdnPortChannelId := 31
+ },
+ v5TimeSlotId := {
+ identifier := v5TimeSlotId,
+ length_ := 2,
+ linkId := '01100110'B,
+ override_ := '111'B,
+ v5TimeSlotNumber := '01001'B
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccAudit, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccAudit, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccAudit, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_AUDIT_COMPLETE() runs on MAIN_CT {
+ var BCC_Message vl_bccAuditCompl := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_AUDIT_COMPLETE,
+ msgBody := {
+ bccAuditCompl:= {
+ usrPortId := {
+ identifier := usrPortId,
+ length_ := 2,
+ usrPortIdVal := {
+ isdnUsrPortIdVal := {
+ usrPortIdVal_0 := '000011'B,
+ ext_0 := '00'B,
+ usrPortIdVal_1 := '0000111'B,
+ ext_1 := '1'B
+ }
+ }
+ },
+ isdnPortChannelId := {
+ identifier := isdnPortChannelId,
+ length_ := 1,
+ ext_0 := '100'B,
+ isdnPortChannelId := 31
+ },
+ v5TimeSlotId := {
+ identifier := v5TimeSlotId,
+ length_ := 2,
+ linkId := '01100110'B,
+ override_ := '111'B,
+ v5TimeSlotNumber := '01001'B
+ },
+ connIncompl := {
+ identifier := connIncompl,
+ length_ := 1,
+ ext_0 := '1'B,
+ reason := 5
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccAuditCompl, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccAuditCompl, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccAuditCompl, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_AN_FAULT() runs on MAIN_CT {
+ var BCC_Message vl_bccAnFault := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_AN_FAULT,
+ msgBody := {
+ bccAnFault:= {
+ usrPortId := {
+ identifier := usrPortId,
+ length_ := 2,
+ usrPortIdVal := {
+ isdnUsrPortIdVal := {
+ usrPortIdVal_0 := '000011'B,
+ ext_0 := '00'B,
+ usrPortIdVal_1 := '0000111'B,
+ ext_1 := '1'B
+ }
+ }
+ },
+ isdnPortChannelId := {
+ identifier := isdnPortChannelId,
+ length_ := 1,
+ ext_0 := '100'B,
+ isdnPortChannelId := 31
+ },
+ v5TimeSlotId := {
+ identifier := v5TimeSlotId,
+ length_ := 2,
+ linkId := '01100110'B,
+ override_ := '111'B,
+ v5TimeSlotNumber := '01001'B
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccAnFault, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccAnFault, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccAnFault, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_AN_FAULT_ACK() runs on MAIN_CT {
+ var BCC_Message vl_bccAnFaultAck := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_AN_FAULT_ACK,
+ msgBody := {
+ bccAnFaultAck:= {
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccAnFaultAck, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccAnFaultAck, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccAnFaultAck, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_BCC_PROTOCOL_ERROR() runs on MAIN_CT {
+ var BCC_Message vl_bccProtErr := {
+ protDiscr := '01001000'B,
+ bccRefNum := {
+ srcId := '0'B,
+ bccRefNumval_0 := '1001011'B,
+ zero := '00'B,
+ bccRefNumval_1 := '101010'B
+ },
+ msgTypeId := BCC_PROTOCOL_ERROR,
+ msgBody := {
+ bccProtErr:= {
+ protErrCause := {
+ identifier := protErrCause,
+ length_ := 3,
+ ext_0 := '1'B,
+ protErrCauseType := 14,
+ ext_1 := '0'B,
+ diagnMsgTypeId := BCC_PROTOCOL_ERROR,
+ diagnInfoElemenetId := protErrCause
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_BCC_enc(vl_bccProtErr, vl_stream);
+ var BCC_Message vl_decoded;
+ ef_BCC_dec(vl_stream, vl_decoded);
+ if(match(vl_bccProtErr, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_bccProtErr, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PROT_SWITCH_OVER_REQ() runs on MAIN_CT {
+ var PROT_Message vl_protSwitchOverReq := {
+ protDiscr := '01001000'B,
+ logc_channelId := {
+ logc_channelId_0 := '00000001'B,
+ logc_channelId_1 := '00000010'B
+ },
+ msgTypeId := PROT_SWITCH_OVER_REQ,
+ msgBody := {
+ protSwitchOverReq:= {
+ seqNum := {
+ identifier := seqNum,
+ length_ := 1,
+ ext_0 := '1'B,
+ seqNum := 127
+ },
+ phyc_channelId := {
+ identifier := phyc_channelId,
+ length_ := 2,
+ v5LinkId := '00010100'B,
+ v5TimeSlot := 31
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PROT_enc(vl_protSwitchOverReq, vl_stream);
+ var PROT_Message vl_decoded;
+ ef_PROT_dec(vl_stream, vl_decoded);
+ if(match(vl_protSwitchOverReq, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_protSwitchOverReq, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PROT_SWITCH_OVER_COM() runs on MAIN_CT {
+ var PROT_Message vl_protSwitchOverCom := {
+ protDiscr := '01001000'B,
+ logc_channelId := {
+ logc_channelId_0 := '00000001'B,
+ logc_channelId_1 := '00000010'B
+ },
+ msgTypeId := PROT_SWITCH_OVER_COM,
+ msgBody := {
+ protSwitchOverCom := {
+ seqNum := {
+ identifier := seqNum,
+ length_ := 1,
+ ext_0 := '1'B,
+ seqNum := 127
+ },
+ phyc_channelId := {
+ identifier := phyc_channelId,
+ length_ := 2,
+ v5LinkId := '00010100'B,
+ v5TimeSlot := 31
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PROT_enc(vl_protSwitchOverCom, vl_stream);
+ var PROT_Message vl_decoded;
+ ef_PROT_dec(vl_stream, vl_decoded);
+ if(match(vl_protSwitchOverCom, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_protSwitchOverCom, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PROT_OS_SWITCH_OVER_COM() runs on MAIN_CT {
+ var PROT_Message vl_protOsSwitchOverCom := {
+ protDiscr := '01001000'B,
+ logc_channelId := {
+ logc_channelId_0 := '00000001'B,
+ logc_channelId_1 := '00000010'B
+ },
+ msgTypeId := PROT_OS_SWITCH_OVER_COM,
+ msgBody := {
+ protOsSwitchOverCom := {
+ seqNum := {
+ identifier := seqNum,
+ length_ := 1,
+ ext_0 := '1'B,
+ seqNum := 127
+ },
+ phyc_channelId := {
+ identifier := phyc_channelId,
+ length_ := 2,
+ v5LinkId := '00010100'B,
+ v5TimeSlot := 31
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PROT_enc(vl_protOsSwitchOverCom, vl_stream);
+ var PROT_Message vl_decoded;
+ ef_PROT_dec(vl_stream, vl_decoded);
+ if(match(vl_protOsSwitchOverCom, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_protOsSwitchOverCom, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PROT_SWITCH_OVER_ACK() runs on MAIN_CT {
+ var PROT_Message vl_protSwitchOverAck := {
+ protDiscr := '01001000'B,
+ logc_channelId := {
+ logc_channelId_0 := '00000001'B,
+ logc_channelId_1 := '00000010'B
+ },
+ msgTypeId := PROT_SWITCH_OVER_ACK,
+ msgBody := {
+ protSwitchOverAck := {
+ seqNum := {
+ identifier := seqNum,
+ length_ := 1,
+ ext_0 := '1'B,
+ seqNum := 127
+ },
+ phyc_channelId := {
+ identifier := phyc_channelId,
+ length_ := 2,
+ v5LinkId := '00010100'B,
+ v5TimeSlot := 31
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PROT_enc(vl_protSwitchOverAck, vl_stream);
+ var PROT_Message vl_decoded;
+ ef_PROT_dec(vl_stream, vl_decoded);
+ if(match(vl_protSwitchOverAck, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_protSwitchOverAck, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PROT_SWITCH_OVER_REJECT() runs on MAIN_CT {
+ var PROT_Message vl_protSwitchOverRej := {
+ protDiscr := '01001000'B,
+ logc_channelId := {
+ logc_channelId_0 := '00000001'B,
+ logc_channelId_1 := '00000010'B
+ },
+ msgTypeId := PROT_SWITCH_OVER_REJECT,
+ msgBody := {
+ protSwitchOverRej := {
+ seqNum := {
+ identifier := seqNum,
+ length_ := 1,
+ ext_0 := '1'B,
+ seqNum := 127
+ },
+ phyc_channelId := {
+ identifier := phyc_channelId,
+ length_ := 2,
+ v5LinkId := '00010100'B,
+ v5TimeSlot := 31
+ },
+ rejCause := {
+ identifier := rejCause,
+ length_ := 1,
+ ext_0 := '1'B,
+ rejCauseType := 6
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PROT_enc(vl_protSwitchOverRej, vl_stream);
+ var PROT_Message vl_decoded;
+ ef_PROT_dec(vl_stream, vl_decoded);
+ if(match(vl_protSwitchOverRej, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_protSwitchOverRej, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PROT_PROTOCOL_ERROR() runs on MAIN_CT {
+ var PROT_Message vl_protProtErr := {
+ protDiscr := '01001000'B,
+ logc_channelId := {
+ logc_channelId_0 := '00000001'B,
+ logc_channelId_1 := '00000010'B
+ },
+ msgTypeId := PROT_PROTOCOL_ERROR,
+ msgBody := {
+ protProtErr := {
+ seqNum := {
+ identifier := seqNum,
+ length_ := 1,
+ ext_0 := '1'B,
+ seqNum := 127
+ },
+ phyc_channelId := {
+ identifier := phyc_channelId,
+ length_ := 2,
+ v5LinkId := '00010100'B,
+ v5TimeSlot := 31
+ },
+ protErrCause := {
+ identifier := protErrCause,
+ length_ := 3,
+ ext_0 := '1'B,
+ protErrCauseType := 13,
+ ext_1 := '0'B,
+ diagnMsgTypeId := PROT_PROTOCOL_ERROR,
+ diagnInfoElementId := phyc_channelId
+ }
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PROT_enc(vl_protProtErr, vl_stream);
+ var PROT_Message vl_decoded;
+ ef_PROT_dec(vl_stream, vl_decoded);
+ if(match(vl_protProtErr, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_protProtErr, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PROT_RESET_SN_COM() runs on MAIN_CT {
+ var PROT_Message vl_protResetSnCom := {
+ protDiscr := '01001000'B,
+ logc_channelId := {
+ logc_channelId_0 := '00000001'B,
+ logc_channelId_1 := '00000010'B
+ },
+ msgTypeId := PROT_RESET_SN_COM,
+ msgBody := {
+ protResetSnCom := {
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PROT_enc(vl_protResetSnCom, vl_stream);
+ var PROT_Message vl_decoded;
+ ef_PROT_dec(vl_stream, vl_decoded);
+ if(match(vl_protResetSnCom, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_protResetSnCom, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+testcase tc_PROT_RESET_SN_ACK() runs on MAIN_CT {
+ var PROT_Message vl_protResetSnAck := {
+ protDiscr := '01001000'B,
+ logc_channelId := {
+ logc_channelId_0 := '00000001'B,
+ logc_channelId_1 := '00000010'B
+ },
+ msgTypeId := PROT_RESET_SN_ACK,
+ msgBody := {
+ protResetSnAck := {
+ }
+ }
+ }
+ var octetstring vl_stream;
+ ef_PROT_enc(vl_protResetSnAck, vl_stream);
+ var PROT_Message vl_decoded;
+ ef_PROT_dec(vl_stream, vl_decoded);
+ if(match(vl_protResetSnAck, vl_decoded)) {
+ log("Encoded in oct: ", vl_stream);
+ log("Encoded in bit: ", oct2bit(vl_stream));
+ setverdict(pass);
+ } else {
+ log("pdu: ", match(vl_protResetSnAck, vl_decoded));
+ setverdict(fail);
+ }
+}
+
+control {
+ execute(tc_PSTN_ESTABLISH());
+ execute(tc_PSTN_ESTABLISH_ACK());
+ execute(tc_PSTN_SIGNAL());
+ execute(tc_PSTN_SIGNAL_ACK());
+ execute(tc_PSTN_STATUS());
+ execute(tc_PSTN_STATUS_ENQUIRY());
+ execute(tc_PSTN_DISCONNECT());
+ execute(tc_PSTN_DISCONNECT_COMPLETE());
+ execute(tc_PSTN_PROTOCOL_PARAMETER());
+
+ execute(tc_CNTRL_PORT_CONTROL());
+ execute(tc_CNTRL_PORT_CONTROL_ACK());
+ execute(tc_CNTRL_COMMON_CONTROL());
+ execute(tc_CNTRL_COMMON_CONTROL_ACK());
+
+ execute(tc_LINK_CONTROL());
+ execute(tc_LINK_CONTROL_ACK());
+
+ execute(tc_BCC_ALLOCATION());
+ execute(tc_BCC_ALLOCATION_COMPLETE());
+ execute(tc_BCC_ALLOCATION_REJECT());
+ execute(tc_BCC_DEALLOCATION());
+ execute(tc_BCC_DEALLOCATION_COMPLETE());
+ execute(tc_BCC_DEALLOCATION_REJECT());
+ execute(tc_BCC_AUDIT());
+ execute(tc_BCC_AUDIT_COMPLETE());
+ execute(tc_BCC_AN_FAULT());
+ execute(tc_BCC_AN_FAULT_ACK());
+ execute(tc_BCC_PROTOCOL_ERROR());
+
+ execute(tc_PROT_SWITCH_OVER_REQ());
+ execute(tc_PROT_SWITCH_OVER_COM());
+ execute(tc_PROT_OS_SWITCH_OVER_COM());
+ execute(tc_PROT_SWITCH_OVER_ACK());
+ execute(tc_PROT_SWITCH_OVER_REJECT());
+ execute(tc_PROT_PROTOCOL_ERROR());
+ execute(tc_PROT_RESET_SN_COM());
+ execute(tc_PROT_RESET_SN_ACK());
+}
+}
\ No newline at end of file
diff --git a/test/cfg.cfg b/test/cfg.cfg
new file mode 100644
index 0000000..2fac334
--- /dev/null
+++ b/test/cfg.cfg
@@ -0,0 +1,13 @@
+[LOGGING]
+LogFile := "logs/%e.%h-%r.%s"
+FileMask := LOG_ALL | DEBUG | MATCHING
+ConsoleMask := ERROR | WARNING | TESTCASE | STATISTICS | PORTEVENT | USER
+LogSourceInfo := Yes
+AppendFile := No
+TimeStampFormat := DateTime
+LogEventTypes := Yes
+SourceInfoFormat := Single
+LogEntityName := Yes
+
+[EXECUTE]
+V5_Test.control