squirrel状态机sample