AnylineEnergyModuleView Class Reference

Inherits from AnylineAbstractModuleView : UIView
Declared in AnylineEnergyModuleView.h

Overview

The AnylineEnergyModuleView class declares the programmatic interface for an object that manages easy access to Anylines energy meter scanning mode. All its capabilities are bundled into this AnylineAbstractModuleView subclass. Management of the scanning process happens within the view object. It is configurable via interface builder.

Communication with the host application is managed with a delegate that conforms to AnylineEnergyModuleDelegate.

AnylineEnergyModuleView is able to scan the most common energy meters. The scan mode is set with setScanMode.

  meterScanViewPlugin

@property (nullable, nonatomic, strong) ALMeterScanViewPlugin *meterScanViewPlugin

  meterScanPlugin

@property (nullable, nonatomic, strong) ALMeterScanPlugin *meterScanPlugin

  barcodeScanPlugin

@property (nullable, nonatomic, strong) ALBarcodeScanPlugin *barcodeScanPlugin

  scanMode

Sets the scan mode. It has to be ALElectricMeter, ALGasMeter, ALBarcode or ALSerialNumber

@property (nonatomic, assign, readonly) ALScanMode scanMode

Declared In

AnylineEnergyModuleView.h

  serialNumberValidationRegex

A validation regex string for the Serial scanMode. Regex has to follow the ECMAScript standard. This parameter will be ignored in the other scanModes. If you want to have no regex this property has to be set to nil.

@property (nonatomic, strong) NSString *serialNumberValidationRegex

Declared In

AnylineEnergyModuleView.h

  serialNumberCharWhitelist

A character whitelist for the Serial scanMode. This parameter will be ignored in the other scanModes. If you want to have no regex this property has to be set to nil.

@property (nonatomic, strong) NSString *serialNumberCharWhitelist

Discussion

Warning: There are only numbers and uppercase characters allowed.

Declared In

AnylineEnergyModuleView.h

– setScanMode:error:

Sets the scan mode and returns an NSError if something failed.

- (BOOL)setScanMode:(ALScanMode)scanMode error:(NSError *_Nullable *_Nullable)error

Parameters

scanMode

The scan mode to set.

error

The error if something goes wrong. Can be nil.

Return Value

Boolean indicating the success / failure of the call.

Declared In

AnylineEnergyModuleView.h

– setupWithLicenseKey:delegate:error:

Sets the license key and delegate.

- (BOOL)setupWithLicenseKey:(NSString *_Nonnull)licenseKey delegate:(id<AnylineEnergyModuleDelegate> _Nonnull)delegate error:(NSError *_Nullable *_Nullable)error

Parameters

licenseKey

The Anyline license key for this application bundle

delegate

The delegate that will receive the Anyline results (hast to conform to AnylineEnergyModuleDelegate)

error

The error that occured

Return Value

Boolean indicating the success / failure of the call.

Declared In

AnylineEnergyModuleView.h

– setupAsyncWithLicenseKey:delegate:finished:

Sets the license key and delegate. Async method with return block when done.

- (void)setupAsyncWithLicenseKey:(NSString *_Nonnull)licenseKey delegate:(id<AnylineEnergyModuleDelegate> _Nonnull)delegate finished:(void ( ^ _Nonnull ) ( BOOL success , NSError *_Nullable error ))finished

Parameters

licenseKey

The Anyline license key for this application bundle

delegate

The delegate that will receive the Anyline results (hast to conform to AnylineEnergyModuleDelegate)

finished

Inidicating if setup is finished with an error object when setup failed.

Declared In

AnylineEnergyModuleView.h