@zetra/citrineos-evdriver 1.8.3-fork.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,108 @@
1
+ // SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
2
+ //
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ import { OCPP2_0_1 } from '@citrineos/base';
5
+ import { LocalListAuthorization, LocalListVersion, SendLocalList, VariableAttribute, VariableCharacteristics, } from '@citrineos/data';
6
+ export class LocalAuthListService {
7
+ _localAuthListRepository;
8
+ _deviceModelRepository;
9
+ constructor(localAuthListRepository, deviceModelRepository) {
10
+ this._localAuthListRepository = localAuthListRepository;
11
+ this._deviceModelRepository = deviceModelRepository;
12
+ }
13
+ /**
14
+ * Validates a SendLocalListRequest and persists it, then returns the correlation Id.
15
+ *
16
+ * @param {string} stationId - The ID of the station to which the SendLocalListRequest belongs.
17
+ * @param {string} correlationId - The correlation Id that will be used for the SendLocalListRequest.
18
+ * @param {SendLocalListRequest} sendLocalListRequest - The SendLocalListRequest to validate and persist.
19
+ * @return {SendLocalList} The persisted SendLocalList.
20
+ */
21
+ async persistSendLocalListForStationIdAndCorrelationIdAndSendLocalListRequest(tenantId, stationId, correlationId, sendLocalListRequest) {
22
+ const localListVersion = await this._localAuthListRepository.readOnlyOneByQuery(tenantId, {
23
+ where: {
24
+ stationId: stationId,
25
+ },
26
+ include: [LocalListAuthorization],
27
+ });
28
+ const sendLocalList = await this.createSendLocalListFromStationIdAndRequestAndCurrentVersion(tenantId, stationId, correlationId, sendLocalListRequest, localListVersion);
29
+ const newLocalAuthListLength = await this.countUpdatedAuthListFromRequestAndCurrentVersion(sendLocalList, localListVersion);
30
+ // DeviceModelRefactor: If different variable characteristics are allowed for the same variable, per station, then we need to update this
31
+ const maxLocalAuthListEntries = await this.getMaxLocalAuthListEntries(tenantId);
32
+ if (!maxLocalAuthListEntries) {
33
+ throw new Error('Could not get max local auth list entries, required by D01.FR.12');
34
+ }
35
+ else if (newLocalAuthListLength > maxLocalAuthListEntries) {
36
+ throw new Error(`Updated local auth list length (${newLocalAuthListLength}) will exceed max local auth list entries (${maxLocalAuthListEntries})`);
37
+ }
38
+ const itemsPerMessageSendLocalList = (await this.getItemsPerMessageSendLocalListByStationId(tenantId, stationId)) ||
39
+ (sendLocalListRequest.localAuthorizationList
40
+ ? sendLocalListRequest.localAuthorizationList?.length
41
+ : 0);
42
+ if (itemsPerMessageSendLocalList &&
43
+ sendLocalListRequest.localAuthorizationList &&
44
+ itemsPerMessageSendLocalList < sendLocalListRequest.localAuthorizationList.length) {
45
+ throw new Error(`Number of authorizations (${sendLocalListRequest.localAuthorizationList.length}) in SendLocalListRequest (${JSON.stringify(sendLocalListRequest)}) exceeds itemsPerMessageSendLocalList (${itemsPerMessageSendLocalList}) (see D01.FR.11; break list up into multiple SendLocalListRequests of at most ${itemsPerMessageSendLocalList} authorizations by sending one with updateType Full and additional with updateType Differential until all authorizations have been sent)`);
46
+ }
47
+ return sendLocalList;
48
+ }
49
+ async createSendLocalListFromStationIdAndRequestAndCurrentVersion(tenantId, stationId, correlationId, sendLocalListRequest, localListVersion) {
50
+ if (sendLocalListRequest.versionNumber <= 0) {
51
+ throw new Error(`Version number ${sendLocalListRequest.versionNumber} must be greater than 0, see D01.FR.18`);
52
+ }
53
+ if (localListVersion && localListVersion.versionNumber >= sendLocalListRequest.versionNumber) {
54
+ throw new Error(`Current LocalListVersion for ${stationId} is ${localListVersion.versionNumber}, cannot send LocalListVersion ${sendLocalListRequest.versionNumber} (version number must be higher)`);
55
+ }
56
+ if (sendLocalListRequest.localAuthorizationList &&
57
+ sendLocalListRequest.localAuthorizationList.length > 1) {
58
+ // Check for duplicate authorizations
59
+ const idTokens = sendLocalListRequest.localAuthorizationList.map((auth) => auth.idToken.idToken + auth.idToken.type);
60
+ if (new Set(idTokens).size !== idTokens.length) {
61
+ throw new Error(`Duplicated idToken in SendLocalList ${JSON.stringify(idTokens)}`);
62
+ }
63
+ }
64
+ return await this._localAuthListRepository.createSendLocalListFromRequestData(tenantId, stationId, correlationId, sendLocalListRequest.updateType, sendLocalListRequest.versionNumber, sendLocalListRequest.localAuthorizationList ?? undefined);
65
+ }
66
+ async countUpdatedAuthListFromRequestAndCurrentVersion(sendLocalList, localListVersion) {
67
+ switch (sendLocalList?.updateType) {
68
+ case OCPP2_0_1.UpdateEnumType.Full:
69
+ return sendLocalList?.localAuthorizationList?.length ?? 0;
70
+ case OCPP2_0_1.UpdateEnumType.Differential: {
71
+ const uniqueAuths = new Set([
72
+ ...(sendLocalList.localAuthorizationList ?? []),
73
+ ...(localListVersion?.localAuthorizationList ?? []),
74
+ ].map((auth) => auth.authorizationId));
75
+ return uniqueAuths.size;
76
+ }
77
+ default:
78
+ throw new Error(`Unknown update type ${sendLocalList?.updateType}`);
79
+ }
80
+ }
81
+ async getItemsPerMessageSendLocalListByStationId(tenantId, stationId) {
82
+ const itemsPerMessageSendLocalList = await this._deviceModelRepository.readAllByQuerystring(tenantId, {
83
+ tenantId: tenantId,
84
+ stationId: stationId,
85
+ component_name: 'LocalAuthListCtrlr',
86
+ component_instance: null,
87
+ variable_name: 'ItemsPerMessage',
88
+ variable_instance: null,
89
+ type: OCPP2_0_1.AttributeEnumType.Actual,
90
+ });
91
+ if (itemsPerMessageSendLocalList.length === 0) {
92
+ return null;
93
+ }
94
+ else {
95
+ return Number(itemsPerMessageSendLocalList[0].value);
96
+ }
97
+ }
98
+ async getMaxLocalAuthListEntries(tenantId) {
99
+ const localAuthListEntriesCharacteristics = await this._deviceModelRepository.findVariableCharacteristicsByVariableNameAndVariableInstance(tenantId, 'Entries', null);
100
+ if (!localAuthListEntriesCharacteristics || !localAuthListEntriesCharacteristics.maxLimit) {
101
+ return null;
102
+ }
103
+ else {
104
+ return localAuthListEntriesCharacteristics.maxLimit;
105
+ }
106
+ }
107
+ }
108
+ //# sourceMappingURL=LocalAuthListService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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xE,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,0CAA0C,CACtD,QAAgB,EAChB,SAAiB;QAEjB,MAAM,4BAA4B,GAChC,MAAM,IAAI,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,QAAQ,EAAE;YAC/D,QAAQ,EAAE,QAAQ;YAClB,SAAS,EAAE,SAAS;YACpB,cAAc,EAAE,oBAAoB;YACpC,kBAAkB,EAAE,IAAI;YACxB,aAAa,EAAE,iBAAiB;YAChC,iBAAiB,EAAE,IAAI;YACvB,IAAI,EAAE,SAAS,CAAC,iBAAiB,CAAC,MAAM;SACzC,CAAC,CAAC;QACL,IAAI,4BAA4B,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9C,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,OAAO,MAAM,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,0BAA0B,CAAC,QAAgB;QACvD,MAAM,mCAAmC,GACvC,MAAM,IAAI,CAAC,sBAAsB,CAAC,4DAA4D,CAC5F,QAAQ,EACR,SAAS,EACT,IAAI,CACL,CAAC;QACJ,IAAI,CAAC,mCAAmC,IAAI,CAAC,mCAAmC,CAAC,QAAQ,EAAE,CAAC;YAC1F,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,OAAO,mCAAmC,CAAC,QAAQ,CAAC;QACtD,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Interface for the EVDriver module.
3
+ */
4
+ export interface IEVDriverModuleApi {
5
+ }
@@ -0,0 +1,5 @@
1
+ // SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
2
+ //
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ export {};
5
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/module/interface.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,sCAAsC"}
@@ -0,0 +1,127 @@
1
+ import type { BootstrapConfig, CallAction, HandlerProperties, IAuthorizer, ICache, IMessage, IMessageHandler, IMessageSender, SystemConfig } from '@citrineos/base';
2
+ import { AbstractModule, OCPP1_6, OCPP2_0_1, OCPPValidator } from '@citrineos/base';
3
+ import type { IAuthorizationRepository, IChargingProfileRepository, IDeviceModelRepository, ILocalAuthListRepository, ILocationRepository, IOCPPMessageRepository, IReservationRepository, ITariffRepository, ITransactionEventRepository } from '@citrineos/data';
4
+ import { CertificateAuthorityService, IdGenerator } from '@citrineos/util';
5
+ import type { ILogObj } from 'tslog';
6
+ import { Logger } from 'tslog';
7
+ import { LocalAuthListService } from './LocalAuthListService.js';
8
+ /**
9
+ * Component that handles provisioning related messages.
10
+ */
11
+ export declare class EVDriverModule extends AbstractModule {
12
+ /**
13
+ * Fields
14
+ */
15
+ _requests: CallAction[];
16
+ _responses: CallAction[];
17
+ protected _tariffRepository: ITariffRepository;
18
+ protected _locationRepository: ILocationRepository;
19
+ private _certificateAuthorityService;
20
+ private _authorizers;
21
+ private _idGenerator;
22
+ /**
23
+ * This is the constructor function that initializes the {@link EVDriverModule}.
24
+ *
25
+ * @param {BootstrapConfig & SystemConfig} config - The `config` contains configuration settings for the module.
26
+ *
27
+ * @param {ICache} [cache] - The cache instance which is shared among the modules & Central System to pass information such as blacklisted actions or boot status.
28
+ *
29
+ * @param {IMessageSender} [sender] - The `sender` parameter is an optional parameter that represents an instance of the {@link IMessageSender} interface.
30
+ * It is used to send messages from the central system to external systems or devices. If no `sender` is provided, a default {@link RabbitMqSender} instance is created and used.
31
+ *
32
+ * @param {IMessageHandler} [handler] - The `handler` parameter is an optional parameter that represents an instance of the {@link IMessageHandler} interface.
33
+ * It is used to handle incoming messages and dispatch them to the appropriate methods or functions. If no `handler` is provided, a default {@link RabbitMqReceiver} instance is created and used.
34
+ *
35
+ * @param {Logger<ILogObj>} [logger] - The `logger` parameter is an optional parameter that represents an instance of {@link Logger<ILogObj>}.
36
+ * It is used to propagate system wide logger settings and will serve as the parent logger for any sub-component logging. If no `logger` is provided, a default {@link Logger<ILogObj>} instance is created and used.
37
+ *
38
+ * @param {IAuthorizationRepository} [authorizeRepository] - An optional parameter of type {@link IAuthorizationRepository} which represents a repository for accessing and manipulating Authorization data.
39
+ * If no `authorizeRepository` is provided, a default {@link sequelize:AuthorizationRepository} instance is created and used.
40
+ *
41
+ * @param {ILocalAuthListRepository} [localAuthListRepository] - An optional parameter of type {@link ILocalAuthListRepository} which represents a repository for accessing and manipulating Local Authorization List data.
42
+ * If no `localAuthListRepository` is provided, a default {@link sequelize:localAuthListRepository} instance is created and used.
43
+ *
44
+ * @param {IDeviceModelRepository} [deviceModelRepository] - An optional parameter of type {@link IDeviceModelRepository} which represents a repository for accessing and manipulating variable data.
45
+ * If no `deviceModelRepository` is provided, a default {@link sequelize:deviceModelRepository} instance is
46
+ * created and used.
47
+ *
48
+ * @param {ITariffRepository} [tariffRepository] - An optional parameter of type {@link ITariffRepository} which
49
+ * represents a repository for accessing and manipulating variable data.
50
+ * If no `deviceModelRepository` is provided, a default {@link sequelize:tariffRepository} instance is
51
+ * created and used.
52
+ *
53
+ * @param {ITransactionEventRepository} [transactionEventRepository] - An optional parameter of type {@link ITransactionEventRepository}
54
+ * which represents a repository for accessing and manipulating transaction data.
55
+ * If no `transactionEventRepository` is provided, a default {@link sequelize:transactionEventRepository} instance is
56
+ * created and used.
57
+ *
58
+ * @param {IChargingProfileRepository} [chargingProfileRepository] - An optional parameter of type {@link IChargingProfileRepository}
59
+ * which represents a repository for accessing and manipulating charging profile data.
60
+ * If no `chargingProfileRepository` is provided, a default {@link sequelize:chargingProfileRepository} instance is created and used.
61
+ *
62
+ * @param {IReservationRepository} [reservationRepository] - An optional parameter of type {@link IReservationRepository}
63
+ * which represents a repository for accessing and manipulating reservation data.
64
+ * If no `reservationRepository` is provided, a default {@link sequelize:reservationRepository} instance is created and used.
65
+ *
66
+ * @param {IOCPPMessageRepository} [ocppMessageRepository] - An optional parameter of type {@link IOCPPMessageRepository}
67
+ * which represents a repository for accessing and manipulating ocppMessage data.
68
+ * If no `ocppMessageRepository` is provided, a default {@link sequelize:ocppMessageRepository} instance is created and used.
69
+ *
70
+ * @param {ILocationRepository} [locationRepository] - An optional parameter of type {@link ILocationRepository} which represents a repository for accessing and manipulating location and charging station data.
71
+ * If no `locationRepository` is provided, a default {@link sequelize:locationRepository} instance is
72
+ * created and used.
73
+ *
74
+ * @param {CertificateAuthorityService} [certificateAuthorityService] - An optional parameter of
75
+ * type {@link CertificateAuthorityService} which handles certificate authority operations.
76
+ *
77
+ * @param {IAuthorizer} [realTimeAuthorizer] - An optional parameter of type {@link IAuthorizer} which represents
78
+ * a real-time authorizer that can be used to authorize real-time requests.
79
+ *
80
+ * @param {IAuthorizer[]} [authorizers] - An optional parameter of type {@link IAuthorizer[]} which represents
81
+ * a list of authorizers that can be used to authorize requests.
82
+ *
83
+ * @param {IdGenerator} [idGenerator] - An optional parameter of type {@link IdGenerator} which generates
84
+ * unique identifiers.
85
+ */
86
+ constructor(config: BootstrapConfig & SystemConfig, cache: ICache, sender?: IMessageSender, handler?: IMessageHandler, logger?: Logger<ILogObj>, ocppValidator?: OCPPValidator, authorizeRepository?: IAuthorizationRepository, localAuthListRepository?: ILocalAuthListRepository, deviceModelRepository?: IDeviceModelRepository, tariffRepository?: ITariffRepository, transactionEventRepository?: ITransactionEventRepository, chargingProfileRepository?: IChargingProfileRepository, reservationRepository?: IReservationRepository, ocppMessageRepository?: IOCPPMessageRepository, locationRepository?: ILocationRepository, certificateAuthorityService?: CertificateAuthorityService, realTimeAuthorizer?: IAuthorizer, authorizers?: IAuthorizer[], idGenerator?: IdGenerator);
87
+ protected _authorizeRepository: IAuthorizationRepository;
88
+ get authorizeRepository(): IAuthorizationRepository;
89
+ protected _localAuthListRepository: ILocalAuthListRepository;
90
+ get localAuthListRepository(): ILocalAuthListRepository;
91
+ protected _deviceModelRepository: IDeviceModelRepository;
92
+ get deviceModelRepository(): IDeviceModelRepository;
93
+ protected _transactionEventRepository: ITransactionEventRepository;
94
+ get transactionEventRepository(): ITransactionEventRepository;
95
+ protected _chargingProfileRepository: IChargingProfileRepository;
96
+ get chargingProfileRepository(): IChargingProfileRepository;
97
+ protected _reservationRepository: IReservationRepository;
98
+ get reservationRepository(): IReservationRepository;
99
+ protected _ocppMessageRepository: IOCPPMessageRepository;
100
+ get ocppMessageRepository(): IOCPPMessageRepository;
101
+ private _localAuthListService;
102
+ get localAuthListService(): LocalAuthListService;
103
+ /**
104
+ * Handle OCPP 2.0.1 requests
105
+ */
106
+ protected _handleAuthorize(message: IMessage<OCPP2_0_1.AuthorizeRequest>, props?: HandlerProperties): Promise<void>;
107
+ protected _handleReservationStatusUpdate(message: IMessage<OCPP2_0_1.ReservationStatusUpdateRequest>, props?: HandlerProperties): Promise<void>;
108
+ /**
109
+ * Handle OCPP 2.0.1 responses
110
+ */
111
+ protected _handleRequestStartTransaction(message: IMessage<OCPP2_0_1.RequestStartTransactionResponse>, props?: HandlerProperties): Promise<void>;
112
+ protected _handleRequestStopTransaction(message: IMessage<OCPP2_0_1.RequestStopTransactionResponse>, props?: HandlerProperties): Promise<void>;
113
+ protected _handleCancelReservation(message: IMessage<OCPP2_0_1.CancelReservationResponse>, props?: HandlerProperties): Promise<void>;
114
+ protected _handleReserveNow(message: IMessage<OCPP2_0_1.ReserveNowResponse>, props?: HandlerProperties): Promise<void>;
115
+ protected _handleUnlockConnector(message: IMessage<OCPP2_0_1.UnlockConnectorResponse>, props?: HandlerProperties): Promise<void>;
116
+ protected _handleClearCache(message: IMessage<OCPP2_0_1.ClearCacheResponse>, props?: HandlerProperties): Promise<void>;
117
+ protected _handleSendLocalList(message: IMessage<OCPP2_0_1.SendLocalListResponse>, props?: HandlerProperties): Promise<void>;
118
+ protected _handleGetLocalListVersion(message: IMessage<OCPP2_0_1.GetLocalListVersionResponse>, props?: HandlerProperties): Promise<void>;
119
+ /**
120
+ * Handle OCPP 1.6 responses
121
+ */
122
+ protected _handleOcpp16RemoteStopTransaction(message: IMessage<OCPP1_6.RemoteStopTransactionResponse>, props?: HandlerProperties): Promise<void>;
123
+ protected _handleOCPP16Authorize(message: IMessage<OCPP1_6.AuthorizeRequest>, props?: HandlerProperties): Promise<void>;
124
+ protected _handleRemoteStartTransaction(message: IMessage<OCPP1_6.RemoteStartTransactionResponse>, props?: HandlerProperties): Promise<void>;
125
+ protected _handleOcpp16ClearCache(message: IMessage<OCPP1_6.ClearCacheResponse>, props?: HandlerProperties): Promise<void>;
126
+ private _updateAuthorizationFromDto;
127
+ }