ilabs-flir 2.0.1 → 2.0.3
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.
- package/app.plugin.js +1 -1
- package/ios/Flir/SDKLoader/FlirSDKLoader.swift +9 -9
- package/ios/Flir/src/FlirModule.m +12 -1
- package/package.json +1 -1
- package/ios/Flir/Framework/ThermalSDK/FLIRBattery.h +0 -76
- package/ios/Flir/Framework/ThermalSDK/FLIRCalibration.h +0 -108
- package/ios/Flir/Framework/ThermalSDK/FLIRCamera.h +0 -156
- package/ios/Flir/Framework/ThermalSDK/FLIRCameraDeviceInfo.h +0 -53
- package/ios/Flir/Framework/ThermalSDK/FLIRCameraEvent.h +0 -132
- package/ios/Flir/Framework/ThermalSDK/FLIRCameraImport.h +0 -204
- package/ios/Flir/Framework/ThermalSDK/FLIRColorDistributionSettings.h +0 -204
- package/ios/Flir/Framework/ThermalSDK/FLIRColorizer.h +0 -82
- package/ios/Flir/Framework/ThermalSDK/FLIRDiscoveredCamera.h +0 -44
- package/ios/Flir/Framework/ThermalSDK/FLIRDiscovery.h +0 -132
- package/ios/Flir/Framework/ThermalSDK/FLIRDisplaySettings.h +0 -29
- package/ios/Flir/Framework/ThermalSDK/FLIRFocus.h +0 -70
- package/ios/Flir/Framework/ThermalSDK/FLIRFusion.h +0 -192
- package/ios/Flir/Framework/ThermalSDK/FLIRFusionController.h +0 -136
- package/ios/Flir/Framework/ThermalSDK/FLIRFusionTransformation.h +0 -35
- package/ios/Flir/Framework/ThermalSDK/FLIRIdentity.h +0 -264
- package/ios/Flir/Framework/ThermalSDK/FLIRImageBase.h +0 -196
- package/ios/Flir/Framework/ThermalSDK/FLIRImageColorizer.h +0 -26
- package/ios/Flir/Framework/ThermalSDK/FLIRImageStatistics.h +0 -61
- package/ios/Flir/Framework/ThermalSDK/FLIRIsotherms.h +0 -208
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementArea.h +0 -38
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementCollection.h +0 -147
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementDelta.h +0 -62
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementDimensions.h +0 -33
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementEllipse.h +0 -49
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementLine.h +0 -66
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementMarker.h +0 -69
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementParameters.h +0 -41
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementRectangle.h +0 -36
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementReference.h +0 -27
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementShape.h +0 -46
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementSpot.h +0 -33
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementsController.h +0 -160
- package/ios/Flir/Framework/ThermalSDK/FLIRMeterLinkSensorPoll.h +0 -247
- package/ios/Flir/Framework/ThermalSDK/FLIROverlayController.h +0 -27
- package/ios/Flir/Framework/ThermalSDK/FLIRPalette.h +0 -60
- package/ios/Flir/Framework/ThermalSDK/FLIRPaletteController.h +0 -36
- package/ios/Flir/Framework/ThermalSDK/FLIRPaletteManager.h +0 -97
- package/ios/Flir/Framework/ThermalSDK/FLIRQuantification.h +0 -55
- package/ios/Flir/Framework/ThermalSDK/FLIRRemoteControl.h +0 -393
- package/ios/Flir/Framework/ThermalSDK/FLIRRenderer.h +0 -35
- package/ios/Flir/Framework/ThermalSDK/FLIRRendererImpl.h +0 -17
- package/ios/Flir/Framework/ThermalSDK/FLIRScale.h +0 -99
- package/ios/Flir/Framework/ThermalSDK/FLIRScaleController.h +0 -44
- package/ios/Flir/Framework/ThermalSDK/FLIRStream.h +0 -109
- package/ios/Flir/Framework/ThermalSDK/FLIRStreamer.h +0 -124
- package/ios/Flir/Framework/ThermalSDK/FLIRSystem.h +0 -40
- package/ios/Flir/Framework/ThermalSDK/FLIRTemperatureRange.h +0 -43
- package/ios/Flir/Framework/ThermalSDK/FLIRThermalDelta.h +0 -77
- package/ios/Flir/Framework/ThermalSDK/FLIRThermalImage.h +0 -331
- package/ios/Flir/Framework/ThermalSDK/FLIRThermalImageFile.h +0 -56
- package/ios/Flir/Framework/ThermalSDK/FLIRThermalParameters.h +0 -31
- package/ios/Flir/Framework/ThermalSDK/FLIRThermalValue.h +0 -92
- package/ios/Flir/Framework/ThermalSDK/FLIRWirelessCameraDetails.h +0 -88
- package/ios/Flir/Framework/ThermalSDK/ThermalSDK.h +0 -73
package/app.plugin.js
CHANGED
|
@@ -234,15 +234,15 @@ public class FlirSDKLoader: RCTEventEmitter {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
private func unzip(_ source: URL, to destination: URL) throws {
|
|
237
|
-
let process = Process()
|
|
238
|
-
process.executableURL = URL(fileURLWithPath: "/usr/bin/unzip")
|
|
239
|
-
process.arguments = ["-o", "-q", source.path, "-d", destination.path]
|
|
240
|
-
try process.run()
|
|
241
|
-
process.waitUntilExit()
|
|
242
|
-
guard process.terminationStatus == 0 else {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
237
|
+
// let process = Process()
|
|
238
|
+
// process.executableURL = URL(fileURLWithPath: "/usr/bin/unzip")
|
|
239
|
+
// process.arguments = ["-o", "-q", source.path, "-d", destination.path]
|
|
240
|
+
// try process.run()
|
|
241
|
+
// process.waitUntilExit()
|
|
242
|
+
// guard process.terminationStatus == 0 else {
|
|
243
|
+
// throw NSError(domain: "FlirSDK", code: Int(process.terminationStatus),
|
|
244
|
+
// userInfo: [NSLocalizedDescriptionKey: "Unzip failed with exit code \(process.terminationStatus)"])
|
|
245
|
+
// }
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
private func directorySize(_ url: URL) -> Int64? {
|
|
@@ -22,13 +22,20 @@
|
|
|
22
22
|
// Forward declare Swift class
|
|
23
23
|
@class FlirManager;
|
|
24
24
|
|
|
25
|
-
@interface FlirModule()
|
|
25
|
+
@interface FlirModule()
|
|
26
|
+
#if FLIR_SDK_AVAILABLE
|
|
27
|
+
<FLIRDiscoveryEventDelegate, FLIRDataReceivedDelegate, FLIRStreamDelegate>
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
#if FLIR_SDK_AVAILABLE
|
|
26
31
|
@property (nonatomic, strong) FLIRDiscovery *discovery;
|
|
27
32
|
@property (nonatomic, strong) FLIRCamera *camera;
|
|
28
33
|
@property (nonatomic, strong) FLIRStream *stream;
|
|
29
34
|
@property (nonatomic, strong) FLIRThermalStreamer *streamer;
|
|
30
35
|
@property (nonatomic, strong) FLIRIdentity *connectedIdentity;
|
|
31
36
|
@property (nonatomic, strong) NSMutableDictionary<NSString *, FLIRIdentity *> *identityMap;
|
|
37
|
+
#endif
|
|
38
|
+
|
|
32
39
|
@property (nonatomic, strong) NSMutableArray<NSDictionary *> *discoveredDevices;
|
|
33
40
|
@property (nonatomic, assign) BOOL isScanning;
|
|
34
41
|
@property (nonatomic, assign) BOOL isConnected;
|
|
@@ -48,7 +55,9 @@ RCT_EXPORT_MODULE(FlirModule);
|
|
|
48
55
|
|
|
49
56
|
- (instancetype)init {
|
|
50
57
|
if (self = [super init]) {
|
|
58
|
+
#if FLIR_SDK_AVAILABLE
|
|
51
59
|
_identityMap = [NSMutableDictionary new];
|
|
60
|
+
#endif
|
|
52
61
|
_discoveredDevices = [NSMutableArray new];
|
|
53
62
|
_isScanning = NO;
|
|
54
63
|
_isConnected = NO;
|
|
@@ -525,6 +534,7 @@ RCT_EXPORT_METHOD(getLatestFramePath:(RCTPromiseResolveBlock)resolve
|
|
|
525
534
|
[[FlirEventEmitter shared] sendDeviceEvent:@"FlirStateChanged" body:body];
|
|
526
535
|
}
|
|
527
536
|
|
|
537
|
+
#if FLIR_SDK_AVAILABLE
|
|
528
538
|
- (NSString *)communicationInterfaceName:(FLIRCommunicationInterface)iface {
|
|
529
539
|
if (iface & FLIRCommunicationInterfaceLightning) return @"LIGHTNING";
|
|
530
540
|
if (iface & FLIRCommunicationInterfaceNetwork) return @"NETWORK";
|
|
@@ -533,6 +543,7 @@ RCT_EXPORT_METHOD(getLatestFramePath:(RCTPromiseResolveBlock)resolve
|
|
|
533
543
|
if (iface & FLIRCommunicationInterfaceUSB) return @"USB";
|
|
534
544
|
return @"UNKNOWN";
|
|
535
545
|
}
|
|
546
|
+
#endif
|
|
536
547
|
|
|
537
548
|
#pragma mark - FLIRDiscoveryEventDelegate
|
|
538
549
|
|
package/package.json
CHANGED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// FLIRBattery.h
|
|
3
|
-
// ThermalSDK
|
|
4
|
-
//
|
|
5
|
-
// Created by FLIR on 2020-07-02.
|
|
6
|
-
// Copyright © 2020 Teledyne FLIR. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
ChargingState
|
|
11
|
-
*/
|
|
12
|
-
typedef NS_ENUM(NSUInteger, FLIRChargingState)
|
|
13
|
-
{
|
|
14
|
-
/** Indicates that the battery is not charging because the camera is in "developer mode". */
|
|
15
|
-
DEVELOPER,
|
|
16
|
-
/** Indicates that the battery is not charging because the camera is not connected to an external power supply. */
|
|
17
|
-
NOCHARGING,
|
|
18
|
-
/** Indicates that the battery is charging from external power. */
|
|
19
|
-
MANAGEDCHARGING,
|
|
20
|
-
|
|
21
|
-
/** Indicates that the battery is charging the iPhone.
|
|
22
|
-
|
|
23
|
-
This field indicates that IF there is an iPhone plugged in, it will
|
|
24
|
-
be receiving power from the RBPDevice battery. However, it is still possible
|
|
25
|
-
for the RBPDevice to be in this "mode" EVEN IF THERE IS NO IPHONE ATTACHED.
|
|
26
|
-
*/
|
|
27
|
-
CHARGINGSMARTPHONE,
|
|
28
|
-
|
|
29
|
-
/** Indicates that a charging fault occurred (overheat, etc.) */
|
|
30
|
-
FAULT,
|
|
31
|
-
/** Indicates that a charging heat fault occured */
|
|
32
|
-
FAULTHEAT,
|
|
33
|
-
/** Indicates that a charging fault occured due to low current from the charging source */
|
|
34
|
-
FAULTBADCHARGER,
|
|
35
|
-
/** Indicates that a charging fault exists but the iPhone is being charged */
|
|
36
|
-
CHARGINGSMARTPHONEFAULTHEAT,
|
|
37
|
-
/** Indicates that the device is in charge-only mode */
|
|
38
|
-
MANAGEDCHARGINGONLY,
|
|
39
|
-
/** Indicates that the device is in phone-charging-only mode */
|
|
40
|
-
CHARGINGSMARTPHONEONLY,
|
|
41
|
-
/** Indicates that a valid battery charging state was not available. */
|
|
42
|
-
BAD
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Camera battery status monitoring interface
|
|
47
|
-
*/
|
|
48
|
-
@interface FLIRBattery : NSObject
|
|
49
|
-
/** Get charging state.
|
|
50
|
-
*
|
|
51
|
-
* In certain cases (e.g. in case of FLIR ONE prior to starting streaming) the battery charging state value may not be available.
|
|
52
|
-
* When the value is not available a "ChargingState.BAD" value is returned.
|
|
53
|
-
* In the same time the "percentage" can return negative value indicating battery percentage is also not available.
|
|
54
|
-
*
|
|
55
|
-
* See Battery::percentage
|
|
56
|
-
*/
|
|
57
|
-
- (FLIRChargingState) getChargingState;
|
|
58
|
-
/** Remaining battery percentage.
|
|
59
|
-
*
|
|
60
|
-
* Valid value range from 0 to 100 where 0 is empty and 100 is full.
|
|
61
|
-
* In certain cases (e.g. in case of FLIR ONE prior to starting streaming) the battery percentage value may not be available.
|
|
62
|
-
* When the value is not available, an invalid (negative) value is returned.
|
|
63
|
-
* In the same time the "chargingState" can return "ChargingState.BAD" indicating state is also not available.
|
|
64
|
-
*
|
|
65
|
-
* See Battery::chargingState
|
|
66
|
-
*/
|
|
67
|
-
- (int)getPercentage;
|
|
68
|
-
/** Subscribes for battery charging state notifications. */
|
|
69
|
-
- (BOOL)subscribeChargingState: (out NSError * _Nullable *_Nullable) error;
|
|
70
|
-
/** Revokes subscription for battery charging state. */
|
|
71
|
-
- (void)unsubscribeChargingState;
|
|
72
|
-
/** Subscribes for remaining battery power notifications. */
|
|
73
|
-
- (BOOL)subscribePercentage: (out NSError * _Nullable *_Nullable) error;
|
|
74
|
-
/** Revokes subscription for remaining battery power. */
|
|
75
|
-
- (void)unsubscribePercentage;
|
|
76
|
-
@end
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// FLIRCalibration.h
|
|
3
|
-
// ThermalSDK
|
|
4
|
-
//
|
|
5
|
-
// Created by FLIR on 2020-07-02.
|
|
6
|
-
// Copyright © 2020 Teledyne FLIR. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
#pragma once
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
Shutter state
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
typedef NS_ENUM(NSUInteger, FLIRShutterState) {
|
|
16
|
-
/// Represents an invalid shutter state. This value should be treated as an error.
|
|
17
|
-
invalid,
|
|
18
|
-
|
|
19
|
-
/// Represents the "device powered off" shutter state.
|
|
20
|
-
off,
|
|
21
|
-
|
|
22
|
-
/// Represents the "device powered on" state of the hardware shutter.
|
|
23
|
-
on,
|
|
24
|
-
|
|
25
|
-
/// Represents the NUC state of the hardware shutter.
|
|
26
|
-
nuc,
|
|
27
|
-
|
|
28
|
-
/// Indicates that a corrupted/invalid shutter state was detected.
|
|
29
|
-
bad,
|
|
30
|
-
|
|
31
|
-
/// Indicates a unknown state
|
|
32
|
-
unknown_state
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
NUC state
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
typedef NS_ENUM(NSUInteger, FLIRNucState) {
|
|
40
|
-
/**
|
|
41
|
-
* Indicates that the *last* NUC (Non-Uniform Calibration) is invalid.
|
|
42
|
-
*/
|
|
43
|
-
INVALID,
|
|
44
|
-
/**
|
|
45
|
-
* Indicates that there is NUC activity in progress.
|
|
46
|
-
*/
|
|
47
|
-
PROGRESS,
|
|
48
|
-
/**
|
|
49
|
-
* Indicates that thermal pixel values are radiometrically calibrated.
|
|
50
|
-
*/
|
|
51
|
-
VALID_RAD,
|
|
52
|
-
/**
|
|
53
|
-
* Indicates that thermal pixels are calibrated enough to yield an image, but are not yet radiometrically calibrated.
|
|
54
|
-
*/
|
|
55
|
-
VALID_IMG,
|
|
56
|
-
/**
|
|
57
|
-
* Indicates that an NUC is desired.
|
|
58
|
-
*/
|
|
59
|
-
DESIRED,
|
|
60
|
-
/**
|
|
61
|
-
* Indicated that approximate radiometric values are being given.
|
|
62
|
-
*/
|
|
63
|
-
RAD_APPROX,
|
|
64
|
-
/**
|
|
65
|
-
* Indicates that a corrupted/invalid NUC state was detected.
|
|
66
|
-
*/
|
|
67
|
-
BAD_STATE,
|
|
68
|
-
/**
|
|
69
|
-
* Indicates a unknown state.
|
|
70
|
-
*/
|
|
71
|
-
UNKNOWN
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Camera calibration control interface.
|
|
77
|
-
*/
|
|
78
|
-
@interface FLIRCalibration : NSObject
|
|
79
|
-
/** Get calibration state. */
|
|
80
|
-
-(BOOL)getActive;
|
|
81
|
-
/** Process a one point NUC (Non-uniformity correction) with a black body method. */
|
|
82
|
-
-(BOOL)performNUC: (out NSError * _Nullable *_Nullable)error;;
|
|
83
|
-
/** Subscribes for camera NUC state notifications. */
|
|
84
|
-
-(BOOL)subscribeCalibrationState: (out NSError * _Nullable *_Nullable)error;
|
|
85
|
-
/** Revokes subscription for camera NUC state notifications. */
|
|
86
|
-
-(void)unsubscribeCalibrationState;
|
|
87
|
-
/** Get NUC state
|
|
88
|
-
* @note The state of some cameras (FLIR ONE notably) is `UNKNOWN` until streaming is started.
|
|
89
|
-
*/
|
|
90
|
-
- (FLIRNucState)getNucState;
|
|
91
|
-
/** NUC interval (max interval between each automatic NUC in seconds) */
|
|
92
|
-
- (int)getNucInterval;
|
|
93
|
-
/** NUC interval (max interval between each automatic NUC in seconds)
|
|
94
|
-
* For FLIR One setting nucInterval to 0 disables automatic nuc, any other value enables automatic nuc
|
|
95
|
-
*/
|
|
96
|
-
-(BOOL)setNucInterval: (int)nucInterval error: (out NSError * _Nullable *_Nullable)error;
|
|
97
|
-
|
|
98
|
-
/** Subscribes for shutter state notifications */
|
|
99
|
-
-(BOOL)subscribeShutterState: (out NSError * _Nullable *_Nullable)error;
|
|
100
|
-
/** Revokes subscription for shutter state notifications */
|
|
101
|
-
-(void)unsubscribeShutterState;
|
|
102
|
-
|
|
103
|
-
/** Get shutter state
|
|
104
|
-
* @note The state of some cameras (FLIR ONE notably) is `unknown_state` until streaming is started.
|
|
105
|
-
*/
|
|
106
|
-
- (FLIRShutterState)getShutterState;
|
|
107
|
-
@end
|
|
108
|
-
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// FLIRCamera.h
|
|
3
|
-
// FLIR Thermal SDK
|
|
4
|
-
//
|
|
5
|
-
// Created on 2018-05-07.
|
|
6
|
-
// Copyright © 2019 Teledyne FLIR. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
// Manages any FLIR camera.
|
|
9
|
-
//
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#import <Foundation/Foundation.h>
|
|
14
|
-
#import <CoreGraphics/CoreGraphics.h>
|
|
15
|
-
|
|
16
|
-
#import "FLIRIdentity.h"
|
|
17
|
-
#import "FLIRRemoteControl.h"
|
|
18
|
-
#import "FLIRThermalImage.h"
|
|
19
|
-
|
|
20
|
-
@class FLIRStream;
|
|
21
|
-
|
|
22
|
-
/** Streaming options */
|
|
23
|
-
typedef NS_OPTIONS(NSUInteger, StreamingOptions) {
|
|
24
|
-
STREAMING_NO_OPENGL = 1
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Block to accept a thermal image from a live stream.
|
|
29
|
-
*/
|
|
30
|
-
typedef void (^ FLIRThermalImageBlock)(FLIRThermalImage * _Nonnull);
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
ChargingState
|
|
34
|
-
*/
|
|
35
|
-
typedef NS_ENUM(NSUInteger, FLIRAuthenticationStatus)
|
|
36
|
-
{
|
|
37
|
-
pending, //will encapsulate both success upload and waiting to be approved
|
|
38
|
-
approved,
|
|
39
|
-
unknown
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
@class FLIRCamera;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Delegate to return events from a connectad camera.
|
|
46
|
-
*/
|
|
47
|
-
@protocol FLIRDataReceivedDelegate <NSObject>
|
|
48
|
-
|
|
49
|
-
#pragma mark - Required event handlers
|
|
50
|
-
/**
|
|
51
|
-
* This event is raised when the camera is disconnected unexpectedly, if this method is
|
|
52
|
-
* implemented in the app, and if the delegate has been initialised.
|
|
53
|
-
*
|
|
54
|
-
* @param camera The camera.
|
|
55
|
-
* @param error An error code.
|
|
56
|
-
*/
|
|
57
|
-
-(void)onDisconnected:(FLIRCamera *_Nonnull) camera withError:(nullable NSError *)error;
|
|
58
|
-
|
|
59
|
-
@optional
|
|
60
|
-
#pragma mark - Optional event handlers
|
|
61
|
-
|
|
62
|
-
@end
|
|
63
|
-
|
|
64
|
-
@class FLIRCameraImport;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* The interface to a FLIR camera of any kind.
|
|
68
|
-
*
|
|
69
|
-
* Note: This class is not guaranteed to be thread-safe, so calls must be synchronized if a Camera object is accessed from multiple threads.
|
|
70
|
-
*
|
|
71
|
-
*/
|
|
72
|
-
@interface FLIRCamera : NSObject
|
|
73
|
-
|
|
74
|
-
+ (NSString* _Nonnull)getFrom:(FLIRIdentity * _Nonnull)identity code:(NSUInteger)code;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* A delegate to handle the events in FLIRDataReceivedDelegate.
|
|
78
|
-
*/
|
|
79
|
-
@property (weak, nullable) id<FLIRDataReceivedDelegate> delegate;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Initialize a camera instance with specified identity.
|
|
83
|
-
*
|
|
84
|
-
* Important
|
|
85
|
-
* During development do not call `-[FLIRCamera authenticate:trustedConnectionName:]`
|
|
86
|
-
* with the same "trustedConnectionName" between two application installs.
|
|
87
|
-
* During the call to `-[FLIRCamera authenticate:trustedConnectionName:]` authentication files are create and
|
|
88
|
-
* uploaded with the "trustedConnectionName" as the "key" to the camera,
|
|
89
|
-
* new authentication files can't be used with the same "trustedConnectionName"
|
|
90
|
-
* to connect to the camera.
|
|
91
|
-
* We recommended generate a trustedConnectionName and store it as `Preferences`
|
|
92
|
-
*
|
|
93
|
-
* @param identity the identity of the camera instance to be initialized.
|
|
94
|
-
*/
|
|
95
|
-
-(FLIRAuthenticationStatus) authenticate:(FLIRIdentity *_Nonnull)identity trustedConnectionName:(NSString *_Nullable) name;
|
|
96
|
-
/**
|
|
97
|
-
* Connect with the camera. This function is blocking.
|
|
98
|
-
*
|
|
99
|
-
* @param identity the identity of the camera instance to connect to.
|
|
100
|
-
*/
|
|
101
|
-
-(BOOL)connect:(FLIRIdentity * _Nonnull)identity error:(out NSError * _Nullable * _Nonnull)error;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Connect with the camera. This function is blocking.
|
|
105
|
-
*
|
|
106
|
-
* @param identity the identity of the camera instance to connect to.
|
|
107
|
-
* @param code a code that can be present in some cameras when connecting.
|
|
108
|
-
*/
|
|
109
|
-
- (BOOL)connect:(FLIRIdentity * _Nonnull)identity code: (NSUInteger)code error:(out NSError * _Nullable * _Nonnull)error;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Disconnect from the camera. This function is blocking.
|
|
113
|
-
* Disconnecting from a Flir One Edge will also disconnect from the camera's WiFi hotspot
|
|
114
|
-
*/
|
|
115
|
-
-(void)disconnect;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Get the connection status.
|
|
119
|
-
*/
|
|
120
|
-
-(BOOL)isConnected;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Get the connected camera identity.
|
|
124
|
-
*
|
|
125
|
-
* @return The identity of the currently connected camera or null if no camera is connected.
|
|
126
|
-
*/
|
|
127
|
-
-(nullable FLIRIdentity *)getIdentity;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Get camera remote controller.
|
|
131
|
-
*
|
|
132
|
-
* @return nullptr returned if the camera isn't in connected state
|
|
133
|
-
*/
|
|
134
|
-
-(nullable FLIRRemoteControl *)getRemoteControl;
|
|
135
|
-
|
|
136
|
-
-(nullable FLIRCameraImport *) getImport;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Return all streams availbable on this camera, see @ref FLIRStream.
|
|
140
|
-
* @note the implementation for thermal streaming for network cameras is still in experimental stage.
|
|
141
|
-
*/
|
|
142
|
-
- (NSArray<FLIRStream *> * _Nonnull)getStreams;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Check if we're in frame grabbing state.
|
|
146
|
-
*/
|
|
147
|
-
-(BOOL)isGrabbing;
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Get license information for software used in camera, if available
|
|
151
|
-
* The returned data is utf8 encoded text
|
|
152
|
-
*/
|
|
153
|
-
|
|
154
|
-
- (NSData* _Nullable)getLicenseDataData;
|
|
155
|
-
|
|
156
|
-
@end
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// FLIRCameraDeviceInfo.h
|
|
3
|
-
//
|
|
4
|
-
// Copyright © 2019 Teledyne FLIR. All rights reserved.
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
#pragma once
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Camera device information.
|
|
13
|
-
*/
|
|
14
|
-
@interface FLIRCameraDeviceInfo : NSObject
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @property hostName
|
|
18
|
-
*/
|
|
19
|
-
@property (readonly) NSString *hostName;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @property productName
|
|
23
|
-
*/
|
|
24
|
-
@property (readonly) NSString *productName;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @property ipAddress
|
|
28
|
-
*/
|
|
29
|
-
@property (readonly) NSString *ipAddress;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @property imageWidth
|
|
33
|
-
*/
|
|
34
|
-
@property (readonly) NSNumber *imageWidth;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @property imageHeight
|
|
38
|
-
*/
|
|
39
|
-
@property (readonly) NSNumber *imageHeight;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @property netService
|
|
43
|
-
*/
|
|
44
|
-
@property (readonly) NSNetService* netService;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Create a new FLIRCameraDeviceInfo from a NSNetService
|
|
48
|
-
*
|
|
49
|
-
* @param source netService
|
|
50
|
-
*/
|
|
51
|
-
-(void) create:(id)source;
|
|
52
|
-
|
|
53
|
-
@end
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// FLIRCameraEvent.h
|
|
3
|
-
// FLIR Thermal SDK
|
|
4
|
-
//
|
|
5
|
-
// Copyright © 2019 Teledyne FLIR. All rights reserved.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
#import "FLIRCameraDeviceInfo.h"
|
|
10
|
-
#import "FLIRIdentity.h"
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* Camera event.
|
|
15
|
-
*
|
|
16
|
-
* Handles events from a remotely connected camera
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
@interface FLIRCameraEvent : NSObject
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
Event
|
|
24
|
-
|
|
25
|
-
- ImageSavedInCamera: the event
|
|
26
|
-
*/
|
|
27
|
-
typedef NS_ENUM(NSInteger, CameraEvent) {
|
|
28
|
-
/** Image was saved in the camera */
|
|
29
|
-
ImageSavedInCamera = 0,
|
|
30
|
-
/** Connection was lost */
|
|
31
|
-
CameraConnectionLost = 1, // Always on
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Event
|
|
36
|
-
* CameraConnectionLost
|
|
37
|
-
*
|
|
38
|
-
* CameraConnectionLost event will be posted to NSNotificationCenter defaultCenter when camera is lost
|
|
39
|
-
* This event is always enabled when listening for ImageSavedInCamera
|
|
40
|
-
* event is separated from the discovery events
|
|
41
|
-
* object param always nil
|
|
42
|
-
*
|
|
43
|
-
* [[NSNotificationCenter defaultCenter] addObserver:self
|
|
44
|
-
* selector:@selector(CameraConnectionLost:)
|
|
45
|
-
* name:@"CameraConnectionLost"
|
|
46
|
-
* object:nil];
|
|
47
|
-
*
|
|
48
|
-
*/
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Create a camera event object
|
|
52
|
-
*
|
|
53
|
-
* @param cameraDeviceInfo the camera device to listen for events from
|
|
54
|
-
*
|
|
55
|
-
* @return FLIRCameraEvent object
|
|
56
|
-
*/
|
|
57
|
-
- (instancetype) initWithCameraDeviceInfo:(FLIRCameraDeviceInfo *) cameraDeviceInfo;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Create a camera event object
|
|
61
|
-
*
|
|
62
|
-
* @param ipAddress the camera ipAddress to listen for events from
|
|
63
|
-
*
|
|
64
|
-
* @return FLIRCameraEvent object
|
|
65
|
-
*/
|
|
66
|
-
- (instancetype) initWithCameraIpAddress:(NSString *) ipAddress;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Create a camera event object
|
|
70
|
-
*
|
|
71
|
-
* @param identity the camera identity to listen for events from
|
|
72
|
-
*
|
|
73
|
-
* @return FLIRCameraEvent object
|
|
74
|
-
*/
|
|
75
|
-
- (instancetype) initWithIdentity:(FLIRIdentity *) identity;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* start listen for events
|
|
79
|
-
*
|
|
80
|
-
* posts the event to NSNotificationCenter defaultCenter
|
|
81
|
-
*
|
|
82
|
-
* event with id ImageSavedInCamera will post a named event "ImageSavedInCamera" to the notification center
|
|
83
|
-
*
|
|
84
|
-
* the notification object is a `FLIRFileReference` instance containing the full path to the image that was saved
|
|
85
|
-
*
|
|
86
|
-
* this image can be downloaded from the camera via FTP
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* typedef NS_ENUM(NSInteger, CameraEvent) {
|
|
90
|
-
*
|
|
91
|
-
* - ImageSavedInCamera = 0,
|
|
92
|
-
* - CameraConnectionLost = 1, // Always on
|
|
93
|
-
*
|
|
94
|
-
*};
|
|
95
|
-
*
|
|
96
|
-
* [[NSNotificationCenter defaultCenter] addObserver:self
|
|
97
|
-
* selector:@selector(imageSavedInCamera:)
|
|
98
|
-
* name:@"ImageSavedInCamera"
|
|
99
|
-
* object:nil];
|
|
100
|
-
*
|
|
101
|
-
* self.cameraEvent = [[FLIRCameraEvent alloc] initWithCameraDeviceInfo:self.cameraDeviceInfo];
|
|
102
|
-
* [self.cameraEvent listenForEvent:ImageSavedInCamera];
|
|
103
|
-
*
|
|
104
|
-
* Event
|
|
105
|
-
* CameraConnectionLost Always on when listening for ImageSavedInCamera
|
|
106
|
-
*
|
|
107
|
-
* CameraConnectionLost event will be posted to NSNotificationCenter defaultCenter when camera is lost
|
|
108
|
-
*
|
|
109
|
-
* This event is always enabled when listening for ImageSavedInCamera
|
|
110
|
-
*
|
|
111
|
-
* event is separated from the discovery events
|
|
112
|
-
*
|
|
113
|
-
* object param always nil
|
|
114
|
-
*
|
|
115
|
-
* [[NSNotificationCenter defaultCenter] addObserver:self
|
|
116
|
-
* selector:@selector(CameraConnectionLost:)
|
|
117
|
-
* name:@"CameraConnectionLost"
|
|
118
|
-
* object:nil];
|
|
119
|
-
*
|
|
120
|
-
* @param eventID the event to listen for
|
|
121
|
-
*
|
|
122
|
-
* @return true if succesful
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
- (BOOL) listenForEvent:(CameraEvent) eventID;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* stop listen for events
|
|
129
|
-
*/
|
|
130
|
-
- (void) stopListening;
|
|
131
|
-
|
|
132
|
-
@end
|