Cognex Mobile Barcode SDK
SDK for supporting communication with Cognex Barcode Reader devices
CDMResponse.h
Go to the documentation of this file.
1 //
2 // CDMResponse.h
3 //
4 // Copyright (c) 2014 Cognex Corporation. All rights reserved.
5 //
6 
7 #import <Foundation/Foundation.h>
8 
9 #define DMCC_STATUS_NO_ERROR 0
10 #define DMCC_STATUS_READ_STRING 1
11 #define DMCC_STATUS_AUTO_RESPONSE 2 // This is not used in the current firmware (4.2).
12 #define DMCC_STATUS_XML_RESULT 3
13 #define DMCC_STATUS_XML_STATISTICS 4
14 #define DMCC_STATUS_IMAGE 5
15 #define DMCC_STATUS_IMAGE_GRAPHICS 6
16 #define DMCC_STATUS_TRAINING_RESULT 7
17 #define DMCC_STATUS_AUTO_TRAIN_BRIGHT 8
18 #define DMCC_STATUS_AUTO_TRAIN_STRING 9
19 #define DMCC_STATUS_CODE_QUALITY_DATA 10
20 #define DMCC_STATUS_AUTO_TRAIN_FOCUS 11
21 #define DMCC_STATUS_EVENT 12
22 
23 #define DMCC_STATUS_UNIDENTIFIED_ERROR 100
24 #define DMCC_STATUS_INVALID_COMMAND 101
25 #define DMCC_STATUS_INVALID_PARAM_OR_MISSING_FEATURE 102
26 #define DMCC_STATUS_INCORRECT_CHECKSUM 103
27 #define DMCC_STATUS_PARAMETER_REJECTED 104
28 #define DMCC_STATUS_READER_OFFLINE 105
29 
30 #define DMCC_STATUS_COMMAND_TIMEOUT -1
31 
35 @interface CDMResponse : NSObject
39 @property (nonatomic, readonly) int responseId;
43 @property (nonatomic, readonly) int status;
47 @property (nonatomic, readonly) NSString* payload;
51 @property (nonatomic, readonly) NSData* binaryPayload;
52 
53 - (id) initWithResponseId:(int)responseId status:(int)status payload:(NSString*)payload binaryPayload:(NSData*)binaryPayload;
54 
55 @end
56 
NSString * payload
Payload content.
Definition: CDMResponse.h:47
Represents a DMCC response sent by a remote system.
Definition: CDMResponse.h:35
NSData * binaryPayload
Binary data.
Definition: CDMResponse.h:51
int responseId
Id of the response.
Definition: CDMResponse.h:39
int status
Status of the response.
Definition: CDMResponse.h:43