Issues in SDL function with only nested states
Hello,
I was testing one SDL function with nested states and there is a problem with the autogenerated Ada code for it. The SDL diagram has only nested states (except for the initial state):
AdaGenerator.py generates the following Data Model in ASN
:
Manager-Datamodel DEFINITIONS ::=
BEGIN
IMPORTS T-UInt16, ...
Manager-States ::= ENUMERATED {manager-has-no-state}
Manager-Context ::= SEQUENCE {
init-done BOOLEAN, -- <<<<<<< IT DOES NOT GENERATE "state Manager-States" ELEMENT!!!
current-mode Operating-Mode,
last-tc TC-Type,
idle-error-msg TM-Error-Contents,
coverage-error-msg TM-Error-Contents
}
Manager-Tm-Type-Selection ::= ENUMERATED {hello-present(1), hk-present(2), mode-present(3), err-present(4)}
END
This ASN file does not contain the states
element, thereby, the Ada code generated with ASN1SCC does not contain it either. This element of the record is used in the autogenerated Ada code, that is why the compilation for the SDL function fails, e.g.:
procedure Process_TC_Transition is
begin
case ctxt.state is -- <<<<<<<<<< HERE
when others =>
Execute_Transition (CS_Only);
end case;
end Process_TC_Transition;
If I add a dummy state that is not a nested one and does not do anything the problem is fixed, i.e.: the ASN file has the state element.
Best regards, Ángel