8 #ifndef _ADTF_UCOM_ANT_DEVICE_INTERFACE_INCLUDES_HEADER_
9 #define _ADTF_UCOM_ANT_DEVICE_INTERFACE_INCLUDES_HEADER_
37 char strIdentifier[128];
44 typedef enum : uint16_t
50 IOCTL_GetDeviceInfo = 1,
53 IOCTL_RegisterHandler = 2,
56 IOCTL_UnregisterHandler = 3,
59 IOCTL_GetDataSize = 4,
62 IOCTL_GetDataTime = 5,
103 typedef enum : uint8_t
158 virtual int Read(
void* pvBuffer,
int nBufferSize) = 0;
170 virtual int Write(
const void* pvBuffer,
int nBufferSize) = 0;
184 virtual int IOCtl(
int nCommand,
void* pvData=NULL,
int nDataSize=0) = 0;
A common result class usable as return value throughout.
The IDevice interface wraps I/O devices.
virtual int Write(const void *pvBuffer, int nBufferSize)=0
Write data to device.
virtual int IOCtl(int nCommand, void *pvData=NULL, int nDataSize=0)=0
Execute I/O control command.
ADTF_IID(IDevice, "device.ant.ucom.adtf.iid")
Marks the IDevice to be castable with the ucom_cast<>
virtual int Read(void *pvBuffer, int nBufferSize)=0
Read data from device.
virtual tResult Close()=0
Close device.
~IDevice()=default
Protected destructor --> Use implemented Destroy() instead of delete!
virtual tResult Open(const char *strDeviceName, int nMode=0)=0
Open device.
Base class for every interface type within the uCOM.
ant::IDevice IDevice
Alias always bringing the latest version of ant::IDevice into scope.
Namespace for entire ADTF SDK.
Device configuration structure.
const char * strConfigName
Parameter name.
int szValueSize
Parameter size.
const void * pvValue
Parameter value.
uint32_t ui32Flags
Device flags as defined in tDeviceFlags.