Represents a remote DataMan system.
More...
#import <CDMDataManSystem.h>
Represents a remote DataMan system.
◆ CDMCameraMode
Specifies the preview/illumination mode when using the Mobile device camera.
| Enumerator |
|---|
| kCDMCameraModeNoAimer | Use camera with no aimer.
Preview is on, illumination is available.
|
| kCDMCameraModePassiveAimer | Use camera with a basic aimer (e.g., StingRay).
Preview is off, illumination is not available.
|
| kCDMCameraModeActiveAimer | Use camera with an active aimer (e.g., MX-100).
Preview is off, illumination is available.
|
| kCDMCameraModeFrontCamera | Use mobile device front camera.
Preview is on, illumination is not available.
|
◆ acceptIncomingConnection:()
| - (void) acceptIncomingConnection: |
|
(BOOL) |
accept |
|
Changes whether the DataMan system accepts incoming messages or not.
It does not effect an already connected device.
- Parameters
-
| accept | Flag to signal whether the incoming connection is accepted or not |
◆ connect()
Connects to a remote system without authentication.
◆ connectWithUsername:password:()
| - (BOOL) connectWithUsername: |
|
(NSString*) |
username |
| password: |
|
(NSString*) |
password |
|
|
| |
Connects to a remote system, authenticating with the specified username and password.
If the password is specified but the username is not, the username will be "admin" by default.
- Parameters
-
| username | the username for the authentication |
| password | the password for the given user |
- Returns
- YES, if the system has successfully started the connection process. (it may return NO mostly with EA devices if the session can't be opened)
◆ dataManSystemOfExternalAccessoryWithDelegate:()
| + (CDMDataManSystem *) dataManSystemOfExternalAccessoryWithDelegate: |
|
(id<CDMDataManSystemDelegate>) |
delegate |
|
Constructs a DataMan system with accessory connector.
To properly detect and connect to the device, be sure to declare UISupportedExternalAccessoryProtocols key with Cognex DMCC protocol (com.cognex.dmcc) item in Info.plist.
- Parameters
-
| delegate | The delegate where the messages will be sent to |
- Returns
- DataMan system with external accessory connection configured or nil, if there is no supported accessory connected
- See also
- CDMDataManSystemDelegate
◆ dataManSystemWithAccessory:delegate:()
| + (CDMDataManSystem *) dataManSystemWithAccessory: |
|
(EAAccessory*) |
accessory |
| delegate: |
|
(id<CDMDataManSystemDelegate>) |
delegate |
|
|
| |
Constructs a DataMan system with accessory connector.
To properly detect and connect to the device, be sure to declare UISupportedExternalAccessoryProtocols key with Cognex DMCC protocol (com.cognex.dmcc) item in Info.plist.
- Parameters
-
| accessory | The EAAccessory object with information about the connected device |
| delegate | The delegate where the messages will be sent to |
- Returns
- DataMan system with external accessory connection configured or nil, if the accessory is not a CDM device
- See also
- CDMDataManSystemDelegate
◆ dataManSystemWithCameraMode:previewOptions:nullablePreviewView:delegate:()
| + (CDMDataManSystem *) dataManSystemWithCameraMode: |
|
(CDMCameraMode) |
cameraMode |
| previewOptions: |
|
(CDMPreviewOption) |
previewOptions |
| nullablePreviewView: |
|
(UIView*) |
previewView |
| delegate: |
|
(id<CDMDataManSystemDelegate>) |
delegate |
|
|
| |
Constructs a DataMan system with iOS camera.
To properly detect and connect to the device, be sure to declare NSCameraUsageDescription key with Cognex DMCC protocol (com.cognex.dmcc) item in Info.plist.
- Parameters
-
| previewView | Camera preview will be attached on that view, can be null (in which case, camera preview will be streamed in the image delegate). |
| delegate | The delegate where the messages will be sent to |
- Returns
- DataMan system with external accessory connection configured or nil, if the accessory is not a CDM device
- See also
- CDMDataManSystemDelegate
◆ dataManSystemWithHostname:port:delegate:()
| + (CDMDataManSystem *) dataManSystemWithHostname: |
|
(NSString *) |
hostname |
| port: |
|
(int) |
port |
| delegate: |
|
(id<CDMDataManSystemDelegate>) |
delegate |
|
|
| |
Constructs a DataMan system with hostname and port.
This factory method constructs a new DataMan system with an ethernet connector configured inside.
- Parameters
-
| hostname | The hostname of the remote system |
| port | The port of the remote system |
| delegate | The delegate where the messages will be sent to |
- Returns
- DataMan system with ethernet connection configured
- See also
- CDMDataManSystemDelegate
◆ disableHeartbeat()
| - (void) disableHeartbeat |
|
|
|
Disables the heartbeat when enabled.
◆ disableLiveImage()
| - (void) disableLiveImage |
|
|
|
Stops a pending live image retrieval operation.
◆ disconnect()
Disconnects from the remote system.
◆ enableHeartbeatWithInterval:()
| - (void) enableHeartbeatWithInterval: |
|
(NSTimeInterval) |
interval |
|
Enables heartbeat function and sets its interval.
- Parameters
-
| interval | Specifies heartbeat interval in seconds |
◆ enableLiveImageWithFormat:imageSize:imageQuality:callback:()
Begins getting the latest image from the connected remote system in live display mode.
- Parameters
-
| imageFormat | Image format |
| imageSize | Image size |
| quality | Image quality |
| callback | Callback block with image to be called when operation completes |
◆ getVersion()
| + (NSString *) getVersion |
|
|
|
Returns the current version of the library.
- Returns
- current DataMan SDK version
◆ NS_OPTIONS()
| - (typedef) NS_OPTIONS |
|
(NSInteger) |
|
|
|
(CDMPreviewOption) |
|
|
|
| |
Controls the preview/scanning options when using the Mobile device camera.
Preview defaults are set by the CDMCameraMode but can be overridden. Multiple options can be OR'd together.
Use defaults (no overrides).
Disable zoom feature (removes zoom button from preview).
Disable illumination (removes illumination button from preview).
Enables the simulated hardware trigger (the volume down button).
When scanning starts, the preview is displayed but decoding is paused until a trigger (either the on screen button or the volume down button, if enabled) is pressed.
Force the preview to be displayed, even if off by default (e.g., when using kCDMCameraModePassiveAimer or kCDMCameraModeActiveAimer).
◆ sendBatchCommands:completed:()
| - (BOOL) sendBatchCommands: |
|
(NSArray *) |
commands |
| completed: |
|
(void(^)()) |
complete |
|
|
| |
Sends the specified commands array to the connected remote system.
- Parameters
-
| commands | The array of commands to send to the remote system |
| complete | A callback that will be called when all the commands are sent |
- Returns
- YES, if the system is connected and the command can be sent, NO otherwise
◆ sendCommand:()
| - (BOOL) sendCommand: |
|
(NSString *) |
command |
|
Sends the specified command to the connected remote system.
- Parameters
-
| command | The command to send to the remote system |
- Returns
- YES, if the system is connected and the command can be sent, NO otherwise
◆ sendCommand:withCallback:()
Sends the specified command to the connected remote system.
Code samples:
[
self.dataManSystem sendCommand:
@"TRIGGER ON" withCallback:^(
CDMResponse *response){
} else {
}
}];
[
self.dataManSystem sendCommand:
@"GET TRAINED-CODE.INFO" withCallback:^(
CDMResponse *response){
if ([response.payload isEqualToString:@"Untrained"]) {
} else {
}
}
}];
- Parameters
-
| command | The command to send to the remote system |
| callback | A callback that will be called when the command is completed |
- Returns
- YES, if the system is connected and the command can be sent, NO otherwise
◆ sendCommand:withData:timeout:expectBinaryResponse:callback:()
| - (BOOL) sendCommand: |
|
(NSString *) |
command |
| withData: |
|
(NSData *) |
data |
| timeout: |
|
(NSTimeInterval) |
timeout |
| expectBinaryResponse: |
|
(BOOL) |
expectBinaryResponse |
| callback: |
|
(void(^)(CDMResponse *response)) |
callback |
|
|
| |
Sends the specified command to the connected remote system.
- Parameters
-
| command | The command to send to the remote system |
| data | Additional data to send to the remote system |
| timeout | Timeout for the command |
| expectBinaryResponse | Flag to signal if we expect binary response |
| callback | A callback that will be called when the command is completed |
- Returns
- YES, if the system is connected and the command can be sent, NO otherwise
◆ setPreviewContainer:()
| - (void) setPreviewContainer: |
|
(UIView*) |
previewContainer |
|
◆ connected
Read-only connection state of the system.
◆ connectionState
◆ delegate
| - (id<CDMDataManSystemDelegate>) delegate |
|
readwriteatomicweak |
Sets or gets the delegate where the messages will be sent to.
- See also
- CDMDataManSystemDelegate
◆ deviceClass
◆ heartbeatEnabled
| - (BOOL) heartbeatEnabled |
|
readatomicassign |
Read-only state of the heartbeat function.
◆ liveImageEnabled
| - (BOOL) liveImageEnabled |
|
readatomicassign |
Read-only state of live image mode.
◆ resultTypes
| - (CDMResultTypes) resultTypes |
|
readwritenonatomicassign |
Sets which result types the application wants to receive.
◆ timeout
| - (NSTimeInterval) timeout |
|
readwritenonatomicassign |
Timeout for commands and connection, default value is 5 sec.
The documentation for this class was generated from the following files: