How to run the demo?
Created by: seanwl
I was new to ttcn language, just install titan.core and successfully executed the simple system port test on this page https://github.com/eclipse/titan.core/wiki/Simple-TTCN3-Examples, and I planed to run a dns test, but failed many times. In the result of compiling your demo code, first its said
DNS_Mapping.ttcn:22.1-28: error: There is no module with identifier `UDPasp_Types'
then I copy the files in your titan.TestPorts.UDPasp src page into demo folders and the error is corrected, but came up with a bunch of new errors, states below,
if g++ -o DNS_Demo DNS_Demo.o DNS_Mapping.o DNS_Types.o UDPasp_PortType.o UDPasp_Types.o
-L/home/seanwl/titan.core/Install/lib -lttcn3
-L/lib -lcrypto
-L/home/seanwl/titan.core/Install/lib -lxml2;
then : ; else /home/seanwl/titan.core/Install/bin/titanver DNS_Demo.o DNS_Mapping.o DNS_Types.o UDPasp_PortType.o UDPasp_Types.o ; exit 1; fi DNS_Mapping.o: In functionDNS__Mapping::f__DNS__mapping__behaviour()': DNS_Mapping.cc:(.text+0x6c02): undefined reference to
DNS__Types::dec__PDU__DNS(OCTETSTRING const&)' DNS_Mapping.cc:(.text+0x6e1a): undefined reference toDNS__Types::enc__PDU__DNS(DNS__Types::PDU__DNS const&, BOOLEAN const&, BOOLEAN const&)' DNS_Types.o: In function
DNS__Types::pre_init_module()': DNS_Types.cc:(.text+0x43144): undefined reference toDNS__Types::enc__PDU__DNS(DNS__Types::PDU__DNS const&, BOOLEAN const&, BOOLEAN const&)' DNS_Types.cc:(.text+0x43166): undefined reference to
DNS__Types::dec__PDU__DNS(OCTETSTRING const&)' UDPasp_PortType.o: In functionUDPasp__PortType::UDPasp__PT::UDPasp__PT(char const*)': UDPasp_PortType.cc:(.text+0x229): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::UDPasp__PT_PROVIDER(char const*)' UDPasp_PortType.o: In functionUDPasp__PortType::UDPasp__PT::~UDPasp__PT()': UDPasp_PortType.cc:(.text+0x2a2): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::~UDPasp__PT_PROVIDER()' UDPasp_PortType.o: In functionUDPasp__PortType::UDPasp__PT::send(UDPasp__Types::ASP__UDP__open const&, COMPONENT const&, FLOAT*)': UDPasp_PortType.cc:(.text+0x412): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::outgoing_send(UDPasp__Types::ASP__UDP__open const&)' UDPasp_PortType.o: In functionUDPasp__PortType::UDPasp__PT::send(UDPasp__Types::ASP__UDP__close const&, COMPONENT const&, FLOAT*)': UDPasp_PortType.cc:(.text+0x7e2): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::outgoing_send(UDPasp__Types::ASP__UDP__close const&)' UDPasp_PortType.o: In functionUDPasp__PortType::UDPasp__PT::send(UDPasp__Types::ASP__UDP const&, COMPONENT const&, FLOAT*)': UDPasp_PortType.cc:(.text+0xb94): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::outgoing_send(UDPasp__Types::ASP__UDP const&)' UDPasp_PortType.o: In functionUDPasp__PortType::UDPasp__PT::send(UDPasp__Types::ASP__UDP__message const&, COMPONENT const&, FLOAT*)': UDPasp_PortType.cc:(.text+0xf46): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::outgoing_send(UDPasp__Types::ASP__UDP__message const&)' UDPasp_PortType.o: In functionUDPasp__PortType::UDPasp__PT::outgoing_public_send(UDPasp__Types::ASP__UDP__open const&)': UDPasp_PortType.cc:(.text+0x13ff): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::outgoing_send(UDPasp__Types::ASP__UDP__open const&)' UDPasp_PortType.o: In functionUDPasp__PortType::UDPasp__PT::outgoing_public_send(UDPasp__Types::ASP__UDP__close const&)': UDPasp_PortType.cc:(.text+0x1425): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::outgoing_send(UDPasp__Types::ASP__UDP__close const&)' UDPasp_PortType.o: In functionUDPasp__PortType::UDPasp__PT::outgoing_public_send(UDPasp__Types::ASP__UDP const&)': UDPasp_PortType.cc:(.text+0x144b): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::outgoing_send(UDPasp__Types::ASP__UDP const&)' UDPasp_PortType.o: In functionUDPasp__PortType::UDPasp__PT::outgoing_public_send(UDPasp__Types::ASP__UDP__message const&)': UDPasp_PortType.cc:(.text+0x1471): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::outgoing_send(UDPasp__Types::ASP__UDP__message const&)' UDPasp_PortType.o:(.data.rel.ro._ZTVN16UDPasp__PortType10UDPasp__PTE[_ZTVN16UDPasp__PortType10UDPasp__PTE]+0x38): undefined reference toUDPasp__PortType::UDPasp__PT_PROVIDER::Event_Handler(fd_set const*, fd_set const*, fd_set const*, double)' UDPasp_PortType.o:(.data.rel.ro._ZTVN16UDPasp__PortType10UDPasp__PTE[_ZTVN16UDPasp__PortType10UDPasp__PTE]+0xb0): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::set_parameter(char const*, char const*)' UDPasp_PortType.o:(.data.rel.ro._ZTVN16UDPasp__PortType10UDPasp__PTE[_ZTVN16UDPasp__PortType10UDPasp__PTE]+0xd0): undefined reference toUDPasp__PortType::UDPasp__PT_PROVIDER::user_map(char const*)' UDPasp_PortType.o:(.data.rel.ro._ZTVN16UDPasp__PortType10UDPasp__PTE[_ZTVN16UDPasp__PortType10UDPasp__PTE]+0xd8): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::user_unmap(char const*)' UDPasp_PortType.o:(.data.rel.ro._ZTVN16UDPasp__PortType10UDPasp__PTE[_ZTVN16UDPasp__PortType10UDPasp__PTE]+0xf0): undefined reference toUDPasp__PortType::UDPasp__PT_PROVIDER::user_start()' UDPasp_PortType.o:(.data.rel.ro._ZTVN16UDPasp__PortType10UDPasp__PTE[_ZTVN16UDPasp__PortType10UDPasp__PTE]+0xf8): undefined reference to
UDPasp__PortType::UDPasp__PT_PROVIDER::user_stop()' UDPasp_PortType.o:(.data.rel.ro._ZTIN16UDPasp__PortType10UDPasp__PTE[_ZTIN16UDPasp__PortType10UDPasp__PTE]+0x10): undefined reference to `typeinfo for UDPasp__PortType::UDPasp__PT_PROVIDER'
So if u guys could point out which steps is wrong, that would be amazing.