Crosstag with nested elements [message #1859732] |
Fri, 23 June 2023 15:21 |
Moritz Klass Messages: 22 Registered: August 2020 |
Junior Member |
|
|
Hey guys,
I have the following situation: I have a record of two records.
type record MME {
MME_Header mme_header,
MME_Payload mme_payload
}
MME_Header looking like this:
type record MME_Header{
MMV_TYPE mmv,
MM_TYPE mmtype_hex optional,
MMTYPE mmtype optional,
Fmi_TYPE fmi optional,
Fmsn_TYPE fmsn optional
}
And MME_Payload like that:
type record MME_Payload{
union {
CM_SLAC_PARM_REQ cm_slac_parm_req,
CM_SLAC_PARM_CNF cm_slac_parm_cnf,
CM_START_ATTEN_CHAR_IND cm_start_atten_char_ind,
CM_ATTEN_CHAR_IND cm_atten_char_ind,
CM_ATTEN_CHAR_RSP cm_atten_char_rsp,
CM_ATTEN_PROFILE_IND cm_atten_profile_ind,
CM_MNBC_SOUND_IND cm_mnbc_sound_ind,
CM_VALIDATE_REQ cm_validate_req,
CM_VALIDATE_CNF cm_validate_cnf,
CM_SLAC_MATCH_REQ cm_slac_match_req,
CM_SLAC_MATCH_CNF cm_slac_match_cnf,
CM_SET_KEY_REQ cm_set_key_req,
CM_SET_KEY_CNF cm_set_key_cnf,
VS_PL_LNK_STATUS_REQ vs_pl_lnk_status_req,
VS_PL_LNK_STATUS_CNF vs_pl_lnk_status_cnf,
CM_AMP_MAP_REQ cm_amp_map_req,
CM_AMP_MAP_CNF cm_amp_map_cnf,
VS_HST_ACTION_REQ vs_hst_action_req,
VS_HST_ACTION_RSP vs_hst_action_rsp,
CM_NW_STATS_REQ cm_nw_stats_req,
CM_NW_STATS_CNF cm_nw_stats_cnf
} payload
}
with {
variant ""
}
I now want the field mme_header.mmtype_hex to determine the selected union member of mme_payload.payload so I tried this:
type record MME{
MME_Header mme_header,
MME_Payload mme_payload
}
with {
variant (mme_payload.payload) "CROSSTAG(cm_slac_parm_cnf, mme_header.mmtype_hex = '6065'H )";
variant (mme_header) "FORCEOMIT(mmtype)";
}
(You can ignore the FORCEOMIT, thats just a workaround.
But it does not seem to work, the payload-Union is decoded as its first element always despite mme_header.mmtype_hex being set correctly.
Is this construct legal and supposed to work?
Thanks,
Moritz
[Updated on: Fri, 23 June 2023 15:23] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04255 seconds