build: switch to NodeNext module resolution
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 2.0 / Variables.ts
CommitLineData
a6ef1ece
JB
1import type { EVSEType, StatusInfoType } from './Common.js';
2import type { JsonObject } from '../../JsonType.js';
28f1c574
JB
3
4enum OCPP20ComponentName {
857d8dd9
JB
5 AlignedDataCtrlr = 'AlignedDataCtrlr',
6 AuthCacheCtrlr = 'AuthCacheCtrlr',
7 AuthCtrlr = 'AuthCtrlr',
8 CHAdeMOCtrlr = 'CHAdeMOCtrlr',
9 ClockCtrlr = 'ClockCtrlr',
10 CustomizationCtrlr = 'CustomizationCtrlr',
11 DeviceDataCtrlr = 'DeviceDataCtrlr',
12 DisplayMessageCtrlr = 'DisplayMessageCtrlr',
13 ISO15118Ctrlr = 'ISO15118Ctrlr',
14 LocalAuthListCtrlr = 'LocalAuthListCtrlr',
15 MonitoringCtrlr = 'MonitoringCtrlr',
16 OCPPCommCtrlr = 'OCPPCommCtrlr',
17 ReservationCtrlr = 'ReservationCtrlr',
18 SampledDataCtrlr = 'SampledDataCtrlr',
19 SecurityCtrlr = 'SecurityCtrlr',
20 SmartChargingCtrlr = 'SmartChargingCtrlr',
21 TariffCostCtrlr = 'TariffCostCtrlr',
22 TxCtrlr = 'TxCtrlr',
23}
24
25export enum OCPP20RequiredVariableName {
26 MessageTimeout = 'MessageTimeout',
27 FileTransferProtocols = 'FileTransferProtocols',
28 NetworkConfigurationPriority = 'NetworkConfigurationPriority',
29 NetworkProfileConnectionAttempts = 'NetworkProfileConnectionAttempts',
30 OfflineThreshold = 'OfflineThreshold',
31 MessageAttempts = 'TransactionEvent',
32 MessageAttemptInterval = 'MessageAttemptInterval',
33 UnlockOnEVSideDisconnect = 'UnlockOnEVSideDisconnect',
34 ResetRetries = 'ResetRetries',
35 ItemsPerMessage = 'ItemsPerMessage',
36 BytesPerMessage = 'BytesPerMessage',
37 DateTime = 'DateTime',
38 TimeSource = 'TimeSource',
39 OrganizationName = 'OrganizationName',
40 CertificateEntries = 'CertificateEntries',
41 SecurityProfile = 'SecurityProfile',
42 AuthorizeRemoteStart = 'AuthorizeRemoteStart',
43 LocalAuthorizeOffline = 'LocalAuthorizeOffline',
44 LocalPreAuthorize = 'LocalPreAuthorize',
45 EVConnectionTimeOut = 'EVConnectionTimeOut',
46 StopTxOnEVSideDisconnect = 'StopTxOnEVSideDisconnect',
47 TxStartPoint = 'TxStartPoint',
48 TxStopPoint = 'TxStopPoint',
49 StopTxOnInvalidId = 'StopTxOnInvalidId',
50 TxEndedMeasurands = 'TxEndedMeasurands',
51 TxStartedMeasurands = 'TxStartedMeasurands',
52 TxUpdatedMeasurands = 'TxUpdatedMeasurands',
53 TxUpdatedInterval = 'TxUpdatedInterval',
54}
55
56export enum OCPP20OptionalVariableName {
57 HeartbeatInterval = 'HeartbeatInterval',
58 WebSocketPingInterval = 'WebSocketPingInterval',
59}
60
61export enum OCPP20VendorVariableName {
62 ConnectionUrl = 'ConnectionUrl',
63}
28f1c574
JB
64
65enum AttributeEnumType {
66 Actual = 'Actual',
67 Target = 'Target',
68 MinSet = 'MinSet',
69 MaxSet = 'MaxSet',
70}
71
72type ComponentType = {
73 name: string | OCPP20ComponentName;
74 instance?: string;
75 evse?: EVSEType;
76} & JsonObject;
77
6dad8e21
JB
78type VariableName =
79 | string
80 | OCPP20RequiredVariableName
81 | OCPP20OptionalVariableName
82 | OCPP20VendorVariableName;
83
28f1c574 84type VariableType = {
6dad8e21 85 name: VariableName;
28f1c574
JB
86 instance?: string;
87} & JsonObject;
88
89export type OCPP20SetVariableDataType = {
90 attributeType?: AttributeEnumType;
91 attributeValue: string;
92 component: ComponentType;
93 variable: VariableType;
94} & JsonObject;
95
96enum SetVariableStatusEnumType {
97 Accepted = 'Accepted',
98 Rejected = 'Rejected',
99 UnknownComponent = 'UnknownComponent',
100 UnknownVariable = 'UnknownVariable',
101 NotSupportedAttributeType = 'NotSupportedAttributeType',
102 RebootRequired = 'RebootRequired',
103}
104
105export type OCPP20SetVariableResultType = {
106 attributeType?: AttributeEnumType;
107 attributeStatus: SetVariableStatusEnumType;
108 component: ComponentType;
109 variable: VariableType;
110 attributeStatusInfo?: StatusInfoType;
111} & JsonObject;
112
e1d9a0f4 113export type OCPP20ComponentVariableType = {
28f1c574
JB
114 component: ComponentType;
115 variable?: VariableType;
116} & JsonObject;