ApiDef Entity

API definition · API 정의 · API-Definition
IRI (semanticId)
https://dualsoftdev.github.io/aas-semantics/entity/ApiDef/1/0

설명 / Description / Beschreibung

한국어
디바이스가 노출하는 API 정의 (입력/출력 태그 + 동작 시그니처).
English
API exposed by a device (signature — input/output tags + behavior).
Deutsch
Vom Gerät bereitgestellte API (Signatur — Eingangs-/Ausgangstags + Verhalten).

다이어그램 / Diagram

전체 구조 / Overview — 이 엔티티가 DS 안에서 위치

Project TokenSpec Recipe · #1 DsSystem ApiDef ★ ApiDef TAG Flow Work Call ApiCall Call₂ Work₂ Write Read Write Read DsSystem Work Call ApiCall ApiDef → DsSystem DsSystem Work Call ApiCall ApiDef → DsSystem ArrowWork ArrowCall Tag-Pair Bus ★ ApiDef

엔티티 상세 / Entity Detail — 내부 구조 · 동작

📥 ApiDef — 디바이스 노출 API 시그니처 parentId = Device.id · Tx/Rx IOTag 매핑 · ActionType 4종 ApiDef "MOVE_TO_A" parentId=Robot1.id · ApiDefActionType=Pulse · TxGuid=<OutTag.id> · RxGuid=<InTag.id> 메서드 시그니처 (function signature) ▶ Input (RxGuid) InTag = M_Trigger DataType = BOOL PLC: %M001 호출자 → 디바이스 (수신 IOTag) Pulse 300ms ◀ Output (TxGuid) OutTag = M_Done DataType = BOOL PLC: %M002 디바이스 → 호출자 (송신 IOTag) ApiDefActionType DU (4종) — 디바이스 동작 패턴 Normal 즉시 실행 · Tx 1 → Rx 1 예: 센서 READ Push Tx 펄스 → Rx 응답 대기 예: ADV/RET (실린더) Pulse 짧은 트리거 펄스 예: 솔레노이드 트리거 Time(ms) 시간 기반 자동 완료 예: HOMING (3000ms)
상속 체인 / Inheritance: DsEntityDsChild

F# 타입 정의 / Type Definition

and ApiDef [<JsonConstructor>] internal (name, parentId) =
    inherit DsChild(name, parentId)

    member val ApiDefActionType : ApiDefActionType = Normal
    member val TxGuid : Guid option = None    // 송신 IOTag 참조
    member val RxGuid : Guid option = None    // 수신 IOTag 참조

// ApiDefActionType DU:
//   Normal  | Push | Pulse | Time of int (ms)

필드 / Fields

FieldTypeDefaultAAS fieldDescription
IdGuidGuid.NewGuid()Guid전역 고유 식별자 (자동 생성)
Namestring(생성자 인자)Name엔티티 이름
ParentIdGuid(생성자 인자)ParentId부모 엔티티 Id 참조
ApiDefActionTypeApiDefActionType DUNormalApiDefActionType동작 유형: Normal · Push · Pulse · Time(ms)
TxGuidGuid optionNoneTxGuid송신 IOTag Id (디바이스 → 호출자 응답)
RxGuidGuid optionNoneRxGuid수신 IOTag Id (호출자 → 디바이스 트리거)

관계 / Relationships

예제 (F#) / Example

let moveApi = ApiDef("MOVE_TO_A", robot1.Id)
moveApi.ApiDefActionType <- ApiDefActionType.Pulse
// IOTag 등록 후 TxGuid / RxGuid 연결

AAS 매핑 / AAS Mapping

ApiDef 는 디바이스 SMC 하위 ApiDefs SML 안 SMC.

원본 코드 / Source files

AAS ConceptDescription 메타

idShort: ApiDef
dataType: STRING