@startuml
title <b>telemetry_file_sink_sm
[*] --> Not_Init
state Not_Init
state Init
state Wait_Storage
state Started
state Stopped

Not_Init --> Init: <b>init</b> \n
Init --> Wait_Storage: <b>start</b> [can_start_operation]\n/ reload_config
Init -[dotted,#blue]-> Init: <b>__periodic</b> \n/ reload_config
Wait_Storage --> Started: <b>__periodic</b> [is_storage_available]\n/ perform_file_scan
Started --> Stopped: <b>stop</b> [can_stop_operation]\n
Started -[dotted,#blue]-> Started: <b>__periodic</b> [is_storage_available]\n/ store_telemetry
Started --> Wait_Storage: <b>__periodic</b> [is_storage_blocked]\n
Started --> Wait_Storage: <b>restart</b> \n/ clean_and_reload_cfg
Stopped --> Wait_Storage: <b>start</b> [can_start_operation]\n
Stopped --> Wait_Storage: <b>__periodic</b> [is_auto_resume_timer_elapsed]\n
Stopped -[dotted,#blue]-> Stopped: <b>__periodic</b> \n/ reload_config
@enduml
