@startuml
title S5KRC1S data parser
top to bottom direction
hide empty description

[*] --> sWaitForTimestampReference
sWaitForTimestampReference --> sWaitForTimestampSubUnit : eTimestampReference / aUpdateTimestampReference

sWaitForTimestampSubUnit --> sWaitForTimestampReference : any other
sWaitForTimestampSubUnit --> sWaitForColumnStart : eTimestampSubUnit / aUpdateTimestampSubUnit

sWaitForColumnStart --> sWaitForTimestampReference : any other
sWaitForColumnStart --> sWaitForSMGroups : eColumn[gIsFrameStart] / (aSetFrameNumber, aSetColumnData)

sWaitForSMGroups --> sWaitForTimestampReference : any other / aResetEventFrame
sWaitForSMGroups --> sWaitForColumnOrSMGroupsOrFrameEnd : eSMGroup / aGenerateEventsFromSMGroup

sWaitForColumnOrSMGroupsOrFrameEnd --> sWaitForTimestampReference : any other / aResetEventFrame
sWaitForColumnOrSMGroupsOrFrameEnd --> sWaitForSMGroups : eColumn[gIsSameFrameNumber] / aSetColumnData
sWaitForColumnOrSMGroupsOrFrameEnd --> sWaitForColumnOrSMGroupsOrFrameEnd : eSMGroup / aGenerateEventsFromSMGroup
sWaitForColumnOrSMGroupsOrFrameEnd --> sWaitForTimestampReference : eFrameEnd[gVerifyFrameNumber]

@enduml
