const stationInfo = chargingStation.stationInfo
if (stationInfo.chargePointModel) {
reportData.push({
- component: { name: 'ChargingStation' },
+ component: { name: OCPP20ComponentName.DeviceDataCtrlr },
variable: { name: 'Model' },
variableAttribute: [{ type: 'Actual', value: stationInfo.chargePointModel }],
variableCharacteristics: { dataType: 'string', supportsMonitoring: false },
}
if (stationInfo.chargePointVendor) {
reportData.push({
- component: { name: 'ChargingStation' },
+ component: { name: OCPP20ComponentName.DeviceDataCtrlr },
variable: { name: 'VendorName' },
variableAttribute: [{ type: 'Actual', value: stationInfo.chargePointVendor }],
variableCharacteristics: { dataType: 'string', supportsMonitoring: false },
}
if (stationInfo.firmwareVersion) {
reportData.push({
- component: { name: 'ChargingStation' },
+ component: { name: OCPP20ComponentName.DeviceDataCtrlr },
variable: { name: 'FirmwareVersion' },
variableAttribute: [{ type: 'Actual', value: stationInfo.firmwareVersion }],
variableCharacteristics: { dataType: 'string', supportsMonitoring: false },
export {
BootReasonEnumType,
GenericDeviceModelStatusEnumType,
+ OCPP20ComponentName,
OCPP20ConnectorStatusEnumType,
ReportBaseEnumType,
+ type ReportDataType,
} from './ocpp/2.0/Common.js'
export {
type OCPP20BootNotificationRequest,
type OCPP20NotifyReportRequest,
OCPP20RequestCommand,
type OCPP20StatusNotificationRequest,
- type ReportDataType,
- type VariableAttributeType,
- type VariableCharacteristicsType,
} from './ocpp/2.0/Requests.js'
export type {
OCPP20BootNotificationResponse,
OCPP20NotifyReportResponse,
OCPP20StatusNotificationResponse,
} from './ocpp/2.0/Responses.js'
-export { OCPP20ComponentName, OCPP20OptionalVariableName } from './ocpp/2.0/Variables.js'
+export { OCPP20OptionalVariableName } from './ocpp/2.0/Variables.js'
export { ChargePointErrorCode } from './ocpp/ChargePointErrorCode.js'
export {
type ChargingProfile,
import type { JsonObject } from '../../JsonType.js'
import type { GenericStatus } from '../Common.js'
+import type { VariableType } from './Variables.js'
export enum BootReasonEnumType {
ApplicationReset = 'ApplicationReset',
V2GRootCertificate = 'V2GRootCertificate',
}
+export enum OCPP20ComponentName {
+ AlignedDataCtrlr = 'AlignedDataCtrlr',
+ AuthCacheCtrlr = 'AuthCacheCtrlr',
+ AuthCtrlr = 'AuthCtrlr',
+ CHAdeMOCtrlr = 'CHAdeMOCtrlr',
+ ClockCtrlr = 'ClockCtrlr',
+ CustomizationCtrlr = 'CustomizationCtrlr',
+ DeviceDataCtrlr = 'DeviceDataCtrlr',
+ DisplayMessageCtrlr = 'DisplayMessageCtrlr',
+ ISO15118Ctrlr = 'ISO15118Ctrlr',
+ LocalAuthListCtrlr = 'LocalAuthListCtrlr',
+ MonitoringCtrlr = 'MonitoringCtrlr',
+ OCPPCommCtrlr = 'OCPPCommCtrlr',
+ ReservationCtrlr = 'ReservationCtrlr',
+ SampledDataCtrlr = 'SampledDataCtrlr',
+ SecurityCtrlr = 'SecurityCtrlr',
+ SmartChargingCtrlr = 'SmartChargingCtrlr',
+ TariffCostCtrlr = 'TariffCostCtrlr',
+ TxCtrlr = 'TxCtrlr',
+}
+
export enum OCPP20ConnectorEnumType {
cCCS1 = 'cCCS1',
cCCS2 = 'cCCS2',
export type CertificateSignedStatusEnumType = GenericStatusEnumType
+export interface ChargingStationType extends JsonObject {
+ firmwareVersion?: string
+ model: string
+ modem?: ModemType
+ serialNumber?: string
+ vendorName: string
+}
+export interface ComponentType extends JsonObject {
+ evse?: EVSEType
+ instance?: string
+ name: OCPP20ComponentName | string
+}
+
export interface EVSEType extends JsonObject {
connectorId?: string
id: number
serialNumber: string
}
+export interface ReportDataType extends JsonObject {
+ component: ComponentType
+ variable: VariableType
+ variableAttribute?: VariableAttributeType[]
+ variableCharacteristics?: VariableCharacteristicsType
+}
+
export interface StatusInfoType extends JsonObject {
additionalInfo?: string
reasonCode: string
}
+
+interface ModemType extends JsonObject {
+ iccid?: string
+ imsi?: string
+}
+
+interface VariableAttributeType extends JsonObject {
+ type?: string
+ value?: string
+}
+
+interface VariableCharacteristicsType extends JsonObject {
+ dataType: string
+ supportsMonitoring: boolean
+}
import type { JsonObject } from '../../JsonType.js'
import type {
BootReasonEnumType,
+ ChargingStationType,
InstallCertificateUseEnumType,
OCPP20ConnectorStatusEnumType,
ReportBaseEnumType,
+ ReportDataType,
} from './Common.js'
-import type {
- ChargingStationType,
- ComponentType,
- OCPP20SetVariableDataType,
- VariableType,
-} from './Variables.js'
+import type { OCPP20SetVariableDataType } from './Variables.js'
export enum OCPP20IncomingRequestCommand {
CLEAR_CACHE = 'ClearCache',
evseId: number
timestamp: Date
}
-
-export interface ReportDataType extends JsonObject {
- component: ComponentType
- variable: VariableType
- variableAttribute?: VariableAttributeType[]
- variableCharacteristics?: VariableCharacteristicsType
-}
-
-export interface VariableAttributeType extends JsonObject {
- type?: string
- value?: string
-}
-
-export interface VariableCharacteristicsType extends JsonObject {
- dataType: string
- supportsMonitoring: boolean
-}
import type { JsonObject } from '../../JsonType.js'
-import type { EVSEType, StatusInfoType } from './Common.js'
-
-export enum OCPP20ComponentName {
- AlignedDataCtrlr = 'AlignedDataCtrlr',
- AuthCacheCtrlr = 'AuthCacheCtrlr',
- AuthCtrlr = 'AuthCtrlr',
- CHAdeMOCtrlr = 'CHAdeMOCtrlr',
- ClockCtrlr = 'ClockCtrlr',
- CustomizationCtrlr = 'CustomizationCtrlr',
- DeviceDataCtrlr = 'DeviceDataCtrlr',
- DisplayMessageCtrlr = 'DisplayMessageCtrlr',
- ISO15118Ctrlr = 'ISO15118Ctrlr',
- LocalAuthListCtrlr = 'LocalAuthListCtrlr',
- MonitoringCtrlr = 'MonitoringCtrlr',
- OCPPCommCtrlr = 'OCPPCommCtrlr',
- ReservationCtrlr = 'ReservationCtrlr',
- SampledDataCtrlr = 'SampledDataCtrlr',
- SecurityCtrlr = 'SecurityCtrlr',
- SmartChargingCtrlr = 'SmartChargingCtrlr',
- TariffCostCtrlr = 'TariffCostCtrlr',
- TxCtrlr = 'TxCtrlr',
-}
+import type { ComponentType, StatusInfoType } from './Common.js'
export enum OCPP20OptionalVariableName {
HeartbeatInterval = 'HeartbeatInterval',
UnknownVariable = 'UnknownVariable',
}
-export interface ChargingStationType extends JsonObject {
- firmwareVersion?: string
- model: string
- modem?: ModemType
- serialNumber?: string
- vendorName: string
-}
-
-export interface ComponentType extends JsonObject {
- evse?: EVSEType
- instance?: string
- name: OCPP20ComponentName | string
-}
-
export interface OCPP20ComponentVariableType extends JsonObject {
component: ComponentType
variable?: VariableType
name: VariableName
}
-interface ModemType extends JsonObject {
- iccid?: string
- imsi?: string
-}
-
type VariableName =
| OCPP20OptionalVariableName
| OCPP20RequiredVariableName