diff options
Diffstat (limited to 'library/CBSP_Templates.ttcn')
-rw-r--r-- | library/CBSP_Templates.ttcn | 295 |
1 files changed, 265 insertions, 30 deletions
diff --git a/library/CBSP_Templates.ttcn b/library/CBSP_Templates.ttcn index 5ee1f33b..e5985668 100644 --- a/library/CBSP_Templates.ttcn +++ b/library/CBSP_Templates.ttcn @@ -54,7 +54,7 @@ function tr_CbspChannelInd(template uint8_t val := ?) return template CBSP_IE { if (istemplatekind(val, "omit")) { ie := omit; } else if (istemplatekind(val, "*")) { - ie := tr_CBSP_IE({channel_ind := ?}) ifpresent; + ie := tr_CBSP_IE({channel_ind := ?}); //ifpresent; } else { ie := tr_CBSP_IE({channel_ind := val}); } @@ -134,6 +134,30 @@ template CBSP_IE tr_CbspFailList(template CBSP_FailureListItems items := ?) := list := items }}); +template (present) CBSP_FailureListItem CBSP_FailureListItem_CGI( + template (present) BSSMAP_FIELD_CellIdentification_CGI cgi := ?, + template (present) CBSP_Cause cause := ?) := +{ + spare1_4 := '0000'B, + cell_id_discr := '0000'B, + cell_id := { + cI_CGI := cgi + }, + cause := cause +}; + +template (present) CBSP_FailureListItem CBSP_FailureListItem_LAC_CI( + template (present) BSSMAP_FIELD_CellIdentification_LAC_CI lac_ci := ?, + template (present) CBSP_Cause cause := ?) := +{ + spare1_4 := '0000'B, + cell_id_discr := '0001'B, + cell_id := { + cI_LAC_CI := lac_ci + }, + cause := cause +}; + template (value) CBSP_IE ts_CbspNumComplList(template (value) CBSP_IE_NumBcastComplList list) := ts_CBSP_IE(CBSP_IEI_NUM_BCAST_COMPL_LIST, {num_bcast_compl_list := list}); template CBSP_IE tr_CbspNumComplList(template CBSP_IE_NumBcastComplList list := ?) := @@ -314,7 +338,6 @@ template (value) CBSP_PDU ts_CBSP_REPLACE_EMERG(uint16_t msg_id, uint16_t new_se template (value) BSSMAP_FIELD_CellIdentificationList cell_list, template (value) uint8_t emerg_ind, template (value) uint16_t warn_type, - template (value) uint16_t num_bcast_req, template (value) uint8_t warn_per ) := ts_CBSP(CBSP_MSGT_WRITE_REPLACE, { @@ -331,7 +354,6 @@ template CBSP_PDU tr_CBSP_REPLACE_EMERG(template uint16_t msg_id := ?, template template BSSMAP_FIELD_CellIdentificationList cell_list := ?, template uint8_t emerg_ind := ?, template uint16_t warn_type := ?, - template uint16_t num_bcast_req := ?, template uint8_t warn_per := ? ) := tr_CBSP(CBSP_MSGT_WRITE_REPLACE, { @@ -359,9 +381,22 @@ return template (value) CBSP_PDU { ies[lengthof(ies)] := ts_CbspChannelInd(channel_ind); return ts_CBSP(CBSP_MSGT_WRITE_REPLACE_COMPL, ies); } +function ts_CBSP_WRITE_EMERG_COMPL(uint16_t msg_id, uint16_t new_ser_nr, + template (omit) BSSMAP_FIELD_CellIdentificationList cell_list) +return template (value) CBSP_PDU { + var template (value) CBSP_IEs ies := { + ts_CbspMsgId(msg_id), + ts_NewSerNo(new_ser_nr) + }; + if (not istemplatekind(cell_list, "omit")) { + ies[lengthof(ies)] := ts_CbspCellList(valueof(cell_list)); + } + return ts_CBSP(CBSP_MSGT_WRITE_REPLACE_COMPL, ies); +} + function tr_CBSP_WRITE_CBS_COMPL(template uint16_t msg_id, template uint16_t new_ser_nr, template BSSMAP_FIELD_CellIdentificationList cell_list, - template uint8_t channel_ind) + template (present) uint8_t channel_ind) return template CBSP_PDU { var template CBSP_IEs ies := { tr_CbspMsgId(msg_id), @@ -375,8 +410,23 @@ return template CBSP_PDU { } else if (not istemplatekind(cell_list, "omit")) { ies[lengthof(ies)] := tr_CbspCellList(cell_list); } - if (not istemplatekind(channel_ind, "omit")) { - ies[lengthof(ies)] := tr_CbspChannelInd(channel_ind); + ies[lengthof(ies)] := tr_CbspChannelInd(channel_ind); + return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_COMPL, ies); +} +function tr_CBSP_WRITE_EMERG_COMPL(template uint16_t msg_id, template uint16_t new_ser_nr, + template BSSMAP_FIELD_CellIdentificationList cell_list) +return template CBSP_PDU { + var template CBSP_IEs ies := { + tr_CbspMsgId(msg_id), + tr_NewSerNo(new_ser_nr) + }; + if (istemplatekind(cell_list, "*")) { + testcase.stop("TITAN > 6.5.0 doesn't support this"); + //ies[lengthof(ies)] := tr_CbspCellList ifpresent; + } else if (istemplatekind(cell_list, "?")) { + ies[lengthof(ies)] := tr_CbspCellList(?); + } else if (not istemplatekind(cell_list, "omit")) { + ies[lengthof(ies)] := tr_CbspCellList(cell_list); } return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_COMPL, ies); } @@ -399,18 +449,39 @@ return template (value) CBSP_PDU { ies[lengthof(ies)] := ts_CbspChannelInd(channel_ind); return ts_CBSP(CBSP_MSGT_WRITE_REPLACE_COMPL, ies); } +function ts_CBSP_REPLACE_EMERG_COMPL(uint16_t msg_id, uint16_t new_ser_nr, uint16_t old_ser_nr, + template (omit) BSSMAP_FIELD_CellIdentificationList cell_list) +return template (value) CBSP_PDU { + var template (value) CBSP_IEs ies := { + ts_CbspMsgId(msg_id), + ts_NewSerNo(new_ser_nr), + ts_OldSerNo(old_ser_nr) + }; + if (not istemplatekind(cell_list, "omit")) { + ies[lengthof(ies)] := ts_CbspCellList(valueof(cell_list)); + } + return ts_CBSP(CBSP_MSGT_WRITE_REPLACE_COMPL, ies); +} function tr_CBSP_REPLACE_CBS_COMPL(template uint16_t msg_id, template uint16_t new_ser_nr, template uint16_t old_ser_nr, template CBSP_IE_NumBcastComplList compl_list, template BSSMAP_FIELD_CellIdentificationList cell_list, - template uint8_t channel_ind) + template (present) uint8_t channel_ind) return template CBSP_PDU { var template CBSP_IEs ies := { tr_CbspMsgId(msg_id), tr_NewSerNo(new_ser_nr), - tr_OldSerNo(old_ser_nr), - tr_CbspNumComplList(compl_list) + tr_OldSerNo(old_ser_nr) }; + if (istemplatekind(compl_list, "*")) { + testcase.stop("TITAN > 6.5.0 doesn't support this"); + //ies[lengthof(ies)] := tr_CbspNumComplList ifpresent; + } else if (istemplatekind(compl_list, "?")) { + ies[lengthof(ies)] := tr_CbspNumComplList(?); + } else if (not istemplatekind(compl_list, "omit")) { + ies[lengthof(ies)] := tr_CbspNumComplList(compl_list); + } + if (istemplatekind(cell_list, "*")) { testcase.stop("TITAN > 6.5.0 doesn't support this"); //ies[lengthof(ies)] := tr_CbspCellList ifpresent; @@ -424,6 +495,26 @@ return template CBSP_PDU { } return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_COMPL, ies); } +function tr_CBSP_REPLACE_EMERG_COMPL(template uint16_t msg_id, template uint16_t new_ser_nr, + template uint16_t old_ser_nr, + template BSSMAP_FIELD_CellIdentificationList cell_list) +return template CBSP_PDU { + var template CBSP_IEs ies := { + tr_CbspMsgId(msg_id), + tr_NewSerNo(new_ser_nr), + tr_OldSerNo(old_ser_nr) + }; + + if (istemplatekind(cell_list, "*")) { + testcase.stop("TITAN > 6.5.0 doesn't support this"); + //ies[lengthof(ies)] := tr_CbspCellList ifpresent; + } else if (istemplatekind(cell_list, "?")) { + ies[lengthof(ies)] := tr_CbspCellList(?); + } else if (not istemplatekind(cell_list, "omit")) { + ies[lengthof(ies)] := tr_CbspCellList(cell_list); + } + return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_COMPL, ies); +} /* 8.1.3.3 WRITE-REPLACE FAILURE */ @@ -451,7 +542,7 @@ function tr_CBSP_WRITE_CBS_FAIL(template uint16_t msg_id, template uint16_t new_ template CBSP_FailureListItems fail_list, template CBSP_IE_NumBcastComplList compl_list, template BSSMAP_FIELD_CellIdentificationList cell_list, - template uint8_t channel_ind) + template (present) uint8_t channel_ind) return template CBSP_PDU { var template CBSP_IEs ies := { tr_CbspMsgId(msg_id), @@ -473,8 +564,33 @@ return template CBSP_PDU { } else if (not istemplatekind(cell_list, "omit")) { ies[lengthof(ies)] := tr_CbspCellList(cell_list); } - if (not istemplatekind(channel_ind, "omit")) { - ies[lengthof(ies)] := ts_CbspChannelInd(channel_ind); + ies[lengthof(ies)] := ts_CbspChannelInd(channel_ind); + return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_FAIL, ies); +} +function tr_CBSP_WRITE_EMERG_FAIL(template uint16_t msg_id, template uint16_t new_ser_nr, + template CBSP_FailureListItems fail_list, + template CBSP_IE_NumBcastComplList compl_list, + template BSSMAP_FIELD_CellIdentificationList cell_list) +return template CBSP_PDU { + var template CBSP_IEs ies := { + tr_CbspMsgId(msg_id), + tr_NewSerNo(new_ser_nr), + tr_CbspFailList(fail_list) + }; + if (istemplatekind(compl_list, "*")) { + //ies[lengthof(ies)] := tr_CbspNumComplList ifpresent; + } else if (istemplatekind(compl_list, "?")) { + ies[lengthof(ies)] := tr_CbspNumComplList(?); + } else if (not istemplatekind(compl_list, "omit")) { + ies[lengthof(ies)] := tr_CbspNumComplList(compl_list); + } + if (istemplatekind(cell_list, "*")) { + testcase.stop("TITAN > 6.5.0 doesn't support this"); + //ies[lengthof(ies)] := tr_CbspCellList ifpresent; + } else if (istemplatekind(cell_list, "?")) { + ies[lengthof(ies)] := tr_CbspCellList(?); + } else if (not istemplatekind(cell_list, "omit")) { + ies[lengthof(ies)] := tr_CbspCellList(cell_list); } return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_FAIL, ies); } @@ -506,7 +622,7 @@ function tr_CBSP_REPLACE_CBS_FAIL(template uint16_t msg_id, template uint16_t ne template CBSP_FailureListItems fail_list, template CBSP_IE_NumBcastComplList compl_list, template BSSMAP_FIELD_CellIdentificationList cell_list, - template uint8_t channel_ind) + template (present) uint8_t channel_ind) return template CBSP_PDU { var template CBSP_IEs ies := { tr_CbspMsgId(msg_id), @@ -531,25 +647,65 @@ return template CBSP_PDU { ies[lengthof(ies)] := tr_CbspChannelInd(channel_ind); return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_FAIL, ies); } +function tr_CBSP_REPLACE_EMERG_FAIL(template uint16_t msg_id, template uint16_t new_ser_nr, + template uint16_t old_ser_nr, + template CBSP_FailureListItems fail_list, + template CBSP_IE_NumBcastComplList compl_list, + template BSSMAP_FIELD_CellIdentificationList cell_list) +return template CBSP_PDU { + var template CBSP_IEs ies := { + tr_CbspMsgId(msg_id), + tr_NewSerNo(new_ser_nr), + tr_OldSerNo(old_ser_nr), + tr_CbspFailList(fail_list) + }; + if (istemplatekind(compl_list, "*")) { + //ies[lengthof(ies)] := tr_CbspCellList ifpresent; + } else if (istemplatekind(compl_list, "?")) { + ies[lengthof(ies)] := tr_CbspNumComplList(?); + } else if (not istemplatekind(compl_list, "omit")) { + ies[lengthof(ies)] := tr_CbspNumComplList(compl_list); + } + if (istemplatekind(cell_list, "*")) { + //ies[lengthof(ies)] := tr_CbspCellList ifpresent; + } else if (istemplatekind(cell_list, "?")) { + ies[lengthof(ies)] := tr_CbspCellList(?); + } else if (not istemplatekind(cell_list, "omit")) { + ies[lengthof(ies)] := tr_CbspCellList(cell_list); + } + return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_FAIL, ies); +} /* 8.1.3.4 KILL */ -template (value) CBSP_PDU ts_CBSP_KILL(template (value) uint16_t msg_id, - template (value) uint16_t old_ser_nr, - template (value) BSSMAP_FIELD_CellIdentificationList cell_list, - template (omit) uint8_t channel_ind) := - ts_CBSP(CBSP_MSGT_KILL, { - ts_CbspMsgId(msg_id), - ts_OldSerNo(old_ser_nr), - ts_CbspCellList(cell_list), - ts_CbspChannelInd(channel_ind)}); -template CBSP_PDU tr_CBSP_KILL(template uint16_t msg_id := ?, template uint16_t old_ser_nr := ?, - template BSSMAP_FIELD_CellIdentificationList cell_list := ?, - template uint8_t channel_ind := ?) := - tr_CBSP(CBSP_MSGT_KILL, { - tr_CbspMsgId(msg_id), - tr_OldSerNo(old_ser_nr), - tr_CbspCellList(cell_list), - tr_CbspChannelInd(channel_ind) }); +function ts_CBSP_KILL(template (value) uint16_t msg_id, + template (value) uint16_t old_ser_nr, + template (value) BSSMAP_FIELD_CellIdentificationList cell_list, + template (omit) uint8_t channel_ind) +return template (value) CBSP_PDU { + var template (value) CBSP_IEs ies := { + ts_CbspMsgId(msg_id), + ts_OldSerNo(old_ser_nr), + ts_CbspCellList(cell_list) + }; + if (not istemplatekind(channel_ind, "omit")) { + ies[lengthof(ies)] := ts_CbspChannelInd(channel_ind); + } + return ts_CBSP(CBSP_MSGT_KILL, ies); +} +function tr_CBSP_KILL(template uint16_t msg_id := ?, template uint16_t old_ser_nr := ?, + template BSSMAP_FIELD_CellIdentificationList cell_list := ?, + template uint8_t channel_ind := ?) +return template (present) CBSP_PDU { + var template CBSP_IEs ies := { + tr_CbspMsgId(msg_id), + tr_OldSerNo(old_ser_nr), + tr_CbspCellList(cell_list) + }; + if (not istemplatekind(channel_ind, "omit")) { + ies[lengthof(ies)] := tr_CbspChannelInd(channel_ind); + } + return tr_CBSP(CBSP_MSGT_KILL, ies); +} /* 8.1.3.5 KILL COMPLETE */ function ts_CBSP_KILL_COMPL(template (value) uint16_t msg_id, template (value) uint16_t old_ser_nr, @@ -661,6 +817,85 @@ return template CBSP_PDU { return tr_CBSP(CBSP_MSGT_KILL_FAIL, ies); } +/* 8.1.3.10 MESSAGE STATUS QUERY */ +template (value) CBSP_PDU +ts_CBSP_MSG_STATUS_QUERY(template (value) uint16_t msg_id, + template (value) uint16_t old_ser_nr, + template (value) BSSMAP_FIELD_CellIdentificationList cell_list, + template (value) uint8_t channel_ind) := + ts_CBSP(CBSP_MSGT_MSG_STATUS_QUERY, { + ts_CbspMsgId(msg_id), + ts_OldSerNo(old_ser_nr), + ts_CbspCellList(cell_list), + ts_CbspChannelInd(channel_ind)}); +template (present) CBSP_PDU +tr_CBSP_MSG_STATUS_QUERY(template (present) uint16_t msg_id := ?, + template (present) uint16_t old_ser_nr := ?, + template (present) BSSMAP_FIELD_CellIdentificationList cell_list := ?, + template (present) uint8_t channel_ind := ?) := + ts_CBSP(CBSP_MSGT_MSG_STATUS_QUERY, { + ts_CbspMsgId(msg_id), + ts_OldSerNo(old_ser_nr), + ts_CbspCellList(cell_list), + ts_CbspChannelInd(channel_ind)}); + +/* 8.1.3.11 MESSAGE STATUS QUERY COMPLETE */ +template (value) CBSP_PDU +ts_CBSP_MSG_STATUS_QUERY_COMPL(template (value) uint16_t msg_id, template (value) uint16_t old_ser_nr, + template (value) CBSP_IE_NumBcastComplList compl_list, + template (value) uint8_t channel_ind) := + ts_CBSP(CBSP_MSGT_MSG_STATUS_QUERY_COMPL, { + ts_CbspMsgId(msg_id), + ts_OldSerNo(old_ser_nr), + ts_CbspNumComplList(valueof(compl_list)), + ts_CbspChannelInd(channel_ind)}); +template (present) CBSP_PDU +tr_CBSP_MSG_STATUS_QUERY_COMPL(template (present) uint16_t msg_id, template (present) uint16_t old_ser_nr, + template (present) CBSP_IE_NumBcastComplList compl_list, + template (present) uint8_t channel_ind) := + tr_CBSP(CBSP_MSGT_MSG_STATUS_QUERY_COMPL, { + tr_CbspMsgId(msg_id), + tr_OldSerNo(old_ser_nr), + tr_CbspNumComplList(compl_list), + tr_CbspChannelInd(channel_ind)}); + +/* 8.1.3.12 MESSAGE STATUS QUERY FAILURE */ +function ts_CBSP_MSG_STATUS_QUERY_FAIL(template (value) uint16_t msg_id, template (value) uint16_t old_ser_nr, + template (value) CBSP_FailureListItems fail_list, + template (value) uint8_t channel_ind, + template (omit) CBSP_IE_NumBcastComplList compl_list) +return template (value) CBSP_PDU { + var template (value) CBSP_IEs ies := { + ts_CbspMsgId(msg_id), + ts_OldSerNo(old_ser_nr), + ts_CbspFailList(fail_list), + ts_CbspChannelInd(channel_ind) + }; + if (not istemplatekind(compl_list, "omit")) { + ies[lengthof(ies)] := ts_CbspNumComplList(valueof(compl_list)); + } + return ts_CBSP(CBSP_MSGT_MSG_STATUS_QUERY_FAIL, ies); +} +function tr_CBSP_MSG_STATUS_QUERY_FAIL(template (present) uint16_t msg_id := ?, template (present) uint16_t old_ser_nr := ?, + template (present) CBSP_FailureListItems fail_list := ?, + template (present) uint8_t channel_ind := ?, + template CBSP_IE_NumBcastComplList compl_list := *) +return template (present) CBSP_PDU { + var template (present) CBSP_IEs ies := { + tr_CbspMsgId(msg_id), + tr_OldSerNo(old_ser_nr), + tr_CbspFailList(fail_list), + tr_CbspChannelInd(channel_ind) + }; + if (istemplatekind(compl_list, "*")) { + testcase.stop("TITAN > 6.5.0 doesn't support this"); + //ies[lengthof(ies)] := ts_CbspNumComplList(valueof(compl_list)); + } else if (not istemplatekind(compl_list, "omit")) { + ies[lengthof(ies)] := tr_CbspNumComplList(compl_list); + } + return tr_CBSP(CBSP_MSGT_MSG_STATUS_QUERY_FAIL, ies); +} + /* 8.1.3.16 RESET */ template (value) CBSP_PDU ts_CBSP_RESET(template (value) BSSMAP_FIELD_CellIdentificationList cell_list) := |