Esempio n. 1
0
        public CSORoamingProviderAlreadyExists(RoamingNetwork RoamingNetwork,
                                               CSORoamingProvider_Id RoamingProviderId)

            : base(RoamingNetwork,
                   "The given charging station roaming provider identification '" + RoamingProviderId + "' already exists within the given '" + RoamingNetwork.Id + "' roaming network!")

        {
        }
Esempio n. 2
0
        CreateOICPv2_2_CPORoamingProvider(this RoamingNetwork RoamingNetwork,
                                          CSORoamingProvider_Id Id,
                                          I18NString Name,
                                          OICPv2_2.EMP.EMPRoaming EMPRoaming,

                                          OICPv2_2.EMP.EVSEDataRecord2EVSEDelegate EVSEDataRecord2EVSE = null,

                                          OICPv2_2.EVSEOperatorFilterDelegate EVSEOperatorFilter = null,

                                          TimeSpan?PullDataServiceEvery          = null,
                                          Boolean DisablePullData                = false,
                                          TimeSpan?PullDataServiceRequestTimeout = null,

                                          TimeSpan?PullStatusServiceEvery          = null,
                                          Boolean DisablePullStatus                = false,
                                          TimeSpan?PullStatusServiceRequestTimeout = null,

                                          eMobilityProvider DefaultProvider = null,
                                          GeoCoordinate?DefaultSearchCenter = null,
                                          UInt64?DefaultDistanceKM          = null,

                                          Action <OICPv2_2.EMP.WWCPCSOAdapter> OICPConfigurator = null,
                                          Action <ICSORoamingProvider> Configurator             = null)

        {
            #region Initial checks

            if (RoamingNetwork == null)
            {
                throw new ArgumentNullException(nameof(RoamingNetwork), "The given roaming network must not be null!");
            }

            if (Id == null)
            {
                throw new ArgumentNullException(nameof(Id), "The given unique roaming provider identification must not be null!");
            }

            if (Name.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(Name), "The given roaming provider name must not be null or empty!");
            }

            if (EMPRoaming == null)
            {
                throw new ArgumentNullException(nameof(EMPRoaming), "The given EMP Roaming must not be null!");
            }

            #endregion

            var NewRoamingProvider = new OICPv2_2.EMP.WWCPCSOAdapter(Id,
                                                                     Name,
                                                                     RoamingNetwork,
                                                                     EMPRoaming,

                                                                     EVSEDataRecord2EVSE,

                                                                     EVSEOperatorFilter,

                                                                     PullDataServiceEvery,
                                                                     DisablePullData,
                                                                     PullDataServiceRequestTimeout,

                                                                     PullStatusServiceEvery,
                                                                     DisablePullStatus,
                                                                     PullStatusServiceRequestTimeout,

                                                                     DefaultProvider,
                                                                     null,
                                                                     DefaultSearchCenter,
                                                                     DefaultDistanceKM);


            OICPConfigurator?.Invoke(NewRoamingProvider);

            return(RoamingNetwork.
                   CreateNewRoamingProvider(NewRoamingProvider,
                                            Configurator) as OICPv2_2.EMP.WWCPCSOAdapter);
        }
Esempio n. 3
0
        CreateOICPv2_3_CPORoamingProvider(this RoamingNetwork RoamingNetwork,
                                          CSORoamingProvider_Id Id,
                                          I18NString Name,
                                          OICPv2_3.EMP.EMPRoaming EMPRoaming,

                                          OICPv2_3.EMP.EVSEDataRecord2EVSEDelegate EVSEDataRecord2EVSE = null,

                                          Boolean PullEVSEData_IsDisabled      = false,
                                          TimeSpan?PullEVSEData_InitialDelay   = null,
                                          TimeSpan?PullEVSEData_Every          = null,
                                          UInt32?PullEVSEData_RequestPageSize  = null,
                                          TimeSpan?PullEVSEData_RequestTimeout = null,

                                          IEnumerable <OICPv2_3.Operator_Id> PullEVSEData_OperatorIdFilter                 = null,
                                          IEnumerable <Country> PullEVSEData_CountryCodeFilter                             = null,
                                          IEnumerable <OICPv2_3.AccessibilityTypes> PullEVSEData_AccessibilityFilter       = null,
                                          IEnumerable <OICPv2_3.AuthenticationModes> PullEVSEData_AuthenticationModeFilter = null,
                                          IEnumerable <OICPv2_3.CalibrationLawDataAvailabilities> PullEVSEData_CalibrationLawDataAvailabilityFilter = null,
                                          Boolean?PullEVSEData_RenewableEnergyFilter     = null,
                                          Boolean?PullEVSEData_IsHubjectCompatibleFilter = null,
                                          Boolean?PullEVSEData_IsOpen24HoursFilter       = null,

                                          Boolean PullEVSEStatus_IsDisabled      = false,
                                          TimeSpan?PullEVSEStatus_InitialDelay   = null,
                                          TimeSpan?PullEVSEStatus_Every          = null,
                                          TimeSpan?PullEVSEStatus_RequestTimeout = null,

                                          Boolean GetChargeDetailRecords_IsDisabled      = false,
                                          TimeSpan?GetChargeDetailRecords_InitialDelay   = null,
                                          TimeSpan?GetChargeDetailRecords_Every          = null,
                                          TimeSpan?GetChargeDetailRecords_RequestTimeout = null,

                                          eMobilityProvider DefaultProvider      = null,
                                          eMobilityProvider_Id?DefaultProviderId = null,
                                          GeoCoordinate?DefaultSearchCenter      = null,
                                          UInt64?DefaultDistanceKM = null,

                                          Action <OICPv2_3.EMP.WWCPCSOAdapter> OICPConfigurator = null,
                                          Action <ICSORoamingProvider> Configurator             = null)

        {
            #region Initial checks

            if (RoamingNetwork is null)
            {
                throw new ArgumentNullException(nameof(RoamingNetwork), "The given roaming network must not be null!");
            }

            if (Name.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(Name), "The given roaming provider name must not be null or empty!");
            }

            if (EMPRoaming is null)
            {
                throw new ArgumentNullException(nameof(EMPRoaming), "The given EMP Roaming must not be null!");
            }

            #endregion

            var newRoamingProvider = new OICPv2_3.EMP.WWCPCSOAdapter(Id,
                                                                     Name,
                                                                     RoamingNetwork,
                                                                     EMPRoaming,

                                                                     EVSEDataRecord2EVSE,

                                                                     PullEVSEData_IsDisabled,
                                                                     PullEVSEData_InitialDelay,
                                                                     PullEVSEData_Every,
                                                                     PullEVSEData_RequestPageSize,
                                                                     PullEVSEData_RequestTimeout,

                                                                     PullEVSEData_OperatorIdFilter,
                                                                     PullEVSEData_CountryCodeFilter,
                                                                     PullEVSEData_AccessibilityFilter,
                                                                     PullEVSEData_AuthenticationModeFilter,
                                                                     PullEVSEData_CalibrationLawDataAvailabilityFilter,
                                                                     PullEVSEData_RenewableEnergyFilter,
                                                                     PullEVSEData_IsHubjectCompatibleFilter,
                                                                     PullEVSEData_IsOpen24HoursFilter,

                                                                     PullEVSEStatus_IsDisabled,
                                                                     PullEVSEStatus_InitialDelay,
                                                                     PullEVSEStatus_Every,
                                                                     PullEVSEStatus_RequestTimeout,

                                                                     GetChargeDetailRecords_IsDisabled,
                                                                     GetChargeDetailRecords_InitialDelay,
                                                                     GetChargeDetailRecords_Every,
                                                                     GetChargeDetailRecords_RequestTimeout,

                                                                     DefaultProvider,
                                                                     DefaultProviderId,
                                                                     DefaultSearchCenter,
                                                                     DefaultDistanceKM);


            OICPConfigurator?.Invoke(newRoamingProvider);

            return(RoamingNetwork.
                   CreateNewRoamingProvider(newRoamingProvider,
                                            Configurator) as OICPv2_3.EMP.WWCPCSOAdapter);
        }