@operato/ops-contract 0.9.49 → 0.9.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contract.d.ts +35 -3
- package/dist/contract.js +47 -6
- package/dist/domain-catalog.d.ts +8 -1
- package/dist/domain-catalog.js +10 -2
- package/dist/energy-ingest.js +4 -1
- package/dist/intralogistics-profile.d.ts +34 -0
- package/dist/intralogistics-profile.js +36 -0
- package/dist/operational-ingest.d.ts +4 -2
- package/dist/operational-ingest.js +78 -4
- package/dist/yms-profile.d.ts +1 -1
- package/dist/yms-profile.js +1 -1
- package/dist-cjs/index.cjs +2266 -2144
- package/package.json +1 -1
package/dist/contract.d.ts
CHANGED
|
@@ -134,15 +134,21 @@ export type TaskStatus = (typeof TASK_STATUS)[number];
|
|
|
134
134
|
* 「끝났나」는 이 함수로 묻는다 — `status === 'completed'` 로 물으면 취소된 작업이 살아 있는 것으로 읽힌다.
|
|
135
135
|
* 성과 폴드는 취소를 완료로 세지 않는다(`completedMs` 가 없다 — 실적은 `aborted`).
|
|
136
136
|
*
|
|
137
|
-
* `ORDER_TERMINAL_STATUS` 와
|
|
137
|
+
* `ORDER_TERMINAL_STATUS` 와 묶지 않는다 — 실제로 갈렸다(오더에는 `failed` 가 있다, 2026-12-04) — 오더의 낱말은 도메인 것이고(계약이 닫지 않는다), 작업의 낱말은
|
|
138
138
|
* 위 `TASK_STATUS` 로 닫혀 있다. 한쪽이 늘 때 다른 쪽이 따라 늘면 안 된다.
|
|
139
139
|
*/
|
|
140
140
|
export declare const TASK_TERMINAL_STATUS: readonly ["completed", "cancelled"];
|
|
141
141
|
export declare function isTaskTerminal(t: {
|
|
142
142
|
status?: string;
|
|
143
143
|
}): boolean;
|
|
144
|
-
/**
|
|
145
|
-
|
|
144
|
+
/**
|
|
145
|
+
* 오더가 **종결 상태**로 인정되는 낱말 — 이 밖은 진행 중이다(§`isOrderTerminal`).
|
|
146
|
+
*
|
|
147
|
+
* `failed` 는 2026-12-04 에 들어왔다(operato-application ADR-0266, 구내 반송): 반송 지시는 길이 없거나 장비가 멈춰 **실패로 닫힌다**.
|
|
148
|
+
* 취소(사람이 거둔 것)와 다른 사실이고, 이 낱말이 없으면 실패한 지시가 트윈에서 영영 열린 오더로 남는다. 그 지시의 작업은 작업 낱말이
|
|
149
|
+
* 닫혀 있어 `cancelled` 로 간다 — 실패라는 사실과 그 사유는 오더가 든다.
|
|
150
|
+
*/
|
|
151
|
+
export declare const ORDER_TERMINAL_STATUS: readonly ["completed", "cancelled", "failed"];
|
|
146
152
|
/**
|
|
147
153
|
* 이 오더는 **끝났나** — 판정을 한 곳에 둔다(`locationStatusOf`·`dueStatusOf` 와 같은 규율).
|
|
148
154
|
*
|
|
@@ -1041,6 +1047,30 @@ export declare const MATERIAL_PROPERTY: {
|
|
|
1041
1047
|
/** 기준 단위 하나당 이 단위의 양. `uom` 이 대상 단위. */
|
|
1042
1048
|
readonly perBaseUnit: "perBaseUnit";
|
|
1043
1049
|
};
|
|
1050
|
+
/**
|
|
1051
|
+
* **우리가 정한 설비 속성 이름** — 표준(ISA-95 `EquipmentProperty`)은 자리만 정하고 이름을 정하지 않는다(`MATERIAL_PROPERTY` 와 같은 까닭).
|
|
1052
|
+
*
|
|
1053
|
+
* `speed`: 그 설비가 다니는 빠르기. 값은 수, 단위는 속성의 `uom`(UN/CEFACT 권고 20 — `SPEED_TO_MPS` 의 코드). **단위가 없으면 읽지 않는다** —
|
|
1054
|
+
* "3" 이 초속 3 m 인지 시속 3 km 인지 모른다.
|
|
1055
|
+
*
|
|
1056
|
+
* 왜 계약에 두나(2026-12-05, operato-intralogic design §18 · §24): 이 이름과 단위 표가 트윈 호스트(headless-twin `travel-estimator`)와 반송 관제
|
|
1057
|
+
* (operato-intralogic `route-rules`)에 따로 적혀 있었다. 화면이 받아 준 단위를 한쪽이 모르면 그쪽의 이동 시간이 오류 없이 사라진다.
|
|
1058
|
+
*/
|
|
1059
|
+
export declare const EQUIPMENT_PROPERTY: {
|
|
1060
|
+
/** 설비의 빠르기 — `uom` 이 `SPEED_TO_MPS` 의 코드. */
|
|
1061
|
+
readonly speed: "speed";
|
|
1062
|
+
};
|
|
1063
|
+
/** UN/CEFACT 권고 20 공통코드 → m/s. 모르는 코드는 바꾸지 않는다(지어내지 않는다). */
|
|
1064
|
+
export declare const SPEED_TO_MPS: Readonly<Record<string, number>>;
|
|
1065
|
+
/**
|
|
1066
|
+
* 설비 속성에서 빠르기(m/s) — `EQUIPMENT_PROPERTY.speed` 의 첫 속성. 값이 양수가 아니거나, 단위가 없거나 모르는 코드면 `undefined`
|
|
1067
|
+
* (초속인지 시속인지 가정하지 않는다).
|
|
1068
|
+
*/
|
|
1069
|
+
export declare function speedMpsOf(properties: readonly {
|
|
1070
|
+
id?: string;
|
|
1071
|
+
value?: unknown;
|
|
1072
|
+
uom?: string;
|
|
1073
|
+
}[] | null | undefined): number | undefined;
|
|
1044
1074
|
/**
|
|
1045
1075
|
* 이 품목에서 `uom` 으로 가는 계수 — **선언된 것만.** 없으면 `undefined`(추정하지 않는다).
|
|
1046
1076
|
*/
|
|
@@ -3780,6 +3810,8 @@ export interface OrderStatusDelta {
|
|
|
3780
3810
|
recipeBasis?: RecipeExecutionBasis;
|
|
3781
3811
|
/** 근거 칸이 빈 까닭(§`BASIS_UNKNOWN`). 근거가 실리면 이 칸은 없다. */
|
|
3782
3812
|
basisUnknown?: BasisUnknown;
|
|
3813
|
+
/** 실패로 닫힌 까닭 — 열린 낱말, 도메인이 소유한다(구내 반송은 `TRANSPORT_FAILURE_REASON`). 2026-12-04, `ORDER_TERMINAL_STATUS` 의 `failed` 와 함께. */
|
|
3814
|
+
reasonCode?: string;
|
|
3783
3815
|
orderId: string;
|
|
3784
3816
|
kind: string;
|
|
3785
3817
|
status: string;
|
package/dist/contract.js
CHANGED
|
@@ -59,15 +59,21 @@ export const TASK_STATUS = ['created', 'assigned', 'in-progress', 'completed', '
|
|
|
59
59
|
* 「끝났나」는 이 함수로 묻는다 — `status === 'completed'` 로 물으면 취소된 작업이 살아 있는 것으로 읽힌다.
|
|
60
60
|
* 성과 폴드는 취소를 완료로 세지 않는다(`completedMs` 가 없다 — 실적은 `aborted`).
|
|
61
61
|
*
|
|
62
|
-
* `ORDER_TERMINAL_STATUS` 와
|
|
62
|
+
* `ORDER_TERMINAL_STATUS` 와 묶지 않는다 — 실제로 갈렸다(오더에는 `failed` 가 있다, 2026-12-04) — 오더의 낱말은 도메인 것이고(계약이 닫지 않는다), 작업의 낱말은
|
|
63
63
|
* 위 `TASK_STATUS` 로 닫혀 있다. 한쪽이 늘 때 다른 쪽이 따라 늘면 안 된다.
|
|
64
64
|
*/
|
|
65
65
|
export const TASK_TERMINAL_STATUS = ['completed', 'cancelled'];
|
|
66
66
|
export function isTaskTerminal(t) {
|
|
67
67
|
return TASK_TERMINAL_STATUS.includes(String(t?.status ?? ''));
|
|
68
68
|
}
|
|
69
|
-
/**
|
|
70
|
-
|
|
69
|
+
/**
|
|
70
|
+
* 오더가 **종결 상태**로 인정되는 낱말 — 이 밖은 진행 중이다(§`isOrderTerminal`).
|
|
71
|
+
*
|
|
72
|
+
* `failed` 는 2026-12-04 에 들어왔다(operato-application ADR-0266, 구내 반송): 반송 지시는 길이 없거나 장비가 멈춰 **실패로 닫힌다**.
|
|
73
|
+
* 취소(사람이 거둔 것)와 다른 사실이고, 이 낱말이 없으면 실패한 지시가 트윈에서 영영 열린 오더로 남는다. 그 지시의 작업은 작업 낱말이
|
|
74
|
+
* 닫혀 있어 `cancelled` 로 간다 — 실패라는 사실과 그 사유는 오더가 든다.
|
|
75
|
+
*/
|
|
76
|
+
export const ORDER_TERMINAL_STATUS = ['completed', 'cancelled', 'failed'];
|
|
71
77
|
/**
|
|
72
78
|
* 이 오더는 **끝났나** — 판정을 한 곳에 둔다(`locationStatusOf`·`dueStatusOf` 와 같은 규율).
|
|
73
79
|
*
|
|
@@ -708,6 +714,42 @@ export const MATERIAL_PROPERTY = {
|
|
|
708
714
|
/** 기준 단위 하나당 이 단위의 양. `uom` 이 대상 단위. */
|
|
709
715
|
perBaseUnit: 'perBaseUnit'
|
|
710
716
|
};
|
|
717
|
+
/**
|
|
718
|
+
* **우리가 정한 설비 속성 이름** — 표준(ISA-95 `EquipmentProperty`)은 자리만 정하고 이름을 정하지 않는다(`MATERIAL_PROPERTY` 와 같은 까닭).
|
|
719
|
+
*
|
|
720
|
+
* `speed`: 그 설비가 다니는 빠르기. 값은 수, 단위는 속성의 `uom`(UN/CEFACT 권고 20 — `SPEED_TO_MPS` 의 코드). **단위가 없으면 읽지 않는다** —
|
|
721
|
+
* "3" 이 초속 3 m 인지 시속 3 km 인지 모른다.
|
|
722
|
+
*
|
|
723
|
+
* 왜 계약에 두나(2026-12-05, operato-intralogic design §18 · §24): 이 이름과 단위 표가 트윈 호스트(headless-twin `travel-estimator`)와 반송 관제
|
|
724
|
+
* (operato-intralogic `route-rules`)에 따로 적혀 있었다. 화면이 받아 준 단위를 한쪽이 모르면 그쪽의 이동 시간이 오류 없이 사라진다.
|
|
725
|
+
*/
|
|
726
|
+
export const EQUIPMENT_PROPERTY = {
|
|
727
|
+
/** 설비의 빠르기 — `uom` 이 `SPEED_TO_MPS` 의 코드. */
|
|
728
|
+
speed: 'speed'
|
|
729
|
+
};
|
|
730
|
+
/** UN/CEFACT 권고 20 공통코드 → m/s. 모르는 코드는 바꾸지 않는다(지어내지 않는다). */
|
|
731
|
+
export const SPEED_TO_MPS = {
|
|
732
|
+
/** metre per second */
|
|
733
|
+
MTS: 1,
|
|
734
|
+
/** kilometre per hour */
|
|
735
|
+
KMH: 1000 / 3600,
|
|
736
|
+
/** foot per second */
|
|
737
|
+
'2M': 0.3048,
|
|
738
|
+
/** mile per hour */
|
|
739
|
+
HM: 0.44704
|
|
740
|
+
};
|
|
741
|
+
/**
|
|
742
|
+
* 설비 속성에서 빠르기(m/s) — `EQUIPMENT_PROPERTY.speed` 의 첫 속성. 값이 양수가 아니거나, 단위가 없거나 모르는 코드면 `undefined`
|
|
743
|
+
* (초속인지 시속인지 가정하지 않는다).
|
|
744
|
+
*/
|
|
745
|
+
export function speedMpsOf(properties) {
|
|
746
|
+
const speed = (properties ?? []).find(one => one?.id === EQUIPMENT_PROPERTY.speed);
|
|
747
|
+
if (!speed)
|
|
748
|
+
return undefined;
|
|
749
|
+
const value = typeof speed.value === 'number' ? speed.value : Number(speed.value);
|
|
750
|
+
const factor = speed.uom ? SPEED_TO_MPS[speed.uom] : undefined;
|
|
751
|
+
return Number.isFinite(value) && value > 0 && factor !== undefined ? value * factor : undefined;
|
|
752
|
+
}
|
|
711
753
|
/**
|
|
712
754
|
* 이 품목에서 `uom` 으로 가는 계수 — **선언된 것만.** 없으면 `undefined`(추정하지 않는다).
|
|
713
755
|
*/
|
|
@@ -1278,9 +1320,8 @@ export const OP_EVENT = {
|
|
|
1278
1320
|
* The four facts that carry `EquipmentState.travel` into the journal (state ⊆ events). Sent on change, never per tick.
|
|
1279
1321
|
* Payloads: `TravelPassedFact` · `TravelReservationFact` · `TravelLinkFact` · `TravelPoseFact`.
|
|
1280
1322
|
*
|
|
1281
|
-
* The transport control product sends them as
|
|
1282
|
-
* `
|
|
1283
|
-
* does not show travel.
|
|
1323
|
+
* The transport control product sends them as operational records (`operational-ingest` kinds `travel-passed`,
|
|
1324
|
+
* `travel-reservation`, `travel-link`, `travel-pose`, 2026-12-04); the observed reducer folds them into `EquipmentState.travel`.
|
|
1284
1325
|
*/
|
|
1285
1326
|
travelPassed: 'equipment.passed',
|
|
1286
1327
|
travelReservation: 'equipment.reservation',
|
package/dist/domain-catalog.d.ts
CHANGED
|
@@ -496,5 +496,12 @@ export declare const axisAppliesTo: (axis: string, system?: string) => boolean;
|
|
|
496
496
|
export declare const levelOfLocationType: (typeKey: string, system?: string) => EquipmentLevel | undefined;
|
|
497
497
|
/** 그 종류의 트윈이 갖는 축들 — 개념 지도·적합성 표가 이 목록으로 그린다. */
|
|
498
498
|
export declare const axesOfSystem: (system?: string) => TwinAxisInfo[];
|
|
499
|
-
/**
|
|
499
|
+
/**
|
|
500
|
+
* 타입 키 → 능력 프로파일(커널 SSOT). 호스트가 라이브 페이로드에 투영, 컴포넌트가 능력을 렌더.
|
|
501
|
+
*
|
|
502
|
+
* The area's own types come first. A key the area does not define is looked up in the intralogistics vocabulary (`ILG_TYPES`):
|
|
503
|
+
* transport crosses areas as a core facet, so an AMR in a warehouse twin and in a plant twin is the same type
|
|
504
|
+
* (operato-application ADR-0266 decision 5, design/plans/transport-execution-wiring.md W1). The contract test keeps the two
|
|
505
|
+
* lists free of shared keys, so the order never changes an answer today.
|
|
506
|
+
*/
|
|
500
507
|
export declare function capabilitiesForType(system: DomainSystem, typeKey: string): CapabilityKey[];
|
package/dist/domain-catalog.js
CHANGED
|
@@ -2,6 +2,7 @@ import { WMS_TYPES } from "./wms-profile.js";
|
|
|
2
2
|
import { YMS_TYPES } from "./yms-profile.js";
|
|
3
3
|
import { MES_TYPES } from "./mes-profile.js";
|
|
4
4
|
import { EMS_TYPES } from "./ems-profile.js";
|
|
5
|
+
import { ILG_TYPES } from "./intralogistics-profile.js";
|
|
5
6
|
const locationKeys = (types) => types.filter(t => t.role === 'location').map(t => t.key);
|
|
6
7
|
export const DOMAIN_CATALOG = {
|
|
7
8
|
// label 은 언어 중립 i18n 키(twin.system.<code>) — 사람 언어는 표현계층이 렌더(L2).
|
|
@@ -490,7 +491,14 @@ export const levelOfLocationType = (typeKey, system) => {
|
|
|
490
491
|
};
|
|
491
492
|
/** 그 종류의 트윈이 갖는 축들 — 개념 지도·적합성 표가 이 목록으로 그린다. */
|
|
492
493
|
export const axesOfSystem = (system) => TWIN_AXES.filter(a => axisAppliesTo(a.axis, system));
|
|
493
|
-
/**
|
|
494
|
+
/**
|
|
495
|
+
* 타입 키 → 능력 프로파일(커널 SSOT). 호스트가 라이브 페이로드에 투영, 컴포넌트가 능력을 렌더.
|
|
496
|
+
*
|
|
497
|
+
* The area's own types come first. A key the area does not define is looked up in the intralogistics vocabulary (`ILG_TYPES`):
|
|
498
|
+
* transport crosses areas as a core facet, so an AMR in a warehouse twin and in a plant twin is the same type
|
|
499
|
+
* (operato-application ADR-0266 decision 5, design/plans/transport-execution-wiring.md W1). The contract test keeps the two
|
|
500
|
+
* lists free of shared keys, so the order never changes an answer today.
|
|
501
|
+
*/
|
|
494
502
|
export function capabilitiesForType(system, typeKey) {
|
|
495
|
-
return DOMAIN_CATALOG[system]?.types.find(t => t.key === typeKey)?.capabilities ?? [];
|
|
503
|
+
return DOMAIN_CATALOG[system]?.types.find(t => t.key === typeKey)?.capabilities ?? ILG_TYPES.find(t => t.key === typeKey)?.capabilities ?? [];
|
|
496
504
|
}
|
package/dist/energy-ingest.js
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* 값(`kW`)이 없는 표본은 **거부하지 않는다**: 계량기가 살아 있다는 사실 자체가 관측이고, 커널이
|
|
22
22
|
* 「받았지만 부하를 못 읽었다」를 구별해 낸다(`observedAbsence: 'no-load-samples'`).
|
|
23
23
|
*/
|
|
24
|
+
import { isTravelRecord } from "./operational-ingest.js";
|
|
24
25
|
import { ENERGY_EVENT, OBSERVATION_BASIS } from "./contract.js";
|
|
25
26
|
/** 이 레코드가 에너지 표본인가 — 라우팅 판정을 한 곳에 둔다(소비처가 각자 짐작하지 않게). */
|
|
26
27
|
export function isEnergyRecord(record) {
|
|
@@ -123,7 +124,9 @@ export function isEnergyEquipmentRecord(record) {
|
|
|
123
124
|
r.epc === undefined &&
|
|
124
125
|
r.meterId === undefined &&
|
|
125
126
|
/* 적산을 실었으면 발전이다 — 이 문의 값은 상태이고, 적산은 자기 문이 있다. */
|
|
126
|
-
r.kWh === undefined
|
|
127
|
+
r.kWh === undefined &&
|
|
128
|
+
/* 운행 사실(지난 자리 · 잡은 구간 · 통신 · 위치)도 `equipmentId` 를 싣는다 — 그것은 운영 문의 것이다(2026-12-04). */
|
|
129
|
+
!isTravelRecord(r));
|
|
127
130
|
}
|
|
128
131
|
/**
|
|
129
132
|
* 설비 에너지 레코드 → 봉투. 계량과 같은 규율이다: 지어낼 수 없는 것이 빠지면 받지 않고, 받지 않은 것은
|
|
@@ -19,6 +19,40 @@ export type IlgLocationType = (typeof ILG_LOCATION_TYPES)[number];
|
|
|
19
19
|
export declare const ILG_TYPES: TwinTypeInfo[];
|
|
20
20
|
/** This list's entry for a type key, or `undefined`. */
|
|
21
21
|
export declare function intralogisticsTypeOf(key: string): TwinTypeInfo | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Whether equipment of this type travels the route network under transport control (`guided`). The app and the kernel read the
|
|
24
|
+
* same answer from the vocabulary.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isGuidedType(key: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Equipment property ids transport simulation reads (`ResourceProperty.id` on equipment or its class). The standards name no such
|
|
29
|
+
* parameters, so they are named here, once - like `OP_PARAM` - and the fact that we named them is not hidden
|
|
30
|
+
* (design/plans/transport-execution-wiring.md W2). Each is a percentage of full charge, so its unit is UN/CEFACT `P1` (percent);
|
|
31
|
+
* a value without that unit is not read - a physical quantity without a unit cannot be used.
|
|
32
|
+
*
|
|
33
|
+
* Absent properties mean the battery is not modelled for that machine: charge stays unknown rather than starting at a made-up
|
|
34
|
+
* level or draining at a made-up rate.
|
|
35
|
+
*/
|
|
36
|
+
export declare const ILG_EQUIPMENT_PROPERTY: {
|
|
37
|
+
/** State of charge when the simulation starts, percent (`P1`). */
|
|
38
|
+
readonly charge: "charge";
|
|
39
|
+
/** Charge used per metre travelled, percentage points (`P1`). */
|
|
40
|
+
readonly chargeUsePerMetre: "chargeUsePerMetre";
|
|
41
|
+
/** Charge gained per minute on a charger, percentage points (`P1`). */
|
|
42
|
+
readonly chargeGainPerMinute: "chargeGainPerMinute";
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Equipment property ids that name a machine to its robot link (operato-application ADR-0266 decision 10, operato-intralogic design §14,
|
|
46
|
+
* 2026-12-04). VDA 5050 addresses a vehicle by manufacturer and serial number - its topics are
|
|
47
|
+
* `<interface>/<majorVersion>/<manufacturer>/<serialNumber>/<topic>` - and these are the two values, as text, without a unit.
|
|
48
|
+
* A machine without both is outside the robot link: people report its travel by hand.
|
|
49
|
+
*/
|
|
50
|
+
export declare const ILG_ROBOT_IDENTITY_PROPERTY: {
|
|
51
|
+
readonly manufacturer: "manufacturer";
|
|
52
|
+
readonly serialNumber: "serialNumber";
|
|
53
|
+
};
|
|
54
|
+
/** UN/CEFACT common code for percent - the unit of every `ILG_EQUIPMENT_PROPERTY`. */
|
|
55
|
+
export declare const PERCENT_UOM = "P1";
|
|
22
56
|
/** A transport command (MCS) - `OrderState.kind`. */
|
|
23
57
|
export declare const ILG_ORDER_KIND: {
|
|
24
58
|
readonly transport: "transport";
|
|
@@ -65,6 +65,42 @@ export const ILG_TYPES = [
|
|
|
65
65
|
export function intralogisticsTypeOf(key) {
|
|
66
66
|
return ILG_TYPES.find(t => t.key === key);
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Whether equipment of this type travels the route network under transport control (`guided`). The app and the kernel read the
|
|
70
|
+
* same answer from the vocabulary.
|
|
71
|
+
*/
|
|
72
|
+
export function isGuidedType(key) {
|
|
73
|
+
return intralogisticsTypeOf(key)?.capabilities.includes('guided') ?? false;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Equipment property ids transport simulation reads (`ResourceProperty.id` on equipment or its class). The standards name no such
|
|
77
|
+
* parameters, so they are named here, once - like `OP_PARAM` - and the fact that we named them is not hidden
|
|
78
|
+
* (design/plans/transport-execution-wiring.md W2). Each is a percentage of full charge, so its unit is UN/CEFACT `P1` (percent);
|
|
79
|
+
* a value without that unit is not read - a physical quantity without a unit cannot be used.
|
|
80
|
+
*
|
|
81
|
+
* Absent properties mean the battery is not modelled for that machine: charge stays unknown rather than starting at a made-up
|
|
82
|
+
* level or draining at a made-up rate.
|
|
83
|
+
*/
|
|
84
|
+
export const ILG_EQUIPMENT_PROPERTY = {
|
|
85
|
+
/** State of charge when the simulation starts, percent (`P1`). */
|
|
86
|
+
charge: 'charge',
|
|
87
|
+
/** Charge used per metre travelled, percentage points (`P1`). */
|
|
88
|
+
chargeUsePerMetre: 'chargeUsePerMetre',
|
|
89
|
+
/** Charge gained per minute on a charger, percentage points (`P1`). */
|
|
90
|
+
chargeGainPerMinute: 'chargeGainPerMinute'
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Equipment property ids that name a machine to its robot link (operato-application ADR-0266 decision 10, operato-intralogic design §14,
|
|
94
|
+
* 2026-12-04). VDA 5050 addresses a vehicle by manufacturer and serial number - its topics are
|
|
95
|
+
* `<interface>/<majorVersion>/<manufacturer>/<serialNumber>/<topic>` - and these are the two values, as text, without a unit.
|
|
96
|
+
* A machine without both is outside the robot link: people report its travel by hand.
|
|
97
|
+
*/
|
|
98
|
+
export const ILG_ROBOT_IDENTITY_PROPERTY = {
|
|
99
|
+
manufacturer: 'manufacturer',
|
|
100
|
+
serialNumber: 'serialNumber'
|
|
101
|
+
};
|
|
102
|
+
/** UN/CEFACT common code for percent - the unit of every `ILG_EQUIPMENT_PROPERTY`. */
|
|
103
|
+
export const PERCENT_UOM = 'P1';
|
|
68
104
|
/** A transport command (MCS) - `OrderState.kind`. */
|
|
69
105
|
export const ILG_ORDER_KIND = {
|
|
70
106
|
transport: 'transport'
|
|
@@ -4,7 +4,7 @@ import type { IngestResult } from './face2-adapter.ts';
|
|
|
4
4
|
* 주석의 수가 union 보다 오래 살아 읽는 사람이 여섯에서 멈췄다). 리듀서가 다루는 것과 같은 목록이다(주목 확인은 우리 안의
|
|
5
5
|
* 행위라 제외).
|
|
6
6
|
*/
|
|
7
|
-
export type OperationalKind = 'task' | 'equipment' | 'equipment-period' | 'person' | 'asset' | 'order' | 'quality' | 'test' | 'disposition' | 'material-lot' | 'observation' | 'complete';
|
|
7
|
+
export type OperationalKind = 'task' | 'equipment' | 'equipment-period' | 'person' | 'asset' | 'order' | 'quality' | 'test' | 'disposition' | 'material-lot' | 'observation' | 'complete' | 'travel-passed' | 'travel-reservation' | 'travel-link' | 'travel-pose';
|
|
8
8
|
/**
|
|
9
9
|
* 정규 운영 레코드 — **델타의 필드 이름 + 시각(`at`)**.
|
|
10
10
|
*
|
|
@@ -51,11 +51,13 @@ export interface ObjectShape {
|
|
|
51
51
|
/** 0 보다 커야 하는 수 — 「모른다」는 **비워서** 말한다(0 으로 말하지 않는다). */
|
|
52
52
|
positive?: readonly string[];
|
|
53
53
|
}
|
|
54
|
+
/** 이 레코드가 운행 사실인가 — 설비 에너지 판정이 묻는다(`isEnergyEquipmentRecord`, 두 판정은 배타). */
|
|
55
|
+
export declare function isTravelRecord(record: unknown): boolean;
|
|
54
56
|
/**
|
|
55
57
|
* 이 레코드가 어느 운영 사실인가 — **라우팅 판정을 한 곳에 둔다**(소비처가 각자 짐작하지 않게).
|
|
56
58
|
*
|
|
57
59
|
* EPCIS·에너지와 겹치지 않게 본다: `epc`·`meterId` 가 있으면 그쪽 어휘이고, `equipmentId` 는 설비
|
|
58
|
-
* **에너지** 상태의 이름이다(운영 설비는 `moverId`). 품질은 설비와 정체 필드를 공유하므로 `good` 으로
|
|
60
|
+
* **에너지** 상태의 이름이다(운영 설비는 `moverId`) — 운행 사실 넷만 그 이름을 쓴다(위 `travel-*`). 품질은 설비와 정체 필드를 공유하므로 `good` 으로
|
|
59
61
|
* 가른다 — 둘 다 아니면 어느 쪽인지 모르는 것이고, 모르면 받지 않는다.
|
|
60
62
|
*
|
|
61
63
|
* ── 순서가 뜻을 갖는다: **주체와 참조는 다르다** ────────────────────────────
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
*/
|
|
37
37
|
import { OP_EVENT, TASK_STATUS, BASIS_UNKNOWN, EQUIPMENT_STATUS, PERSON_STATUS, ASSET_STATUS, DISPOSITION_DECISION, MATERIAL_ACTUAL_USE, MATERIAL_LOT_USE, isTestSpecificationBasis, isRecipeExecutionBasis, isMaterialExecutionBasis } from "./contract.js";
|
|
38
38
|
import { isWorkShiftExecutionBasis } from "./work-shift-basis.js";
|
|
39
|
+
import { TRAVEL_LINK_JUDGED_BY, TRAVEL_LINK_STATE } from "./travel.js";
|
|
39
40
|
/**
|
|
40
41
|
* 객체 한 줄이 선언된 안쪽 모양을 지키나 — **선언하지 않은 자리는 보지 않는다.**
|
|
41
42
|
*
|
|
@@ -231,7 +232,12 @@ const SPECS = {
|
|
|
231
232
|
*/
|
|
232
233
|
recipeKey: 'string', recipeBasis: 'object', materialBasis: 'object[]',
|
|
233
234
|
/* 근거 칸이 빈 까닭 — 닫힌 낱말이다(§`BASIS_UNKNOWN`). 투입이 근거 장치보다 먼저였던 오더도 이행은 사실이다. */
|
|
234
|
-
basisUnknown: 'string'
|
|
235
|
+
basisUnknown: 'string',
|
|
236
|
+
/*
|
|
237
|
+
* 실패 · 취소로 닫힌 까닭 — 열린 낱말이다(도메인이 소유한다. 구내 반송은 `TRANSPORT_FAILURE_REASON`). 2026-12-04: 반송 지시가
|
|
238
|
+
* 실패로 닫힐 때(`ORDER_TERMINAL_STATUS` 의 `failed`) 그 사유가 오더에 실린다 — 그 작업은 `cancelled` 로 가서 사유를 들 곳이 없다.
|
|
239
|
+
*/
|
|
240
|
+
reasonCode: 'string'
|
|
235
241
|
},
|
|
236
242
|
/* 상태·종류는 도메인이 소유한다 — 닫지 않는다. 근거가 빈 까닭은 커널이 읽으므로 닫는다. */
|
|
237
243
|
enums: { basisUnknown: BASIS_UNKNOWN },
|
|
@@ -441,13 +447,77 @@ const SPECS = {
|
|
|
441
447
|
effectiveTime: 'string', effectiveEndTime: 'string', recordTime: 'string',
|
|
442
448
|
source: 'string', derived: 'boolean'
|
|
443
449
|
}
|
|
450
|
+
},
|
|
451
|
+
/*
|
|
452
|
+
* ── 경로망 위의 운행 (2026-12-04, operato-application ADR-0266 결정 8 ②, `travel.ts`) ─────────────────────────────────────
|
|
453
|
+
*
|
|
454
|
+
* 구내 반송 제품이 보내는 넷. 사건 이름 · 데이터 모양은 이미 있었고(`OP_EVENT.travel*`, 커널의 접기도 섰다) 들어올 문만 없었다 —
|
|
455
|
+
* 그래서 이 표에 선다(고칠 자리가 셋인 까닭, 위 `match` 의 머리말).
|
|
456
|
+
*
|
|
457
|
+
* 장비를 `equipmentId` 로 부른다(`travel.ts` 의 결정 — 옛 와이어 이름이 아니다). 그 이름은 설비 **에너지** 상태의 것이기도 해서,
|
|
458
|
+
* 갈래는 **함께 오는 칸**으로 가른다: 지난 자리(`location`) · 잡은 구간(`connectionIds`) · 통신(`link`) · 위치(`pose`). 에너지 문은
|
|
459
|
+
* 이 넷을 밀어낸다(`isEnergyEquipmentRecord` — 판정끼리 배타). 이 갈래들은 다른 어떤 갈래보다 먼저 본다 — 정체 칸이 다른 갈래와
|
|
460
|
+
* 겹치지 않으므로 순서는 넷 사이의 것이다.
|
|
461
|
+
*/
|
|
462
|
+
'travel-passed': {
|
|
463
|
+
eventType: OP_EVENT.travelPassed,
|
|
464
|
+
match: ['equipmentId', 'location'],
|
|
465
|
+
matchOrder: 5,
|
|
466
|
+
identity: 'equipmentId',
|
|
467
|
+
required: ['equipmentId', 'location'],
|
|
468
|
+
fields: { equipmentId: 'string', location: 'string', heading: 'number', recordTime: 'string' }
|
|
469
|
+
},
|
|
470
|
+
'travel-reservation': {
|
|
471
|
+
eventType: OP_EVENT.travelReservation,
|
|
472
|
+
match: ['equipmentId', 'connectionIds'],
|
|
473
|
+
matchOrder: 5,
|
|
474
|
+
identity: 'equipmentId',
|
|
475
|
+
/* 빈 목록은 「전부 놓았다」는 말이다 — 비어 있어도 받는다(아래 `ingest` 의 빈 값 규칙은 배열을 비었다고 보지 않는다). */
|
|
476
|
+
required: ['equipmentId', 'connectionIds'],
|
|
477
|
+
fields: { equipmentId: 'string', connectionIds: 'string[]', recordTime: 'string' }
|
|
478
|
+
},
|
|
479
|
+
'travel-link': {
|
|
480
|
+
eventType: OP_EVENT.travelLink,
|
|
481
|
+
match: ['equipmentId', 'link'],
|
|
482
|
+
matchOrder: 5,
|
|
483
|
+
identity: 'equipmentId',
|
|
484
|
+
required: ['equipmentId', 'link'],
|
|
485
|
+
fields: { equipmentId: 'string', link: 'object', recordTime: 'string' },
|
|
486
|
+
shapes: {
|
|
487
|
+
link: {
|
|
488
|
+
required: ['state', 'lastSeenAt', 'judgedBy'],
|
|
489
|
+
fields: { lastSeenAt: 'string', lastLocation: 'string' },
|
|
490
|
+
enums: { state: TRAVEL_LINK_STATE, judgedBy: TRAVEL_LINK_JUDGED_BY }
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
'travel-pose': {
|
|
495
|
+
eventType: OP_EVENT.travelPose,
|
|
496
|
+
match: ['equipmentId', 'pose'],
|
|
497
|
+
matchOrder: 5,
|
|
498
|
+
identity: 'equipmentId',
|
|
499
|
+
required: ['equipmentId', 'pose'],
|
|
500
|
+
fields: { equipmentId: 'string', pose: 'object', recordTime: 'string' },
|
|
501
|
+
shapes: {
|
|
502
|
+
pose: {
|
|
503
|
+
required: ['x', 'y', 'theta', 'networkVersion', 'at'],
|
|
504
|
+
fields: { x: 'number', y: 'number', theta: 'number', networkVersion: 'string', at: 'string', deviationM: 'number' }
|
|
505
|
+
}
|
|
506
|
+
}
|
|
444
507
|
}
|
|
445
508
|
};
|
|
509
|
+
/** 운행 사실의 갈래 — 정체 칸이 `equipmentId` 인 것들. 에너지 문이 이것으로 밀어낸다. */
|
|
510
|
+
const TRAVEL_KINDS = Object.keys(SPECS).filter(kind => SPECS[kind].identity === 'equipmentId');
|
|
511
|
+
/** 이 레코드가 운행 사실인가 — 설비 에너지 판정이 묻는다(`isEnergyEquipmentRecord`, 두 판정은 배타). */
|
|
512
|
+
export function isTravelRecord(record) {
|
|
513
|
+
const kind = operationalKindOf(record);
|
|
514
|
+
return kind !== undefined && TRAVEL_KINDS.includes(kind);
|
|
515
|
+
}
|
|
446
516
|
/**
|
|
447
517
|
* 이 레코드가 어느 운영 사실인가 — **라우팅 판정을 한 곳에 둔다**(소비처가 각자 짐작하지 않게).
|
|
448
518
|
*
|
|
449
519
|
* EPCIS·에너지와 겹치지 않게 본다: `epc`·`meterId` 가 있으면 그쪽 어휘이고, `equipmentId` 는 설비
|
|
450
|
-
* **에너지** 상태의 이름이다(운영 설비는 `moverId`). 품질은 설비와 정체 필드를 공유하므로 `good` 으로
|
|
520
|
+
* **에너지** 상태의 이름이다(운영 설비는 `moverId`) — 운행 사실 넷만 그 이름을 쓴다(위 `travel-*`). 품질은 설비와 정체 필드를 공유하므로 `good` 으로
|
|
451
521
|
* 가른다 — 둘 다 아니면 어느 쪽인지 모르는 것이고, 모르면 받지 않는다.
|
|
452
522
|
*
|
|
453
523
|
* ── 순서가 뜻을 갖는다: **주체와 참조는 다르다** ────────────────────────────
|
|
@@ -462,10 +532,12 @@ export function operationalKindOf(record) {
|
|
|
462
532
|
const r = record;
|
|
463
533
|
/*
|
|
464
534
|
* EPCIS·에너지와 겹치지 않게 본다: `epc`·`meterId` 가 있으면 그쪽 어휘이고, `equipmentId` 는 설비
|
|
465
|
-
* **에너지** 상태의 이름이다(운영 설비는 `moverId`)
|
|
535
|
+
* **에너지** 상태의 이름이다(운영 설비는 `moverId`) — 운행 사실 넷만 그 이름을 쓴다.
|
|
466
536
|
*/
|
|
467
|
-
if (r.epc !== undefined || r.meterId !== undefined
|
|
537
|
+
if (r.epc !== undefined || r.meterId !== undefined)
|
|
468
538
|
return undefined;
|
|
539
|
+
/* `equipmentId` 를 실었으면 운행 사실만 본다 — 그 밖의 갈래에서 그 이름은 에너지 어휘다. */
|
|
540
|
+
const travelOnly = r.equipmentId !== undefined;
|
|
469
541
|
/* 문자열은 비어 있으면 없는 것으로 본다 — 공백만 실은 필드는 말한 것이 아니다. */
|
|
470
542
|
const present = (k) => {
|
|
471
543
|
const v = r[k];
|
|
@@ -475,6 +547,8 @@ export function operationalKindOf(record) {
|
|
|
475
547
|
};
|
|
476
548
|
for (const kind of MATCH_ORDER) {
|
|
477
549
|
const spec = SPECS[kind];
|
|
550
|
+
if (travelOnly !== (spec.identity === 'equipmentId'))
|
|
551
|
+
continue;
|
|
478
552
|
const fields = spec.match ?? [spec.identity];
|
|
479
553
|
if (fields.every(present))
|
|
480
554
|
return kind;
|
package/dist/yms-profile.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export type YardMode = (typeof YARD_MODE)[number];
|
|
|
57
57
|
/**
|
|
58
58
|
* 예약의 **상태** — 닫힌 목록.
|
|
59
59
|
*
|
|
60
|
-
* 끝나는 낱말 둘(`completed` · `cancelled`)은 계약의 `ORDER_TERMINAL_STATUS`
|
|
60
|
+
* 끝나는 낱말 둘(`completed` · `cancelled`)은 계약의 `ORDER_TERMINAL_STATUS` 에 **든 낱말**이다. 다르게 쓰면 `isOrderTerminal` 이
|
|
61
61
|
* 그것을 모르고 트윈에서 그 예약은 영영 열린 오더가 된다.
|
|
62
62
|
*/
|
|
63
63
|
export declare const YMS_APPOINTMENT_STATUS: readonly ["scheduled", "checked-in", "at-door", "completed", "cancelled"];
|
package/dist/yms-profile.js
CHANGED
|
@@ -91,7 +91,7 @@ export const YARD_MODE = ['drop', 'live'];
|
|
|
91
91
|
/**
|
|
92
92
|
* 예약의 **상태** — 닫힌 목록.
|
|
93
93
|
*
|
|
94
|
-
* 끝나는 낱말 둘(`completed` · `cancelled`)은 계약의 `ORDER_TERMINAL_STATUS`
|
|
94
|
+
* 끝나는 낱말 둘(`completed` · `cancelled`)은 계약의 `ORDER_TERMINAL_STATUS` 에 **든 낱말**이다. 다르게 쓰면 `isOrderTerminal` 이
|
|
95
95
|
* 그것을 모르고 트윈에서 그 예약은 영영 열린 오더가 된다.
|
|
96
96
|
*/
|
|
97
97
|
export const YMS_APPOINTMENT_STATUS = ['scheduled', 'checked-in', 'at-door', 'completed', 'cancelled'];
|