PosSharp v1.2.0 API Reference
---
#### [PosSharp\.Core](PosSharp.Core 'PosSharp\.Core')
### [PosSharp\.Core](PosSharp.Core 'PosSharp\.Core').[UposDeviceBase](PosSharp.Core.UposDeviceBase 'PosSharp\.Core\.UposDeviceBase')
## UposDeviceBase\.OnDirectIOAsync\(int, int, object, CancellationToken\) Method
Called by [DirectIOAsync\(int, int, object, CancellationToken\)](PosSharp.Core.UposDeviceBase.DirectIOAsync(int,int,object,System.Threading.CancellationToken).md 'PosSharp\.Core\.UposDeviceBase\.DirectIOAsync\(int, int, object, System\.Threading\.CancellationToken\)') to perform device\-specific command logic\.
```csharp
protected abstract System.Threading.Tasks.Task OnDirectIOAsync(int command, int data, object obj, System.Threading.CancellationToken ct);
```
#### Parameters
`command` [System\.Int32](https://learn.microsoft.com/en-us/dotnet/api/system.int32 'System\.Int32')
Command ID\.
`data` [System\.Int32](https://learn.microsoft.com/en-us/dotnet/api/system.int32 'System\.Int32')
Input/output data\.
`obj` [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object')
Input/output object\.
`ct` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken')
Cancellation token\.
#### Returns
[System\.Threading\.Tasks\.Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task 'System\.Threading\.Tasks\.Task')
A task representing the asynchronous operation\.