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