Port recevie function declaration incorrect if using hexstring for address
Summary
When using hexsrtring as the address type, the compiler generates an incorrect declaration for the receive function. The generated source code expects the address to be of type ADDRESS_TYPE, but is actually HEXSTRING
Steps and/or TTCN-3 code to reproduce
type hexstring MACAddress_TYPE length(12) with { variant "BYTEORDER(first),HEXORDER(high)"};
type MACAddress_TYPE address;
type record MMM {
hexstring A;
}
type port SLAC_Port message {
inout MME;
} with { extension "address" }
What is the current bug behavior?
C++ code cannot be compiled as there is no declaration of the expected port receive function due to the type mismatch mentioned above
What is the expected correct behavior?
Generate code that will compile
Relevant logs and/or screenshots
Possible fixes
Adding this to class SLAC__Port resolves this issue:
public:
using SLAC__Port_BASE::receive;
inline alt_status receive(const DataStructure__SLAC::MME_template& value_template, DataStructure__SLAC::MME *value_redirect, const ADDRESS_TEMPLATE< HEXSTRING_template, HEXSTRING >& sender_template, HEXSTRING *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect* i)
{
ADDRESS_TYPE<HEXSTRING> a(*sender_ptr);
return receive(value_template, value_redirect, sender_template, &a, timestamp_redirect, i);
}
Titan version
11.0.0
Platform details (OS type and version)
Linux Ubuntu 24.04
/cc @aknappqwt @mmagyari