Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » TAG in RAW(how to control the decode order in a struct with RAW)
TAG in RAW [message #1850948] Wed, 23 March 2022 07:32
lou ban is currently offline lou banFriend
Messages: 17
Registered: June 2020
Junior Member
// all in RAW and FILEDORDER(msb)
type record f4_Type{
    O1_Type    iei,
    O1_Type   tmp
};

type record f5_Type{
    O1_Type    iei,
    O2_Type    tmp
};

type record f6_Type{
    B4_Type    iei,
    B4_Type    tmp
};

type record A{
    B4_Type f1,
    B4_Type f2,
    O4_Type f3,
    O2_Type f4        optional,
    O3_Type f5        optional,
    O1_Type  f6        optional
}with {
    variant "TAG(
        f4, iei = '12'O;
        f5, iei = '34'O;
        f6, iei = '5'H;
    )";
};


when decode, I hope '11223344553466771288'O give me a decode error log instead of A :={f1:='0001'B, f2:='0001'B, f3:='22334455'O, f4:={iei:='12'O, tmp:='6677'O}, f5:=omit, f6:=omit}

and I also want an error when optional fields are repeated, sach as '112233445512661277'O

what should I do?

THANKS!

[Updated on: Wed, 23 March 2022 07:34]

Report message to a moderator

Previous Topic:Crush when using allowed cyclic imports
Next Topic:the doubt about the function encvalue()
Goto Forum:
  


Current Time: Sat Oct 12 17:06:23 GMT 2024

Powered by FUDForum. Page generated in 0.25198 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top