Commit | Line | Data |
---|---|---|
66a7748d | 1 | import type { JsonObject } from '../../JsonType.js' |
4c3f6c20 | 2 | import type { EVSEType, StatusInfoType } from './Common.js' |
28f1c574 JB |
3 | |
4 | enum 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', | |
a223d9be | 22 | TxCtrlr = 'TxCtrlr' |
857d8dd9 JB |
23 | } |
24 | ||
25 | export 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', | |
a223d9be | 53 | TxUpdatedInterval = 'TxUpdatedInterval' |
857d8dd9 JB |
54 | } |
55 | ||
56 | export enum OCPP20OptionalVariableName { | |
57 | HeartbeatInterval = 'HeartbeatInterval', | |
a223d9be | 58 | WebSocketPingInterval = 'WebSocketPingInterval' |
857d8dd9 JB |
59 | } |
60 | ||
61 | export enum OCPP20VendorVariableName { | |
a223d9be | 62 | ConnectionUrl = 'ConnectionUrl' |
857d8dd9 | 63 | } |
28f1c574 JB |
64 | |
65 | enum AttributeEnumType { | |
66 | Actual = 'Actual', | |
67 | Target = 'Target', | |
68 | MinSet = 'MinSet', | |
a223d9be | 69 | MaxSet = 'MaxSet' |
28f1c574 JB |
70 | } |
71 | ||
f4b3f35d | 72 | interface ComponentType extends JsonObject { |
66a7748d JB |
73 | name: string | OCPP20ComponentName |
74 | instance?: string | |
75 | evse?: EVSEType | |
f4b3f35d | 76 | } |
28f1c574 | 77 | |
6dad8e21 JB |
78 | type VariableName = |
79 | | string | |
80 | | OCPP20RequiredVariableName | |
81 | | OCPP20OptionalVariableName | |
66a7748d | 82 | | OCPP20VendorVariableName |
6dad8e21 | 83 | |
f4b3f35d | 84 | interface VariableType extends JsonObject { |
66a7748d JB |
85 | name: VariableName |
86 | instance?: string | |
f4b3f35d | 87 | } |
28f1c574 | 88 | |
f4b3f35d | 89 | export interface OCPP20SetVariableDataType extends JsonObject { |
66a7748d JB |
90 | attributeType?: AttributeEnumType |
91 | attributeValue: string | |
92 | component: ComponentType | |
93 | variable: VariableType | |
f4b3f35d | 94 | } |
28f1c574 JB |
95 | |
96 | enum SetVariableStatusEnumType { | |
97 | Accepted = 'Accepted', | |
98 | Rejected = 'Rejected', | |
99 | UnknownComponent = 'UnknownComponent', | |
100 | UnknownVariable = 'UnknownVariable', | |
101 | NotSupportedAttributeType = 'NotSupportedAttributeType', | |
a223d9be | 102 | RebootRequired = 'RebootRequired' |
28f1c574 JB |
103 | } |
104 | ||
f4b3f35d | 105 | export interface OCPP20SetVariableResultType extends JsonObject { |
66a7748d JB |
106 | attributeType?: AttributeEnumType |
107 | attributeStatus: SetVariableStatusEnumType | |
108 | component: ComponentType | |
109 | variable: VariableType | |
110 | attributeStatusInfo?: StatusInfoType | |
f4b3f35d | 111 | } |
28f1c574 | 112 | |
f4b3f35d | 113 | export interface OCPP20ComponentVariableType extends JsonObject { |
66a7748d JB |
114 | component: ComponentType |
115 | variable?: VariableType | |
f4b3f35d | 116 | } |