ilabs-flir 1.0.2 → 1.0.4
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/Flir.podspec +31 -31
- package/README.md +1271 -1271
- package/android/Flir/build.gradle.kts +85 -80
- package/android/Flir/libs/flir-stubs.jar +0 -0
- package/android/Flir/src/main/AndroidManifest.xml +31 -31
- package/android/Flir/src/main/java/com/flir/thermalsdk/ErrorCode.java +13 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/ErrorCodeException.java +14 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/ThermalSdkAndroid.java +16 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/androidsdk/image/BitmapAndroid.java +20 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/image/ImageBuffer.java +11 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/image/JavaImageBuffer.java +35 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/image/Palette.java +15 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/image/PaletteManager.java +16 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/image/Point.java +11 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/image/ThermalImage.java +23 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/image/ThermalValue.java +9 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/Camera.java +26 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/CameraType.java +8 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/CommunicationInterface.java +16 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/ConnectParameters.java +16 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/Identity.java +23 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/IpSettings.java +9 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/RemoteControl.java +16 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/connectivity/ConnectionStatusListener.java +7 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/discovery/DiscoveryEventListener.java +14 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/discovery/DiscoveryFactory.java +33 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/remote/OnReceived.java +5 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/remote/OnRemoteError.java +7 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/streaming/Stream.java +8 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/streaming/ThermalStreamer.java +28 -0
- package/android/Flir/src/main/java/com/flir/thermalsdk/live/streaming/VisualStreamer.java +18 -0
- package/android/Flir/src/main/java/flir/android/FlirCommands.java +136 -0
- package/android/Flir/src/main/java/flir/android/FlirDownloadManager.kt +76 -75
- package/android/Flir/src/main/java/flir/android/FlirDownloadPackage.kt +16 -16
- package/android/Flir/src/main/java/flir/android/FlirFrameCache.kt +6 -6
- package/android/Flir/src/main/java/flir/android/FlirManager.kt +477 -248
- package/android/Flir/src/main/java/flir/android/FlirModule.kt +74 -74
- package/android/Flir/src/main/java/flir/android/FlirPackage.kt +19 -19
- package/android/Flir/src/main/java/flir/android/FlirSDKLoader.kt +165 -117
- package/android/Flir/src/main/java/flir/android/FlirSdkManager.java +1511 -0
- package/android/Flir/src/main/java/flir/android/FlirStatus.kt +12 -12
- package/android/Flir/src/main/java/flir/android/FlirView.kt +48 -48
- package/android/Flir/src/main/java/flir/android/FlirViewManager.kt +13 -13
- package/app.plugin.js +264 -264
- package/expo-module.config.json +5 -5
- package/ios/Flir/Framework/ThermalSDK/FLIRBattery.h +76 -76
- package/ios/Flir/Framework/ThermalSDK/FLIRCalibration.h +108 -108
- package/ios/Flir/Framework/ThermalSDK/FLIRCamera.h +156 -156
- package/ios/Flir/Framework/ThermalSDK/FLIRCameraDeviceInfo.h +53 -53
- package/ios/Flir/Framework/ThermalSDK/FLIRCameraEvent.h +132 -132
- package/ios/Flir/Framework/ThermalSDK/FLIRCameraImport.h +204 -204
- package/ios/Flir/Framework/ThermalSDK/FLIRColorDistributionSettings.h +204 -204
- package/ios/Flir/Framework/ThermalSDK/FLIRColorizer.h +82 -82
- package/ios/Flir/Framework/ThermalSDK/FLIRDiscoveredCamera.h +44 -44
- package/ios/Flir/Framework/ThermalSDK/FLIRDiscovery.h +132 -132
- package/ios/Flir/Framework/ThermalSDK/FLIRDisplaySettings.h +29 -29
- package/ios/Flir/Framework/ThermalSDK/FLIRFocus.h +70 -70
- package/ios/Flir/Framework/ThermalSDK/FLIRFusion.h +192 -192
- package/ios/Flir/Framework/ThermalSDK/FLIRFusionController.h +136 -136
- package/ios/Flir/Framework/ThermalSDK/FLIRFusionTransformation.h +35 -35
- package/ios/Flir/Framework/ThermalSDK/FLIRIdentity.h +264 -264
- package/ios/Flir/Framework/ThermalSDK/FLIRImageBase.h +196 -196
- package/ios/Flir/Framework/ThermalSDK/FLIRImageColorizer.h +26 -26
- package/ios/Flir/Framework/ThermalSDK/FLIRImageStatistics.h +61 -61
- package/ios/Flir/Framework/ThermalSDK/FLIRIsotherms.h +208 -208
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementArea.h +38 -38
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementCollection.h +147 -147
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementDelta.h +62 -62
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementDimensions.h +33 -33
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementEllipse.h +49 -49
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementLine.h +66 -66
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementMarker.h +69 -69
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementParameters.h +41 -41
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementRectangle.h +36 -36
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementReference.h +27 -27
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementShape.h +46 -46
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementSpot.h +33 -33
- package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementsController.h +160 -160
- package/ios/Flir/Framework/ThermalSDK/FLIRMeterLinkSensorPoll.h +247 -247
- package/ios/Flir/Framework/ThermalSDK/FLIROverlayController.h +27 -27
- package/ios/Flir/Framework/ThermalSDK/FLIRPalette.h +60 -60
- package/ios/Flir/Framework/ThermalSDK/FLIRPaletteController.h +36 -36
- package/ios/Flir/Framework/ThermalSDK/FLIRPaletteManager.h +97 -97
- package/ios/Flir/Framework/ThermalSDK/FLIRQuantification.h +55 -55
- package/ios/Flir/Framework/ThermalSDK/FLIRRemoteControl.h +393 -393
- package/ios/Flir/Framework/ThermalSDK/FLIRRenderer.h +35 -35
- package/ios/Flir/Framework/ThermalSDK/FLIRRendererImpl.h +17 -17
- package/ios/Flir/Framework/ThermalSDK/FLIRScale.h +99 -99
- package/ios/Flir/Framework/ThermalSDK/FLIRScaleController.h +44 -44
- package/ios/Flir/Framework/ThermalSDK/FLIRStream.h +109 -109
- package/ios/Flir/Framework/ThermalSDK/FLIRStreamer.h +124 -124
- package/ios/Flir/Framework/ThermalSDK/FLIRSystem.h +40 -40
- package/ios/Flir/Framework/ThermalSDK/FLIRTemperatureRange.h +43 -43
- package/ios/Flir/Framework/ThermalSDK/FLIRThermalDelta.h +77 -77
- package/ios/Flir/Framework/ThermalSDK/FLIRThermalImage.h +331 -331
- package/ios/Flir/Framework/ThermalSDK/FLIRThermalImageFile.h +56 -56
- package/ios/Flir/Framework/ThermalSDK/FLIRThermalParameters.h +31 -31
- package/ios/Flir/Framework/ThermalSDK/FLIRThermalValue.h +92 -92
- package/ios/Flir/Framework/ThermalSDK/FLIRWirelessCameraDetails.h +88 -88
- package/ios/Flir/Framework/ThermalSDK/ThermalSDK.h +73 -73
- package/ios/Flir/SDKLoader/FlirSDKLoader.m +13 -13
- package/ios/Flir/SDKLoader/FlirSDKLoader.swift +175 -175
- package/ios/Flir/src/FlirEventEmitter.h +12 -12
- package/ios/Flir/src/FlirEventEmitter.m +33 -33
- package/ios/Flir/src/FlirModule.h +10 -10
- package/ios/Flir/src/FlirModule.m +381 -381
- package/ios/Flir/src/FlirPreviewView.h +13 -13
- package/ios/Flir/src/FlirPreviewView.m +24 -24
- package/ios/Flir/src/FlirState.h +20 -20
- package/ios/Flir/src/FlirState.m +79 -79
- package/ios/Flir/src/FlirViewManager.h +9 -9
- package/ios/Flir/src/FlirViewManager.m +16 -16
- package/package.json +60 -60
- package/react-native.config.js +14 -14
- package/scripts/copy_ios_libs.sh +32 -32
- package/scripts/create_stubs.py +174 -174
- package/scripts/download-sdk.js +62 -62
- package/scripts/prepare-binaries.sh +171 -171
- package/sdk-manifest.json +37 -30
- package/src/FlirDownload.ts +78 -78
- package/src/index.d.ts +17 -17
- package/src/index.js +7 -7
- package/src/index.ts +7 -7
- package/android/Flir/src/main/java/flir/android/CameraHandler.java +0 -194
- package/android/Flir/src/main/java/flir/android/FlirController.kt +0 -11
- package/android/Flir/src/main/java/flir/android/FrameDataHolder.java +0 -14
|
@@ -1,156 +1,156 @@
|
|
|
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
|
+
//
|
|
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 +1,53 @@
|
|
|
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
|
+
//
|
|
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 +1,132 @@
|
|
|
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
|
|
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
|