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