Class that implements the USB specific communication and extends the AComm class.
More...
#include <UsbComm.h>
Class that implements the USB specific communication and extends the AComm class.
◆ asyncListenRead
Asynchronously listens for and reads data from the device.
◆ close
Closes the connection to the device.
Reimplemented from AComm.
◆ initWithVendorId:productId:
| - (instancetype) initWithVendorId: |
|
(NSString *) | vendorId |
| productId: |
|
(NSString *) | productId |
Initializes a new instance with the given vendor ID and product ID.
- Parameters
-
| vendorId | The vendor ID for the instance. |
| productId | The product ID for the instance. |
- Returns
- An initialized instance of the class, or nil if the object could not be created.
◆ open
Opens the connection to the device.
Reimplemented from AComm.
◆ read
Reads data from the device.
- Returns
- The data read from the device.
Reimplemented from AComm.
◆ stopListenRead
Stops asynchronous reading from the device.
◆ write:
| - (void) write: |
|
(NSData *) | text |
|
Writes data to the device.
- Parameters
-
| text | The data to write to the device. |
Reimplemented from AComm.
◆ writeAndWaitForResponse:responseStartTimeOut:responseEndTimeOut:completionToken:
| - (NSData *) writeAndWaitForResponse: |
|
(NSData *) | text |
| responseStartTimeOut: |
|
(NSTimeInterval) | responseStartTimeOut |
| responseEndTimeOut: |
|
(NSTimeInterval) | responseEndTimeOut |
| completionToken: |
|
(NSString *) | completionToken |
Writes data to the device and waits for a response.
- Parameters
-
| text | The data to write to the device. |
| responseStartTimeOut | The timeout interval for the start of the response. |
| responseEndTimeOut | The timeout interval for the end of the response. |
| completionToken | A token indicating the completion of the response. |
- Returns
- The data received in response from the device.
Reimplemented from AComm.
◆ writeAndWaitForResponseJson:responseStartTimeOut:responseEndTimeOut:completionToken:
| - (NSData *) writeAndWaitForResponseJson: |
|
(NSData *) | text |
| responseStartTimeOut: |
|
(NSTimeInterval) | responseStartTimeOut |
| responseEndTimeOut: |
|
(NSTimeInterval) | responseEndTimeOut |
| completionToken: |
|
(NSString *) | completionToken |
◆ deviceList
| - (NSMutableDictionary*) deviceList |
|
readnonatomicassign |
◆ discoveredInterfaces
| - (NSMutableArray<UsbInterfaceInfo *>*) discoveredInterfaces |
|
readnonatomicstrong |
◆ matchedInterfaces
| - (UsbInterfaceInfo*) matchedInterfaces |
|
readnonatomicassign |
The documentation for this class was generated from the following file:
- /Users/bob_huang/Documents/Project/sdk_json_Objective-C/AutoIdSDK/Comm/UsbComm.h