← 개념 인덱스

11 핵심 엔티티

Ds2 모델의 모든 표현은 다음 11개 엔티티의 조합으로 만들어집니다.

엔티티 정의

#이름한글역할관련 시나리오
1Project프로젝트최상위 컨테이너 — DsSystem들의 묶음전체
2DsSystem시스템설비/라인 단위 — 1개 Flow 그룹 소유전체
3Device디바이스물리 자산 (실린더/모터/센서)S01-S20
4Flow플로우동작 시퀀스 그래프 (Work 노드의 모음)전체
5Work워크실행 단위 노드 (1 Action 또는 Multi-Action)전체
6Call호출다른 Flow/Action 호출 노드S08·S11·S12
7ApiDefAPI 정의Device 가 제공하는 능력 정의전체
8ApiCallAPI 호출Work 안에서 ApiDef 호출 (Action 인스턴스)전체
9TokenSpec토큰 사양Flow 토큰의 흐름/병합 규칙S08·S12·S15
10ArrowWorkWork 화살표Work 간 연결 (Sequential/Parallel)전체
11ArrowCallCall 화살표Call 노드 간 연결S08·S11·S12

F# 타입 시그니처 (Ds2.Core/Entities.fs 발췌)

// 최상위 컨테이너
type Project = { Name: string; Systems: DsSystem list }
type DsSystem = { Name: string; Devices: Device list; Flows: Flow list }

// 물리 자산 + 능력
type Device = { Name: string; ApiDefs: ApiDef list }
type ApiDef = {
  Name: string
  ActionType: ActionType      // Normal | Push | Pulse | Trigger | Continuous
  SensingType: SensingType    // InputSensor | Bypass | Timeout | External | Custom | Composite
  InTag: string option
  OutTag: string option
}

// 시퀀스 그래프
type Flow = { Name: string; Works: Work list; Arrows: ArrowWork list; Tokens: TokenSpec list }
type Work = { Id: WorkId; ApiCalls: ApiCall list }
type Call = { Id: CallId; Target: FlowRef }
type ApiCall = { Ref: ApiDefRef; Args: ApiArg list }
type ArrowWork = { Src: WorkId; Dst: WorkId; Kind: ArrowKind }
type ArrowCall = { Src: CallId; Dst: CallId; Kind: ArrowKind }
type TokenSpec = { Source: WorkId; Merge: MergeKind }
11 entities relation

11 엔티티 관계도