-export enum OCPP20ComponentName {
+import type { EVSEType, StatusInfoType } from './Common';
+import type { JsonObject } from '../../JsonType';
+
+enum OCPP20ComponentName {
AlignedDataCtrlr = 'AlignedDataCtrlr',
AuthCacheCtrlr = 'AuthCacheCtrlr',
AuthCtrlr = 'AuthCtrlr',
export enum OCPP20VendorVariableName {
ConnectionUrl = 'ConnectionUrl',
}
+
+enum AttributeEnumType {
+ Actual = 'Actual',
+ Target = 'Target',
+ MinSet = 'MinSet',
+ MaxSet = 'MaxSet',
+}
+
+type ComponentType = {
+ name: string | OCPP20ComponentName;
+ instance?: string;
+ evse?: EVSEType;
+} & JsonObject;
+
+type VariableName =
+ | string
+ | OCPP20RequiredVariableName
+ | OCPP20OptionalVariableName
+ | OCPP20VendorVariableName;
+
+type VariableType = {
+ name: VariableName;
+ instance?: string;
+} & JsonObject;
+
+export type OCPP20SetVariableDataType = {
+ attributeType?: AttributeEnumType;
+ attributeValue: string;
+ component: ComponentType;
+ variable: VariableType;
+} & JsonObject;
+
+enum SetVariableStatusEnumType {
+ Accepted = 'Accepted',
+ Rejected = 'Rejected',
+ UnknownComponent = 'UnknownComponent',
+ UnknownVariable = 'UnknownVariable',
+ NotSupportedAttributeType = 'NotSupportedAttributeType',
+ RebootRequired = 'RebootRequired',
+}
+
+export type OCPP20SetVariableResultType = {
+ attributeType?: AttributeEnumType;
+ attributeStatus: SetVariableStatusEnumType;
+ component: ComponentType;
+ variable: VariableType;
+ attributeStatusInfo?: StatusInfoType;
+} & JsonObject;
+
+type OCPP20ComponentVariableType = {
+ component: ComponentType;
+ variable?: VariableType;
+} & JsonObject;