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.
Files changed (126) hide show
  1. package/Flir.podspec +31 -31
  2. package/README.md +1271 -1271
  3. package/android/Flir/build.gradle.kts +85 -80
  4. package/android/Flir/libs/flir-stubs.jar +0 -0
  5. package/android/Flir/src/main/AndroidManifest.xml +31 -31
  6. package/android/Flir/src/main/java/com/flir/thermalsdk/ErrorCode.java +13 -0
  7. package/android/Flir/src/main/java/com/flir/thermalsdk/ErrorCodeException.java +14 -0
  8. package/android/Flir/src/main/java/com/flir/thermalsdk/ThermalSdkAndroid.java +16 -0
  9. package/android/Flir/src/main/java/com/flir/thermalsdk/androidsdk/image/BitmapAndroid.java +20 -0
  10. package/android/Flir/src/main/java/com/flir/thermalsdk/image/ImageBuffer.java +11 -0
  11. package/android/Flir/src/main/java/com/flir/thermalsdk/image/JavaImageBuffer.java +35 -0
  12. package/android/Flir/src/main/java/com/flir/thermalsdk/image/Palette.java +15 -0
  13. package/android/Flir/src/main/java/com/flir/thermalsdk/image/PaletteManager.java +16 -0
  14. package/android/Flir/src/main/java/com/flir/thermalsdk/image/Point.java +11 -0
  15. package/android/Flir/src/main/java/com/flir/thermalsdk/image/ThermalImage.java +23 -0
  16. package/android/Flir/src/main/java/com/flir/thermalsdk/image/ThermalValue.java +9 -0
  17. package/android/Flir/src/main/java/com/flir/thermalsdk/live/Camera.java +26 -0
  18. package/android/Flir/src/main/java/com/flir/thermalsdk/live/CameraType.java +8 -0
  19. package/android/Flir/src/main/java/com/flir/thermalsdk/live/CommunicationInterface.java +16 -0
  20. package/android/Flir/src/main/java/com/flir/thermalsdk/live/ConnectParameters.java +16 -0
  21. package/android/Flir/src/main/java/com/flir/thermalsdk/live/Identity.java +23 -0
  22. package/android/Flir/src/main/java/com/flir/thermalsdk/live/IpSettings.java +9 -0
  23. package/android/Flir/src/main/java/com/flir/thermalsdk/live/RemoteControl.java +16 -0
  24. package/android/Flir/src/main/java/com/flir/thermalsdk/live/connectivity/ConnectionStatusListener.java +7 -0
  25. package/android/Flir/src/main/java/com/flir/thermalsdk/live/discovery/DiscoveryEventListener.java +14 -0
  26. package/android/Flir/src/main/java/com/flir/thermalsdk/live/discovery/DiscoveryFactory.java +33 -0
  27. package/android/Flir/src/main/java/com/flir/thermalsdk/live/remote/OnReceived.java +5 -0
  28. package/android/Flir/src/main/java/com/flir/thermalsdk/live/remote/OnRemoteError.java +7 -0
  29. package/android/Flir/src/main/java/com/flir/thermalsdk/live/streaming/Stream.java +8 -0
  30. package/android/Flir/src/main/java/com/flir/thermalsdk/live/streaming/ThermalStreamer.java +28 -0
  31. package/android/Flir/src/main/java/com/flir/thermalsdk/live/streaming/VisualStreamer.java +18 -0
  32. package/android/Flir/src/main/java/flir/android/FlirCommands.java +136 -0
  33. package/android/Flir/src/main/java/flir/android/FlirDownloadManager.kt +76 -75
  34. package/android/Flir/src/main/java/flir/android/FlirDownloadPackage.kt +16 -16
  35. package/android/Flir/src/main/java/flir/android/FlirFrameCache.kt +6 -6
  36. package/android/Flir/src/main/java/flir/android/FlirManager.kt +477 -248
  37. package/android/Flir/src/main/java/flir/android/FlirModule.kt +74 -74
  38. package/android/Flir/src/main/java/flir/android/FlirPackage.kt +19 -19
  39. package/android/Flir/src/main/java/flir/android/FlirSDKLoader.kt +165 -117
  40. package/android/Flir/src/main/java/flir/android/FlirSdkManager.java +1511 -0
  41. package/android/Flir/src/main/java/flir/android/FlirStatus.kt +12 -12
  42. package/android/Flir/src/main/java/flir/android/FlirView.kt +48 -48
  43. package/android/Flir/src/main/java/flir/android/FlirViewManager.kt +13 -13
  44. package/app.plugin.js +264 -264
  45. package/expo-module.config.json +5 -5
  46. package/ios/Flir/Framework/ThermalSDK/FLIRBattery.h +76 -76
  47. package/ios/Flir/Framework/ThermalSDK/FLIRCalibration.h +108 -108
  48. package/ios/Flir/Framework/ThermalSDK/FLIRCamera.h +156 -156
  49. package/ios/Flir/Framework/ThermalSDK/FLIRCameraDeviceInfo.h +53 -53
  50. package/ios/Flir/Framework/ThermalSDK/FLIRCameraEvent.h +132 -132
  51. package/ios/Flir/Framework/ThermalSDK/FLIRCameraImport.h +204 -204
  52. package/ios/Flir/Framework/ThermalSDK/FLIRColorDistributionSettings.h +204 -204
  53. package/ios/Flir/Framework/ThermalSDK/FLIRColorizer.h +82 -82
  54. package/ios/Flir/Framework/ThermalSDK/FLIRDiscoveredCamera.h +44 -44
  55. package/ios/Flir/Framework/ThermalSDK/FLIRDiscovery.h +132 -132
  56. package/ios/Flir/Framework/ThermalSDK/FLIRDisplaySettings.h +29 -29
  57. package/ios/Flir/Framework/ThermalSDK/FLIRFocus.h +70 -70
  58. package/ios/Flir/Framework/ThermalSDK/FLIRFusion.h +192 -192
  59. package/ios/Flir/Framework/ThermalSDK/FLIRFusionController.h +136 -136
  60. package/ios/Flir/Framework/ThermalSDK/FLIRFusionTransformation.h +35 -35
  61. package/ios/Flir/Framework/ThermalSDK/FLIRIdentity.h +264 -264
  62. package/ios/Flir/Framework/ThermalSDK/FLIRImageBase.h +196 -196
  63. package/ios/Flir/Framework/ThermalSDK/FLIRImageColorizer.h +26 -26
  64. package/ios/Flir/Framework/ThermalSDK/FLIRImageStatistics.h +61 -61
  65. package/ios/Flir/Framework/ThermalSDK/FLIRIsotherms.h +208 -208
  66. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementArea.h +38 -38
  67. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementCollection.h +147 -147
  68. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementDelta.h +62 -62
  69. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementDimensions.h +33 -33
  70. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementEllipse.h +49 -49
  71. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementLine.h +66 -66
  72. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementMarker.h +69 -69
  73. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementParameters.h +41 -41
  74. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementRectangle.h +36 -36
  75. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementReference.h +27 -27
  76. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementShape.h +46 -46
  77. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementSpot.h +33 -33
  78. package/ios/Flir/Framework/ThermalSDK/FLIRMeasurementsController.h +160 -160
  79. package/ios/Flir/Framework/ThermalSDK/FLIRMeterLinkSensorPoll.h +247 -247
  80. package/ios/Flir/Framework/ThermalSDK/FLIROverlayController.h +27 -27
  81. package/ios/Flir/Framework/ThermalSDK/FLIRPalette.h +60 -60
  82. package/ios/Flir/Framework/ThermalSDK/FLIRPaletteController.h +36 -36
  83. package/ios/Flir/Framework/ThermalSDK/FLIRPaletteManager.h +97 -97
  84. package/ios/Flir/Framework/ThermalSDK/FLIRQuantification.h +55 -55
  85. package/ios/Flir/Framework/ThermalSDK/FLIRRemoteControl.h +393 -393
  86. package/ios/Flir/Framework/ThermalSDK/FLIRRenderer.h +35 -35
  87. package/ios/Flir/Framework/ThermalSDK/FLIRRendererImpl.h +17 -17
  88. package/ios/Flir/Framework/ThermalSDK/FLIRScale.h +99 -99
  89. package/ios/Flir/Framework/ThermalSDK/FLIRScaleController.h +44 -44
  90. package/ios/Flir/Framework/ThermalSDK/FLIRStream.h +109 -109
  91. package/ios/Flir/Framework/ThermalSDK/FLIRStreamer.h +124 -124
  92. package/ios/Flir/Framework/ThermalSDK/FLIRSystem.h +40 -40
  93. package/ios/Flir/Framework/ThermalSDK/FLIRTemperatureRange.h +43 -43
  94. package/ios/Flir/Framework/ThermalSDK/FLIRThermalDelta.h +77 -77
  95. package/ios/Flir/Framework/ThermalSDK/FLIRThermalImage.h +331 -331
  96. package/ios/Flir/Framework/ThermalSDK/FLIRThermalImageFile.h +56 -56
  97. package/ios/Flir/Framework/ThermalSDK/FLIRThermalParameters.h +31 -31
  98. package/ios/Flir/Framework/ThermalSDK/FLIRThermalValue.h +92 -92
  99. package/ios/Flir/Framework/ThermalSDK/FLIRWirelessCameraDetails.h +88 -88
  100. package/ios/Flir/Framework/ThermalSDK/ThermalSDK.h +73 -73
  101. package/ios/Flir/SDKLoader/FlirSDKLoader.m +13 -13
  102. package/ios/Flir/SDKLoader/FlirSDKLoader.swift +175 -175
  103. package/ios/Flir/src/FlirEventEmitter.h +12 -12
  104. package/ios/Flir/src/FlirEventEmitter.m +33 -33
  105. package/ios/Flir/src/FlirModule.h +10 -10
  106. package/ios/Flir/src/FlirModule.m +381 -381
  107. package/ios/Flir/src/FlirPreviewView.h +13 -13
  108. package/ios/Flir/src/FlirPreviewView.m +24 -24
  109. package/ios/Flir/src/FlirState.h +20 -20
  110. package/ios/Flir/src/FlirState.m +79 -79
  111. package/ios/Flir/src/FlirViewManager.h +9 -9
  112. package/ios/Flir/src/FlirViewManager.m +16 -16
  113. package/package.json +60 -60
  114. package/react-native.config.js +14 -14
  115. package/scripts/copy_ios_libs.sh +32 -32
  116. package/scripts/create_stubs.py +174 -174
  117. package/scripts/download-sdk.js +62 -62
  118. package/scripts/prepare-binaries.sh +171 -171
  119. package/sdk-manifest.json +37 -30
  120. package/src/FlirDownload.ts +78 -78
  121. package/src/index.d.ts +17 -17
  122. package/src/index.js +7 -7
  123. package/src/index.ts +7 -7
  124. package/android/Flir/src/main/java/flir/android/CameraHandler.java +0 -194
  125. package/android/Flir/src/main/java/flir/android/FlirController.kt +0 -11
  126. 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