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#define DMCC_STATUS_XML_CONTENT 16
23
24#define DMCC_STATUS_UNIDENTIFIED_ERROR 100
25#define DMCC_STATUS_INVALID_COMMAND 101
26#define DMCC_STATUS_INVALID_PARAM_OR_MISSING_FEATURE 102
27#define DMCC_STATUS_INCORRECT_CHECKSUM 103
28#define DMCC_STATUS_PARAMETER_REJECTED 104
29#define DMCC_STATUS_READER_OFFLINE 105
30
31#define DMCC_STATUS_COMMAND_TIMEOUT -1
32
36@interface CDMResponse : NSObject
40@property (nonatomic, readonly) int responseId;
44@property (nonatomic, readonly) int status;
48@property (nonatomic, readonly) NSString* payload;
52@property (nonatomic, readonly) NSData* binaryPayload;
53
54- (id) initWithResponseId:(int)responseId status:(int)status payload:(NSString*)payload binaryPayload:(NSData*)binaryPayload;
55
56@end
57
CDMResponse
Represents a DMCC response sent by a remote system.
Definition: CDMResponse.h:37
CDMResponse::binaryPayload
NSData * binaryPayload
Binary data.
Definition: CDMResponse.h:52
CDMResponse::payload
NSString * payload
Payload content.
Definition: CDMResponse.h:48
CDMResponse::status
int status
Status of the response.
Definition: CDMResponse.h:44
CDMResponse::responseId
int responseId
Id of the response.
Definition: CDMResponse.h:40